Method for configuring software engineering custom language library and system for implementing the method

By introducing engineering custom language library methods and systems into the configuration software, the problem of cumbersome text translation in the configuration software is solved, the custom language library configuration and multi-language display of the configuration software are realized, and the user experience and translation efficiency are improved. accuracy.

CN114330378BActive Publication Date: 2024-10-22GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111590897.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-22
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

Existing configuration software text translation requires technical personnel to configure it themselves, which is a cumbersome and error-prone process and cannot effectively adapt to the display needs of different languages.

Method used

By introducing engineering custom language library methods and systems into the configuration software, object types are detected, multi-language component object collections are created, interactive interfaces are provided for translation configuration of text objects, and automatic synchronization of objects and storage of translation statements are realized.

Benefits of technology

It realizes the custom language library configuration of the configuration software, simplifies multi-language display, improves user experience, reduces the possibility of translation errors, and supports users from different countries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330378B_ABST
    Figure CN114330378B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for configuring a custom language library for software engineering and a system for implementing the method. The method for configuring a custom language library for software engineering includes: when a user adds an object to a project being built or deletes an object from a project being built, detecting the type of the object; if the type of the object is a text object, adding the text object to a multilingual component object set or deleting the corresponding text object from the multilingual component object set; when creating a custom language library corresponding to a new language, traversing the multilingual component object set, creating a new language attribute for each text object in the multilingual component object set, for the user to input a translation sentence corresponding to the new language. The present invention can create a custom language library for each project, facilitating the management and synchronization of the translation text of each project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of configuration software, and in particular to a method for configuring a custom language library for a configuration software engineering and a system for implementing the method. Background Art

[0002] Configuration software collects data and processes information in the field of automation control, and displays various information in the production process to operators in a graphical way, so that they can observe the information and issue corresponding control instructions to deal with various conditions on site. Due to its wide range of applications, its service objects also cover other countries and even the world, which will put forward new requirements for HMI configuration software engineering to support multi-language display to adapt to different service objects.

[0003] However, existing translations require technical personnel to configure them themselves, which is a cumbersome process and prone to errors.

[0004] Therefore, how to provide a method and system for customizing a language library is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In order to solve the technical problem in the prior art that text translation of configuration software requires technicians to search and process by themselves, the present invention proposes a method for customizing a language library for configuration software engineering and a system for implementing the method.

[0006] The method for configuring a custom language library for software engineering proposed by the present invention comprises:

[0007] When a user adds an object to a project being built or deletes an object from a project being built, detect the type of the object;

[0008] If the type of the object is a text object, the text object is added to the multi-language component object set, or the corresponding text object is deleted from the multi-language component object set;

[0009] When creating a custom language library corresponding to a new language, the multilingual component object set is traversed, and a new language attribute is created for each text object in the multilingual component object set, so that the user can input a translation sentence corresponding to the new language.

[0010] Furthermore, the object includes at least one of a component and a record.

[0011] Furthermore, when the object is initialized, the type of the object can be distinguished by assigning different values ​​to the identification attributes of the object.

[0012] Furthermore, all text objects and their corresponding necessary attributes and new language attributes are displayed in a new interactive interface.

[0013] Furthermore, the method further includes: when traversing the multi-language component object set, classifying each text object in the multi-language component object set and displaying the text objects on different interactive pages.

[0014] Furthermore, the categories in the multi-language component object set include at least one of simple text components, custom text components, fixed text components, data records, alarm records, and operation records.

[0015] Furthermore, when the text of the text object is of a custom edit type, when the user modifies the text of the text object during the project construction process, its property change event is triggered. At this time, the corresponding object is retrieved in the multilingual component object collection and synchronized on the corresponding interactive page.

[0016] Furthermore, when the text of the text object is of the default setting type, after the translation sentence corresponding to any language of the text object is completed and saved in the corresponding interactive interface, the text object of the same basic type in the corresponding interactive page is automatically retrieved and the corresponding translation sentence is synchronized.

[0017] The system proposed by the present invention for implementing the method of configuring a custom language library for software engineering described in the above technical solution comprises:

[0018] An object retrieval module monitors changes in objects in the project being built, and when an object is added or deleted from the project, updates the multilingual component object set so that the text objects in the multilingual component object set are consistent with the project being built;

[0019] The configuration module allows the user to create a new language, and update the text objects in the multi-language component object set to the corresponding translation configuration page, and add the new language attribute to the text object on the translation configuration page.

[0020] Furthermore, it also includes: a synchronization module, which monitors the attribute change events of the custom editable text objects, and after monitoring the attribute change events, synchronously updates the interactive pages involved in the corresponding text objects; and after completing and saving the corresponding translation sentences in any language on the interactive page of the default setting text object, automatically retrieves the text objects of the same basic type in the corresponding interactive page and synchronizes the corresponding translation sentences.

[0021] The present invention will automatically retrieve and obtain text components and records in the HMI configuration software project during the construction of the project, and classify and page the obtained text objects (text components, objects), so that the configuration software can clearly configure the custom language library of the project, and at the same time enable the configuration software to configure the translation of the custom text based on the ID, which is conducive to synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The present invention is described in detail below with reference to the embodiments and accompanying drawings, wherein:

