CN114330378A - Method for configuring software engineering custom language library and system for implementing same - Google Patents

Method for configuring software engineering custom language library and system for implementing same Download PDF

Info

Publication number
CN114330378A
CN114330378A CN202111590897.4A CN202111590897A CN114330378A CN 114330378 A CN114330378 A CN 114330378A CN 202111590897 A CN202111590897 A CN 202111590897A CN 114330378 A CN114330378 A CN 114330378A
Authority
CN
China
Prior art keywords
text
language
multilingual
translation
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111590897.4A
Other languages
Chinese (zh)
Inventor
杨丽娟
王灵军
李�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111590897.4A priority Critical patent/CN114330378A/en
Publication of CN114330378A publication Critical patent/CN114330378A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for self-defining a language library by a configuration software project and a system for realizing the method. The method for configuring the software engineering custom language library comprises the following steps: detecting the type of an object when a user adds or deletes the object to or from a project being built; if the type of the object is a text object, correspondingly adding the text object into the multilingual element object set, or deleting the corresponding text object from the multilingual element object set; and traversing the multilingual element object set when a custom language library corresponding to the new language is created, and creating a new language attribute for each text object in the multilingual element object set so that a user can input a translation statement corresponding to the new language. The invention can create a custom language library for each project, and facilitates the management and synchronization of the translation text of each project.

Description