[0023] Figure 1 It is a structural block diagram of an embodiment of the present invention.

[0024] Figure 2 This is the user interface state of an embodiment of the present invention. Figure 1 .

[0025] Figure 3 This is the user interface state of an embodiment of the present invention. Figure 2 .

[0026] Figure 4 This is the user interface state of an embodiment of the present invention. Figure 3 . DETAILED DESCRIPTION

[0027] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0028] Thus, a feature indicated in this specification will be used to illustrate one of the features of an embodiment of the present invention, rather than implying that each embodiment of the present invention must have the described feature. In addition, it should be noted that this specification describes many features. Although some features can be combined together to illustrate possible system designs, these features can also be used in other combinations that are not explicitly described. Thus, unless otherwise stated, the described combinations are not intended to be limiting.

[0029] like Figure 1 As shown, the method of configuring software engineering custom language library of the present invention detects the type of object when a user adds an object to a project being built or deletes an object from a project being built. If the type of the object is a text element, the text object is added to a multilingual element object set or deleted from a multilingual element object set, that is, the text object in the multilingual element object set is consistent with the text object in the project being built. The object referred to in the present invention includes at least one of an element and a record.

[0030] When creating a custom language library corresponding to a new language, the system will traverse the above multilingual component object set and create a new language attribute for each text object in the multilingual component object set, so that the user can enter the translation sentence corresponding to the new language. The new language referred to here is relative to the existing language translation text of the text object. For example, if the text component itself already has English text, then when creating a Chinese custom language library, a Chinese text attribute will be created for each text component. At the same time, the text component has an English text attribute. If on this basis, the user further creates a custom language library corresponding to a new language, such as French, then the system will create a French text attribute based on the original one, so that each text component of this project will have three language attributes, namely, the English text attribute, the content is the English translation of the text; the Chinese text attribute, the content is the Chinese translation of the text; the French text attribute, the content is the French translation of the text.

[0031] Since many objects in the configuration software may have text, that is, when the language is switched, these objects have the need to translate the text, but there is no special function in the configuration software to identify these objects, so they need to be recorded and screened one by one, which is troublesome. In a preferred embodiment, when the object of the configuration software is initialized, the type of the component can be distinguished by assigning different values ​​to the identification attribute of the object. In the specific implementation, when the object is initialized, the HasContent attribute is assigned a value according to whether the object itself has the characteristic of displaying text and is used to distinguish it. In the subsequent detection of whether the object contains text, it can be screened according to this attribute.

[0032] The system will display all text objects and their corresponding necessary attributes and new language attributes in the new interactive interface. In a specific embodiment, the new interactive interface is called a text translation configuration interface. When the text translation configuration interface is opened, the text objects in the multilingual component object collection will be traversed and automatically assigned to the corresponding page of the text translation configuration interface according to the type of the text object, such as Figure 3 In the text translation configuration interface, the categories are: simple text components, custom text components, fixed text components, data records, alarm records, and operation record pages. Simple text components only display one text, such as buttons and labels. Custom text components have multiple texts and all texts are user-defined, such as combo boxes. Fixed text components refer to components with built-in title text display, such as alarm view components. For data record text, when adding a data record item, this data record object is added to the multi-language record object collection. When deleting a data record item, it is simultaneously excluded from the multi-language record object collection. The same applies to alarm records and operation records.

[0033] Since the object itself has a lot of attribute information, the system will filter out unnecessary attribute information, such as object size, color, coordinate position and other attributes that are not related to multilingualism, and only display necessary attributes. For example, the screen position of the text component (that is, the parent window ID of the component), component ID, name, type, text and text to be translated are displayed on the text translation configuration interface, so that key information can be highlighted for reference. Figure 3 The following shows some information about the button component. The same is true for record objects.

[0034] In the text translation configuration interface, a new property "Enable multi-language" will be added to each object. By default, this property is checked. If some texts need to be in a language different from the currently selected language, you can uncheck it to use different language texts in the same project.

[0035] There are two types of text objects: custom edit type and default setting type. Most texts belong to custom edit type, which provides users with sufficient freedom, such as the display content of buttons, labels, combo boxes and other components or the display content of records. Some components also contain default text, such as the title bar content of alarm components.

[0036] The methods of synchronizing text and configuring text translation are also different for these two types.

[0037] When the text of a text object is of custom edit type, when the user modifies the text of the text object during the project construction process, its property change event is triggered. At this time, the corresponding object is retrieved in the multilingual component object collection and synchronized on the corresponding interactive page. For example, when the text of a text component or the text of a record is changed, its property change event is triggered. In this event, the component or record ID of the changing text will be quickly retrieved, and the multilingual object collection will be refreshed synchronously according to the ID, and the text translation configuration interface will be updated.