Method for configuring software engineering custom language library and system for implementing same
Technical Field
The invention relates to the technical field of configuration software, in particular to a method for customizing a language library in configuration software engineering and a system for realizing the method.
Background
The configuration software displays various information in the production process to an operator in a graphical mode by collecting data and processing information in the field of automation control so as to observe the information to issue corresponding control instructions and finally deal with various conditions on site. Due to the wide application range, the objects served by the system also cover other countries and even the world, and new requirements are provided for the engineering of the HMI configuration software to support multiple language display so as to adapt to different service objects.
However, the existing translation requires the self configuration of a technician, the process is complicated, and the error is easy to occur.
Therefore, how to provide a method and a system capable of customizing a language library is a technical problem to be solved urgently.
Disclosure of Invention
In order to solve the technical problem that technical personnel need to search and process texts of configuration software in the prior art, the invention provides a method for customizing a language library in a configuration software engineering and a system for realizing the method.
The invention provides a method for self-defining a language library of a configuration software project, which comprises the following steps:
detecting the type of an object when a user adds or deletes the object to or from a project being built;
if the type of the object is a text object, correspondingly adding the text object into the multilingual element object set, or deleting the corresponding text object from the multilingual element object set;
and traversing the multilingual element object set when a custom language library corresponding to the new language is created, and creating a new language attribute for each text object in the multilingual element object set so that a user can input a translation statement corresponding to the new language.
Further, the object includes at least one of an element and a record.
Further, when the object is initialized, the types of the objects can be distinguished by carrying out different assignments on the identification attributes of the objects.
Further, all the text objects and the corresponding necessary attributes and new language attributes thereof are displayed on the new interactive interface.
Further, still include: and classifying each text object in the multi-language element object set when traversing the multi-language element object set, and displaying the text objects on different interactive pages.
Further, the classification in the multi-language element object set comprises at least one of a simple text element, a custom text element, a fixed text element, a data record, an alarm record and an operation record.
Further, when the text of the text object is a self-defined editing type, when a user modifies the text of the text object in the process of project construction, an attribute change event is triggered, and at the moment, the corresponding object is retrieved from the multi-language element object set and is synchronized on the corresponding interactive page.
Further, when the text of the text object is of a default set type, after the corresponding interactive interface finishes the translation sentences corresponding to any language of the text object and stores the translation sentences, the translation sentences synchronously corresponding to the text objects of the same basic type in the corresponding interactive page are automatically retrieved.
The system for implementing the method for configuring the software engineering custom language library provided by the technical scheme comprises the following steps:
the object retrieval module is used for monitoring the change of the object in the project under construction, and updating the multilingual element object set when the object is added or deleted in the project, so that the text object in the multilingual element object set is consistent with the project under construction;
and the configuration module is used for creating a new language for a user, updating the text object in the multilingual element object set to a corresponding translation configuration page, and adding the new language attribute to the text object in the translation configuration page.
Further, still include: the synchronization module monitors the attribute change event of the self-defined editing type text object and synchronously updates the interactive page related to the corresponding text object after monitoring the attribute change event; and automatically searching the translation sentences synchronously corresponding to the text objects of the same basic type in the corresponding interactive page after finishing and storing the translation sentences corresponding to any language of the interactive page of the default set type text objects.
The method can automatically retrieve and acquire the text elements and records in the HMI configuration software project in the construction process of the project, and perform classified paging display on the acquired text objects (text elements and objects), so that the configuration software can clearly configure the custom language library of the project, and meanwhile, the configuration software can configure the translation of the custom text based on the ID, thereby being beneficial to synchronization.
Drawings
The invention is described in detail below with reference to examples and figures, in which:
fig. 1 is a block diagram of the structure of an embodiment of the present invention.
FIG. 2 is a first user interface state diagram according to an embodiment of the present invention.
FIG. 3 is a second user interface state diagram according to an embodiment of the present invention.
FIG. 4 is a third state diagram of the user interface according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Thus, a feature indicated in this specification will serve to explain one of the features of one embodiment of the invention, and does not imply that every embodiment of the invention must have the stated feature. Further, it should be noted that this specification describes many features. Although some features may be combined to show a possible system design, these features may also be used in other combinations not explicitly described. Thus, the combinations illustrated are not intended to be limiting unless otherwise specified.
As shown in fig. 1, the method for configuring a software engineering custom language library according to the present invention detects the type of an object when a user adds or deletes the object to or from an engineering being built. And if the type of the object is a text element, correspondingly adding the text object into the multi-language element object set or deleting the text object from the multi-language element object set, namely the text object in the multi-language element object set is consistent with the text object in the project being built. The object of the present invention includes at least one of the elements and records.
When a custom language library corresponding to the new language is created, the system traverses the multilingual element object set to create a new language attribute for each text object in the multilingual element object set, so that a user can input a translation statement corresponding to the new language. The new language referred to herein is relative to the existing language translation text of the text object, e.g., the text element itself already has english text, and when a chinese custom language library is created, an attribute of chinese text is created for each text element. Meanwhile, the text element has an attribute of an English text. If on the basis, the user further creates a custom language library corresponding to a new language, such as French, the system can create an attribute of a French text on the original basis, so that each text element of the project has three language attributes which are respectively the attributes of English texts, and the content is English translation of the text; the attribute of the Chinese text, the content is the Chinese translation of the text; the content is the French translation of the text.
Because many objects in the configuration software may have texts, that is, when languages are switched, the objects have the requirement of translating texts, but the configuration software does not have the function of specially identifying the objects, and a variety of record screening is needed, which is troublesome. In a preferred embodiment, the type of the element can be distinguished by performing different assignments on the identification attributes of the object when the object of the configuration software is initialized. In the concrete implementation, when the object is initialized, the HasContent attribute is assigned and distinguished according to whether the object has the characteristics of displaying the text, and whether the subsequent object contains the text or not can be screened according to the attribute in the detection.
The system will display all text objects and their corresponding necessary attributes and new language attributes on the new interactive interface. In one embodiment, the new interactive interface is called a text translation configuration interface, and when the text translation configuration interface is opened, the text objects in the multi-lingual element object set are traversed, and the text objects are automatically allocated to corresponding pages of the text translation configuration interface according to the types of the text objects, as shown in fig. 3, the text translation configuration interface is classified into: simple text elements, custom text elements, fixed text elements, data records, alarm records, and operation record pagination. The simple text element has only one text display, such as a button, label, etc. The custom text element has multiple text displays and all the text is custom edited by the user, such as a combo box. Fixed text elements refer to elements such as alarm view elements that carry text displays of their own titles. The data record text is added into the multilingual record object set when adding data record item. When a data record item is deleted, synchronization excludes it from the set of multi-lingual record objects. The alarm record and the operation record are the same.
Since the object itself has a lot of attribute information, the system filters unnecessary attribute information therein, such as the size, color, coordinate position, and other attributes unrelated to multiple languages, and displays only necessary attributes, such as the frame position of the text element (i.e. the parent window ID where the element is located), the element ID, the name, the type, the text to be translated, and other information displayed on the text translation configuration interface, so as to look up the key information, for example, part of the information of the button element is displayed in fig. 3. The same is true for record type objects.
Each object in the text translation configuration interface is added with a new attribute 'whether to enable multiple languages', the attribute is in a check state by default, if some texts need to be different from the currently selected language, check can be cancelled, and texts in different languages can be used in the same project.
The texts of the text objects are of a self-defined editing type and a default setting type, most texts belong to the self-defined editing type, and the sufficient degree of freedom is provided for users, such as display contents of elements such as buttons, labels, combination boxes and the like or recorded display contents. Still other elements include default text, such as the title bar content of the alarm element.
The manner in which text and text translation configurations are synchronized is also different for the two types.
When the text of the text object is a self-defined editing type, when a user modifies the text of the text object in the process of project construction, an attribute change event is triggered, at the moment, the corresponding object is retrieved from the multilingual element object set, and synchronization is carried out on the corresponding interactive page. For example, when the text of a text element or the text of a record changes, a property change event is triggered, in which event the ID of the element or record that is changing the text is quickly retrieved, and the set of multilingual objects is refreshed synchronously according to the ID, updating the text translation configuration interface.
When the text of the text object is in a default setting type, after the corresponding interactive interface finishes the translation sentences corresponding to any language of the text object and stores the translation sentences, the text object with the same basic type in the corresponding interactive page is automatically retrieved and the translation sentences synchronously corresponding to the text object. The basic type referred to herein refers to the original classification of all elements or records in the configuration software, the name of each element or record is the basic type of the element or object, for example, a button is a basic type and a label is a basic type. For example, in a fixed text element page of a text translation configuration interface, when the multi-text translation of one text element is completed in the first configuration, the configuration sub-window is closed, and simultaneously, the elements of the same basic type in the current page are automatically retrieved and the translation information is automatically synchronized.
By the method, the HMI configuration software project can be quickly and visually configured with the user-defined language library, and the multi-language visual configuration of the project interface element text is realized, so that users in different countries are served, and the use experience of the users is improved.
The invention also provides a system for realizing the method for the configuration software engineering custom language library of the technical scheme, and the system at least comprises an object retrieval module and a configuration module.
The object retrieval module monitors the change of the object in the project being built, and updates the multilingual element object set when the object is added or deleted in the project, so that the text object in the multilingual element object set is consistent with the project being built.
The configuration module is used for a user to create a new language, updating the text object in the multilingual element object set to a corresponding text translation configuration page, and adding a new language attribute to the text object in the text translation configuration page.
In a preferred embodiment, the system further comprises a synchronization module. And the synchronization module monitors the attribute change event of the custom-edited text object and synchronously updates the interactive page related to the corresponding text object after monitoring the attribute change event. And automatically searching the translation sentences synchronously corresponding to the text objects of the same basic type in the corresponding interactive page after finishing and storing the translation sentences corresponding to any language of the interactive page of the default set type text objects.
When the system and the method of the invention are used, HMI configuration software is operated, and a user firstly opens a multi-language configuration window as shown in figure 2. Clicking the adding button can add a new language and create a new self-defined language object, the language object attribute includes language ID and language name, thereby completing the initialization of the corresponding language library, and the language name of the generated self-defined language can be edited. The language ID is a unique identifier that can be used as an index to query language types, and is not editable. And clicking a delete button to delete the corresponding language object and the corresponding language library. After adding a new language, the user builds a project, and collects the text object into the multilingual element object set, and when the user needs to configure translation, as shown in fig. 3, an attribute of the new language is added at the last of all text objects on a text translation configuration page, so that the user adds a corresponding translation statement. As shown in FIG. 4, custom text elements are typically assembled from other text elements, such as original text elements and/or non-text elements. The text elements in the custom text elements need to be set individually as shown in fig. 3, and then only the corresponding display language needs to be selected in the custom text elements.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for self-defining language library of configuration software engineering is characterized by comprising the following steps:
detecting the type of an object when a user adds or deletes the object to or from a project being built;
if the type of the object is a text object, correspondingly adding the text object into the multilingual element object set, or deleting the corresponding text object from the multilingual element object set;
and traversing the multilingual element object set when a custom language library corresponding to the new language is created, and creating a new language attribute for each text object in the multilingual element object set so that a user can input a translation statement corresponding to the new language.
2. The method of claim 1, wherein the object comprises at least one of a component and a record.
3. The method of claim 1, wherein the object type can be distinguished by assigning different values to the object's identification attributes during object initialization.
4. The method of claim 1, wherein all text objects and their corresponding required attributes and new language attributes are displayed in a new interactive interface.
5. The method of configuring a software engineering custom language library of claim 1, further comprising:
and classifying each text object in the multi-language element object set when traversing the multi-language element object set, and displaying the text objects on different interactive pages.
6. The method of claim 5, wherein the classes in the set of multi-lingual component objects comprise at least one of simple text components, custom text components, fixed text components, data records, alarm records, and action records.
7. The method of claim 1, wherein when the text of the text object is a custom edit type, and when a user modifies the text of the text object during a project building process, an attribute change event is triggered, and the corresponding object is retrieved from the set of multi-language component objects and synchronized on the corresponding interactive page.
8. The method of claim 1, wherein when the text of the text object is of a default type, the corresponding interactive interface completes the translation sentence corresponding to any language of the text object and stores the translation sentence, and then automatically retrieves the translation sentence corresponding to the text object of the same basic type in the corresponding interactive page.
9. A system for implementing the method of configuring a software engineering custom language library according to any one of claims 1 to 8, comprising:
the object retrieval module is used for monitoring the change of the object in the project under construction, and updating the multilingual element object set when the object is added or deleted in the project, so that the text object in the multilingual element object set is consistent with the project under construction;
and the configuration module is used for creating a new language for a user, updating the text object in the multilingual element object set to a corresponding translation configuration page, and adding the new language attribute to the text object in the translation configuration page.
10. The system of claim 9, further comprising:
the synchronization module monitors the attribute change event of the self-defined editing type text object and synchronously updates the interactive page related to the corresponding text object after monitoring the attribute change event; and automatically searching the translation sentences synchronously corresponding to the text objects of the same basic type in the corresponding interactive page after finishing and storing the translation sentences corresponding to any language of the interactive page of the default set type text objects.
CN202111590897.4A 2021-12-23 2021-12-23 Method for configuring software engineering custom language library and system for implementing same Pending CN114330378A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111590897.4A CN114330378A (en) 2021-12-23 2021-12-23 Method for configuring software engineering custom language library and system for implementing same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111590897.4A CN114330378A (en) 2021-12-23 2021-12-23 Method for configuring software engineering custom language library and system for implementing same