[0038] When the text of a text object is of the default setting type, after completing and saving the corresponding translation statement of any language of the text object in the corresponding interactive interface, the text object of the same basic type in the corresponding interactive page will be automatically retrieved and the corresponding translation statement will be synchronized. The basic type referred to here refers to the original classification of all components or records in the configuration software. The name of each component or record is the basic type of the component or object. For example, a button is a basic type, and a label is a basic type. For example, in the fixed text component paging of the text translation configuration interface, after the first configuration completes the multi-text translation of a text component, when the configuration subwindow is closed, the components of the same basic type in the current paging will be automatically retrieved and the translation information will be automatically synchronized.

[0039] Through this method, the HMI configuration software engineering can quickly and visually configure the custom language library and realize the multi-language visual configuration of the engineering interface component text to serve users in different countries and improve the user experience.

[0040] The present invention also proposes a system for implementing the method of configuring a custom language library for software engineering of the above technical solution. The system at least comprises an object retrieval module and a configuration module.

[0041] The object retrieval module monitors the changes of objects in the project being built, and when objects are added or deleted from the project, the multilingual component object collection is updated so that the text objects in the multilingual component object collection are consistent with the project being built.

[0042] The configuration module is used for users to create new languages, and update text objects in the multilingual component object collection to the corresponding text translation configuration page, and add new language attributes to the text objects on the text translation configuration page.

[0043] In a preferred embodiment, the system further includes a synchronization module. The synchronization module monitors the attribute change event of the custom editable text object, and after monitoring the attribute change event, synchronizes and updates the interactive page involved in the corresponding text object. And after completing and saving the translation sentence corresponding to any language on the interactive page of the default setting text object, the synchronization module automatically retrieves the text object of the same basic type in the corresponding interactive page and synchronizes the corresponding translation sentence.

[0044] When using the above system and method of the present invention, the user first opens the multi-language configuration window when running the HMI configuration software, such as Figure 2 As shown. Click the Add button to add a new language and create a custom language object. The language object attributes include the language ID and language name, thereby completing the initialization of the corresponding language library. The language name of the generated custom language can be edited. The language ID is a unique identifier and can be used as an index to query the language type. It cannot be edited. Click the Delete button to delete the corresponding language object and the corresponding language library. After adding a new language, the user builds the project and collects the text objects into the multilingual component object collection. When the user needs to configure the translation, such as Figure 3 As shown in the figure, a new language attribute will be added to the end of all text objects on the text translation configuration page, allowing users to add corresponding translation sentences. Figure 4 As shown, custom text components are usually composed of other text components, such as original text components and / or non-text components. The text components in the custom text components need to be set separately as shown in 3, and then only the corresponding display language needs to be selected in the custom text components.

[0045] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for configuring a custom language library for software engineering, characterized in that: include: When a user adds an object to a project being built or deletes an object from a project being built, detect the type of the object; If the type of the object is a text object, the text object is added to the multi-language component object set, or the corresponding text object is deleted from the multi-language component object set; When creating a custom language library corresponding to a new language, traverse the multi-language component object set, create a new language attribute for each text object in the multi-language component object set, and allow the user to input a translation sentence corresponding to the new language; When the text of the text object is of a custom edit type, when the user modifies the text of the text object during the project construction process, its attribute change event is triggered, at which time the corresponding object is retrieved from the multilingual component object collection and synchronized on the corresponding interactive page; When the text of the text object is of the default setting type, after the translation sentence corresponding to any language of the text object is completed and saved in the corresponding interactive interface, the text object of the same basic type in the corresponding interactive page is automatically retrieved and the corresponding translation sentence is synchronized.

2. The method for configuring a custom language library for software engineering as claimed in claim 1, characterized in that: The object includes at least one of a component and a record.

3. The method for configuring a custom language library for software engineering as claimed in claim 1, characterized in that: When an object is initialized, the type of the object can be distinguished by assigning different values ​​to the object's identification properties.

4. The method for configuring a custom language library for software engineering as claimed in claim 1, characterized in that: All text objects and their corresponding necessary properties and new language properties are displayed in the new interactive interface.

5. The method for configuring a custom language library for software engineering as claimed in claim 1, characterized in that: Also includes: When traversing the multi-language component object set, each text object in the multi-language component object set is classified and displayed on different interactive pages.

6. The method for configuring a custom language library for software engineering as claimed in claim 5, characterized in that: The categories in the multi-language component object set include at least one of simple text components, custom text components, fixed text components, data records, alarm records, and operation records.

7. A system for implementing the method for configuring a custom language library for software engineering as claimed in any one of claims 1 to 6, characterized in that: include: An object retrieval module monitors changes in objects in the project being built, and when an object is added or deleted from the project, updates the multilingual component object set so that the text objects in the multilingual component object set are consistent with the project being built; The configuration module allows the user to create a new language, and update the text objects in the multi-language component object set to the corresponding translation configuration page, and add the new language attribute to the text object on the translation configuration page.

8. The system according to claim 7, characterized in that Also includes: The synchronization module monitors the attribute change events of the custom editable text objects, and after monitoring the attribute change events, synchronizes and updates the interactive pages involved in the corresponding text objects; and after completing and saving the corresponding translation statements in any language on the interactive page of the default setting text object, automatically retrieves the text objects of the same basic type in the corresponding interactive page and synchronizes the corresponding translation statements.