Publications (1)

Publication Number Publication Date
CN114330378A true CN114330378A (en) 2022-04-12

Family

ID=81054753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111590897.4A Pending CN114330378A (en) 2021-12-23 2021-12-23 Method for configuring software engineering custom language library and system for implementing same

Country Status (1)

Country Link
CN (1) CN114330378A (en)

Similar Documents

Publication Publication Date Title
US10706091B2 (en) User driven computerized selection, categorization, and layout of live content components
CA2495038C (en) System and method for making user interface elements known to an application and user
US7546315B2 (en) Device for reporting software problem information
US20080307328A1 (en) Methods and systems for editing of web pages in an application capable of displaying web page content
US8386919B2 (en) System for displaying an annotated programming file
JPS6162170A (en) Compound document editing
JP4911438B2 (en) Operation monitoring device
US20040225658A1 (en) Network-based document management systems
EP1744254A1 (en) Information management device
US20090265372A1 (en) Management of Document Attributes in a Document Managing System
US20080040677A1 (en) HMI Development Support Apparatus, HMI Development Support Method and HMI Development Support Program
US7017121B1 (en) Method for visual display unit-based definition and parametrization of interfaces
JPH07239850A (en) Structured document preparation supporting system
US8495600B2 (en) Display method, corresponding computer program and device
CN114330378A (en) Method for configuring software engineering custom language library and system for implementing same
EP1744271A1 (en) Document processing device
CN113407678B (en) Knowledge graph construction method, device and equipment
JPH08161342A (en) Data base display device
CN101788977A (en) Method for implementing editing and modifying of medical examination report
WO2008090420A1 (en) System and method of content and translations management in multi-language enabled applications
JP2006276912A (en) Device, method, and program for editing document
EP1447756B1 (en) Network-based document management system
KR100327904B1 (en) System and Method for Component Customization
JPH08153111A (en) Hypermedia system and hypermedia document preparing and editing method
WO2022107228A1 (en) Operation assistance device, operation assistance method, and operation assistance program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination