WO2019042349A1 - Translation method, mobile terminal and storage device of operating system framework - Google Patents

Translation method, mobile terminal and storage device of operating system framework Download PDF

Info

Publication number
WO2019042349A1
WO2019042349A1 PCT/CN2018/103216 CN2018103216W WO2019042349A1 WO 2019042349 A1 WO2019042349 A1 WO 2019042349A1 CN 2018103216 W CN2018103216 W CN 2018103216W WO 2019042349 A1 WO2019042349 A1 WO 2019042349A1
Authority
WO
WIPO (PCT)
Prior art keywords
translated
string
character string
translation
database
Prior art date
Application number
PCT/CN2018/103216
Other languages
French (fr)
Chinese (zh)
Inventor
张燕香
钟晓芬
罗小玲
钟双
胡静
崔书中
Original Assignee
捷开通讯(深圳)有限公司
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 捷开通讯(深圳)有限公司 filed Critical 捷开通讯(深圳)有限公司
Publication of WO2019042349A1 publication Critical patent/WO2019042349A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation

Definitions

  • the present invention relates to the field of operating system technologies, and in particular, to a translation method of an operating system framework, a mobile terminal, and a storage device.
  • the internationalization of the operating system framework of electronic products is realized by creating a directory of language resources in product engineering and storing translation files of different national languages.
  • the system can call the corresponding translation file according to the default value or the user's choice to display the corresponding language.
  • the translation files of these different national languages are compiled by the developer on the text displayed on each interface of the operating system, after being summarized, reviewed, and then submitted to a special person for translation, and then imported into the system.
  • the invention provides a translation method of an operating system framework, and the main technical problem is how to reduce the translation time and cost of the electronic product operating system framework.
  • a technical solution adopted by the present invention is to provide a translation method of an operating system framework, including the steps of: importing a character string to be translated in a database of a string to be translated included in the operating system framework;
  • the translated translation string is matched with the translated string database, wherein the successfully translated character string to be translated is a reusable character string, and the translated string corresponding to the reusable character string is a reference string, and the matching
  • the untranslated string to be translated is a non-multiplexable string; extracting reference translation text of the reference string in the translated string database; exporting the reference translation text to the operating system, Providing a translation for the reusable string contained in the operating system framework; deriving the non-multiplexable string; receiving an external translated text of the non-multiplexable string; and exporting the external translated text to
  • the operating system is configured to provide translation for the non-multiplexable string included in the operating system framework.
  • a mobile terminal including a processor and a communication circuit, the processor coupling the communication circuit, wherein the processor can read program data. And performing the following steps: importing a to-be-translated string in the to-be-translated string database included in the operating system framework; matching the to-be-translated string with the translated string database, where the matching is successful
  • the character string is a reusable character string
  • the translated character string corresponding to the reusable character string is a reference character string
  • the untranslated character string to be unsuccessful is a non-reusable character string
  • the reference character string is extracted.
  • Reference translation text in the translated string database exporting the reference translation text to the operating system for providing translations for the reusable string contained in the operating system framework.
  • another technical solution adopted by the present invention is to provide a storage device for storing program data
  • the program data can be loaded and perform the following steps: importing into the operating system framework Translating a string to be translated in the string database; matching the to-be-translated string with the translated string database, wherein the successfully translated string to be translated is a reusable string, the reusable character
  • the translated string corresponding to the string is a reference string, and the untranslated string to be unsuccessful is a non-repeatable string
  • the reference translated text of the reference string in the translated string database is extracted;
  • the reference translated text is exported to the operating system for providing translation for the reusable string contained in the operating system framework.
  • the present invention matches the to-be-translated character string with the translated character string by importing the character to be translated included in the operating system framework, and filters out the reusable character string therein, and then imports the reference string corresponding to the reusable character string.
  • Translate the text and export the reference translated text to the operating system which can be used to provide translated text to the reusable string directly using the reference translated text. Therefore, the present invention can reduce repeated translation of reusable character strings, thereby saving translation costs.
  • FIG. 1 is a flow chart of an embodiment of a translation method of an operating system framework of the present invention
  • FIG. 2 is a flow chart of another embodiment of a translation method of an operating system framework of the present invention.
  • FIG. 3 is a flow chart of an embodiment of a sub-step of matching a string to be translated with a translated string database in the translation method of FIG. 1 or FIG. 2;
  • FIG. 4 is a structural diagram of an embodiment of a mobile terminal of the present invention.
  • FIG. 5 is a general flow of product translation according to an embodiment of the present invention.
  • the technical problem mainly solved by the present invention is how to reduce the translation time and cost of the electronic product operating system framework.
  • the embodiments described in the specification are mainly based on the Android system, and some of the elements mentioned are also represented by the name of the Android system, such as the format and content of the character string.
  • the related technical solutions of the present invention can be used not only in the Android system but also in other operating systems, such as an OX system, a Windows system, and the like.
  • each operating system can be used for different kinds of electronic products, such as mobile electronic devices such as mobile phones, tablet computers, smart watches, or other types of electronic devices such as computers and televisions.
  • the system framework translation method shown in FIG. 1 includes the following steps:
  • S101 Import the to-be-translated string in the to-be-translated string database included in the operating system framework.
  • the operating system is an operating system for electronic products, such as an Android system for mobile phones.
  • the system framework in this application refers to the system files of the operating system.
  • the operating system When the operating system is applied to an electronic product, it includes several display interfaces, function modules, and built-in applications. In these display interfaces, function modules, and applications, text information often appears, such as: program name, operation instruction name, and description. Text, etc., these text information is stored in the system file, including the string for the indication and the corresponding display text. When the system process or program is executed, these strings are called and the text information is displayed according to the corresponding display text.
  • Translation in this application can be understood as translating a string into a specific language that conforms to general reading and writing habits, or translating a translated text of one language into a translated text of another language.
  • the string database to be translated refers to a collection of strings to be translated, and should not be understood as a specific data structure.
  • the string database to be translated may include all the strings to be translated of the operating system framework, and may also include some to-be-translated strings of the operating system framework.
  • the method for importing the to-be-translated character string in the to-be-translated string database included in the operating system framework in step S101 may be: identifying the system file, and finding a file or folder storing the string to be translated, The string to be translated is imported.
  • the import method may be to import a table or database file containing a string to be translated, such as an excel table.
  • the method of importing may also be: manually inputting a character string to be translated by an operator.
  • S102 Matching the to-be-translated string with the translated string database, wherein the successfully-matched string to be translated is a reusable string, and the translated string corresponding to the reusable string is a reference string, and the matching is unsuccessful.
  • the string to be translated is a non-multiplexable string.
  • the translated string database is a database of strings having corresponding translated text, and the corresponding translated text includes translated text of at least one language.
  • the translated string database can be a database stored in the translation system, in which the string and the corresponding translated text can be edited, modified, or the translated string data can also be imported by importing the translated string and the corresponding reference translated text. generate.
  • a translated string database can be generated by importing a string in the Android 1.0 system framework and corresponding texts in multiple languages.
  • step S102 the character string to be translated is matched with the translated character string database. Match all or part of the to-be-translated string in the database to be translated to the translated string database as needed. For a string to be translated, if the corresponding translated string is matched in the translated string database, the match is considered successful, otherwise the match fails. A string to be translated that is successfully matched is called a reusable string, and the corresponding translated string is a reference string. The unsuccessfully translated string to be translated is called a non-multiplexable string.
  • the character string to be translated in the string database to be translated may be divided into one or several reusable character strings, and/or one or several non-reusable character strings.
  • the string to be translated may not include the translated text corresponding to the string to be translated.
  • the developer only designs the string used in the system, and has not entered any of the strings.
  • Translated text of the language In this case, in the process of matching the to-be-translated string with the translated string database, the to-be-translated string is matched with the translated string in the translated string database, and the specific matching algorithm can be based on actual needs. Determining, for example, an exhaustive search can be used to match the string to be translated one by one with the translated string, or other algorithms for optimizing search efficiency can be used to find the translated string that is the same or closest to the string to be translated. The string to be translated is then matched against the translated string.
  • the string to be translated matches the translated string successfully.
  • “Equivalent to” may include that the string to be translated is exactly the same as the translated string, or that the string to be translated has the same number of substrings as the translated string, and the substring of the string to be translated and the translated character
  • the substring of the string is consistent, where the substring is a number of strings separated by a separator in the original string. For example, a translated string S:LockScreen:text_food is taken as an example.
  • the string to be translated is exactly the same, that is, the string to be translated is also S:LockScreen:text_food
  • the character to be translated The string is equivalent to the translated string.
  • the string to be translated is S:LockScreen%text_food or S:text_food%LockScreen
  • the string to be translated has a substring S consistent with the translated string.
  • text, food, and LockScreen in this case, the string to be translated can also be considered equivalent to the translated string.
  • the separator can be a system default, such as all symbols except English letters and numbers, or can be specified by the developer. For example, if the developer specifies the separators as "%" and ":”, then the preceding translated string S:LockScreen: The substring of text_food becomes S, LockScreen, and text_food.
  • the developer may further confirm whether the match is successful. Therefore, in the case where the string to be translated is equivalent to a translated string in the translated string database, the operation as shown in FIG. 3 is also performed, namely:
  • S301 Output candidate information.
  • the candidate information includes at least the character string to be translated, and optionally, a translated string equivalent to the translated text corresponding to the translated string, which is suitable for the developer to check.
  • the candidate information is sent to the corresponding personnel to remind the corresponding personnel to review, and after the audit is completed, the process proceeds to step S302.
  • S302 Receive confirmation information of the candidate information, and confirm, according to the confirmation information, that the to-be-translated string is successfully matched or the matching is unsuccessful.
  • the form of the confirmation information corresponds to the alternative information. For example, if the candidate information is sent to the developer for confirmation in a tabular form, the developer can specify the row/line character in the specified row/column in the table. The string is confirmed, marked with "yes” or "no", or, if the alternative information is a notification box for selecting a selection for each character string to be confirmed on the program interface, it is judged according to the result selected by the developer. It is to be understood that the alternative information and the confirmation information are not limited to the above forms.
  • step S103 is performed.
  • the reference string is a translated string corresponding to the reusable string, which has translated text of at least one language in the translated string database.
  • the translated text of the reference character string in one, part or all of the translated character string database such as English translation and/or Chinese translation, is extracted as needed, in the subsequent steps, corresponding
  • the reusable string provides translation.
  • the extracted reference translation text can be stored in a database/form with reusable strings, or can be stored separately, as long as they can be matched in the process of storage and reading. It can be understood that “extraction” does not necessarily change the storage location of the reference translated text, or it may be stored in a location mark for subsequent calls.
  • the reference translated text includes translations in at least two different languages to provide resource text needed for the internationalization of the operating system framework.
  • step S104 the reference translation text extracted from the translated string database is exported to a system file of the operating system, and may be stored in a specified location under the system file directory of the operating system, such as a different country under the res directory of the Android system. And strings.xml or arrays.xml in the language resource directory.
  • the translation resource corresponding to the multiplexable character string is stored in the operating system file, and when the specific language text corresponding to the multiplexable character string needs to be displayed, the translated text of the corresponding language can be called.
  • the invention imports the to-be-translated string in the to-be-translated string database included in the operating system framework, and matches the to-be-translated string with the translated string database to obtain a reference translated text of the reusable string and the reference string.
  • the reference translated text can then be exported to the operating system to provide translation for the reusable string contained in the operating system framework. Therefore, the present invention can reduce the cost of translation.
  • FIG. 2 illustrates another embodiment of a translation method of the operating system framework of the present application.
  • the translation method of the embodiment of FIG. 2 includes:
  • S201 Import the to-be-translated string in the to-be-translated string database included in the operating system framework.
  • S202 Import a first translation corresponding to the to-be-translated string in the to-be-translated string database included in the operating system framework.
  • the to-be-translated string database may include a first translation corresponding to the string to be translated.
  • a first translation such as a Chinese translation text
  • steps S201 and S202 are embodied in the order of the preceding and succeeding, they may be simultaneously performed in the actual process.
  • S203 Matching the to-be-translated string with the translated string database: matching the to-be-translated string and the corresponding first translation with the translated string in the translated string database and the corresponding reference first translation.
  • the successfully translated string to be translated is a multiplexable string, and the translated string corresponding to the multiplexable string is a reference string, and the unsuccessfully translated string to be translated is a non-reusable string.
  • the reference first translation is a translated text of the translated string, which is the same language as the first translation of the string to be translated.
  • step S203 similar to step S102, the character string to be translated is matched with the translated character string database, except that the matching process also considers the first translation and the reference first translation.
  • the to-be-translated string matches the translated string successfully.
  • the meaning of "equivalent to” has been explained in the foregoing and will not be repeated here. That is to say, if the strings are "equivalent” to each other and the translated texts of the corresponding specific languages are identical, the matching is considered successful, and the to-be-translated string is a reusable string.
  • Table 1 shows a part of a translated string database, in which there are at least three languages for the strings contained in an operating system framework, namely translated text in Chinese, English, and French.
  • the operation shown in FIG. 3 is performed, ie The candidate information is output and then the confirmation information of the candidate information is received, and according to the confirmation information, it is confirmed that the to-be-translated string is successfully matched or the matching is unsuccessful. That is to say, although the string to be translated is consistent with the translated string, the translation of one of their languages is different, which may be due to different requirements for different operating system products, if the character to be translated is considered at this time. Strings can be reused and errors can occur. Therefore, by means of alternative information, the developer can further determine whether the string to be translated can be reused to avoid translation errors.
  • the string to be translated is S:LockScreen:text_food
  • the Chinese translation is "food”
  • the Chinese translation is inconsistent.
  • the developer judges whether the match is successful. In this example, although "food” is inconsistent with "food”, it can be considered that the translation of other languages should be reusable, so the developer can confirm that the match is successful.
  • the threshold also performs the operation shown in FIG. 3, that is, outputs the candidate information and then receives the confirmation information of the candidate information, and confirms that the to-be-translated string matches successfully or the matching is unsuccessful according to the confirmation information. That is, although the strings to be translated are inconsistent with the translated strings, the translation of one of their languages is consistent, which may be due to the fact that developers use different strings to represent the same meaning for different operating system products.
  • the system architecture element wastes the existing translation resources if it is considered that the to-be-translated string cannot be reused at this time.
  • a length threshold can be set, only in the first If the length of a translation is greater than the threshold, it is considered that the candidate information needs to be output.
  • English may be set to 2 or 3 English words
  • Chinese may be set to 2, 3 or 5 words.
  • the string to be translated is S:LockScreen:text_Play, it is not equivalent to the translated string S:Music:Play in Table 1, but the English translation is "Play", and the English "play” is translated into Chinese.
  • the threshold is further judged, for example, if the length threshold of the English translation is two. English words, because the English translation "Play” of the string to be translated has only one English word, it does not meet the conditions and will not output alternative information. In contrast, if the string to be translated is S:Show: WLAN_title and the English translation is "WLAN title”, then the condition is met and the output candidate information is left to the developer to judge.
  • step S203 By performing step S203, matching the to-be-translated character string and the corresponding first translation with the translated character string in the translation string database and the corresponding reference first translation, a more accurate matching result can be obtained, and some missing can be avoided. Use strings, and avoid misresolving some non-multiplexable strings as reusable.
  • Steps S204 and S205 are similar to S103 and S104, respectively, and are not described herein again.
  • the unsuccessful matching string that is, the non-multiplexable character string
  • the non-reusable strings can be sent to the developer of the operating system framework in the form of a list in which the developer adds and/or labels the appropriate information and sends it to the person responsible for the translation, by the person responsible for the translation.
  • Translation providing translations of at least two countries and languages of non-reusable strings, ie externally translated text of non-reusable strings.
  • S207 Receive external translated text of the non-multiplexable string.
  • S208 Export the external translated text to an operating system for providing translation for the non-multiplexable string included in the operating system framework.
  • the external translated text of the non-multiplexable character string is received, and the external translated text is exported to the system file of the operating system, so that the translation resource corresponding to the non-multiplexable character string is stored in the operation.
  • the system file when it is necessary to display a specific language text corresponding to the non-reusable character string, the translated text of the corresponding language may be called.
  • the reusable string and the non-reusable string in the to-be-translated string database are all "translated", that is, the translation resources of the corresponding multiple languages are stored in the operating system file for calling.
  • steps S206 to S208 are also applicable to the case where the translated text of any language that does not include the character string to be translated is not included in the string database to be translated, in which case the external
  • the translated text can only provide a translation of the language to be translated in one language.
  • translations in multiple languages can also be provided.
  • the mobile terminal 400 includes a communication bus 401, a processor 402, a memory 403, and a communication circuit 404.
  • Processor 402, memory 403, and communication circuitry 404 communicate signals over communication bus 401, and processor 402 can obtain external information, such as operations for import and/or export, via communication circuitry 404.
  • the memory 403 holds program data, and the program data can be loaded by the processor 502 and execute the translation method of the operating system of any of the above embodiments. It can be understood that in some other embodiments, the program data may not be stored in the mobile terminal 400, but the method of any of the above embodiments may be performed by combining the mobile terminal 400 with a network.
  • FIG. 5 is a schematic diagram of an overall translation process of a translation method of an operating system framework according to the present invention.
  • developers can first determine if a new operating system product can be shared with an existing operating system product. If it can be shared, that is, the old and new products are basically the same, then there is no need to go through the translation system to further judge whether there are new functions. If there is no new function, you can directly use the translated text resources of the old products and import them into the new product project.
  • the new feature allows the developer to submit the string needed for the new feature, which is sent to the appropriate translator after review and the returned translated text resource is imported into the new product project.
  • the character string of the new product requirement is imported into the translation system, and the multiplexing is detected according to the method of the above embodiment, and the character string is divided into a reusable character string and a non-reusable character string. Then the developer will determine if there are any new features, and if so, submit the string information needed for the new feature. In addition, the developer needs to improve the string information assigned to the non-reusable part of the respective name, for example, Add the corresponding comments to. Then, the above information is sent to the corresponding auditor for review. After the audit is passed, the non-reusable strings that need external translation are exported, translated by the corresponding translators, and finally the translated texts are imported into the translation system and further exported to the new one. In product engineering, the corresponding multi-language translated text is provided for all strings contained in the new product project.
  • the flow shown in FIG. 5 is only one embodiment of the translation method of the operating system framework of the present invention, and is only for explaining and explaining the technical solution of the present invention, and should not be construed as limiting the scope of the present invention.
  • the developer can also use the translation method of the operating system framework of the present invention to formulate other corresponding overall translation processes. For example, the developer can directly determine the product string to be translated from the new operating system product without being judged by the developer. And detect multiplexing to perform the next steps.
  • the functions described in the above embodiments can be stored in a device having a storage function if implemented in software and sold or used as a stand-alone product, that is, the present invention also provides a storage device storing the program.
  • the program data in the storage device can be executed to implement the translation method of the operating system framework in the above embodiments, including but not limited to a USB flash drive, an optical disk, a server, a hard disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The present application describes a translation method, a mobile terminal, and a storage device of an operating system framework, the method comprising: importing a string to be translated in a database of strings to be translated contained in the operating system framework; match the string to be translated against a translated string database, wherein a string to be translated that is successfully matched is regarded as a reusable string, a translated string corresponding to the reusable string is regarded as a reference string, and a string to be translated that is not successfully matched is regarded as a non-reusable string; extracting reference translation text of the reference string in the translated string database; exporting the reference translation text to the operating system to provide a translation for the reusable string contained in the operating system framework. The invention can reduce repeated translation of reusable strings, thereby saving translation costs.

Description

操作系统框架的翻译方法、移动终端和存储装置Operating system framework translation method, mobile terminal and storage device 技术领域Technical field
本发明涉及操作系统技术领域,特别是涉及一种操作系统框架的翻译方法、移动终端和存储装置。The present invention relates to the field of operating system technologies, and in particular, to a translation method of an operating system framework, a mobile terminal, and a storage device.
背景技术Background technique
如今,各类移动电子产品发展迅速,越来越多的移动电子产品进入国际市场。在这样的情况下,需要将这些电子产品的操作系统的框架翻译为对应国家使用的语言,也就是说使电子产品操作系统的显示界面中的文字符合对应国家使用的文字,建立资源国际化框架。通常来说,电子产品操作系统框架的国际化,是通过在产品工程中创建语言资源目录,并在其中存储不同国家语种的翻译文件来实现的。系统可根据默认值或者用户的选择,调用相应的翻译文件从而显示相应的语言。这些不同国家语种的翻译文件,是由开发人员对操作系统每个界面上显示的文字进行整理,经过汇总、审核,而后提交给专人翻译,进而导入系统后得到的。Nowadays, all kinds of mobile electronic products are developing rapidly, and more and more mobile electronic products are entering the international market. Under such circumstances, it is necessary to translate the framework of the operating system of these electronic products into the language used by the corresponding country, that is, to make the text in the display interface of the electronic product operating system conform to the text used by the corresponding country, and establish a resource internationalization framework. . Generally speaking, the internationalization of the operating system framework of electronic products is realized by creating a directory of language resources in product engineering and storing translation files of different national languages. The system can call the corresponding translation file according to the default value or the user's choice to display the corresponding language. The translation files of these different national languages are compiled by the developer on the text displayed on each interface of the operating system, after being summarized, reviewed, and then submitted to a special person for translation, and then imported into the system.
在对现有技术的实践过程中,本发明的发明人发现,制作传统的电子产品操作系统国际化框架的过程中,由于对所有的文字都要进行整理、翻译,涉及到相当大的工作量,成本很高且花费时间长。另外,以往的经验表明,新产品的操作系统框架中往往与旧产品的操作系统框架中包含部分相同的、或者翻译可以共用的内容,对这部分内容的重复翻译会造成翻译成本的提升且浪费翻译时间。因此,需要一种可以减少操作系统框架的翻译时间和成本的方法。In the practice of the prior art, the inventors of the present invention found that in the process of making a traditional electronic product operating system internationalization framework, since all the texts have to be collated and translated, a considerable amount of work is involved. It is costly and takes a long time. In addition, past experience has shown that the operating system framework of new products often contains the same content as the operating system framework of the old product, or the content that can be shared by the translation. Repeated translation of this part of the content will increase the translation cost and waste. Translation time. Therefore, there is a need for a method that can reduce the translation time and cost of the operating system framework.
发明内容Summary of the invention
本发明提供一种操作系统框架的翻译方法,主要解决的技术问题是如何减少电子产品操作系统框架的翻译时间和成本。The invention provides a translation method of an operating system framework, and the main technical problem is how to reduce the translation time and cost of the electronic product operating system framework.
为解决上述技术问题,本发明采用的一个技术方案是提供一种操作系统框架的翻译方法,包括步骤:导入所述操作系统框架所含的待翻译字符串数据库 中的待翻译字符串;将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述可复用字符串提供翻译;导出所述不可复用字符串;接收所述不可复用字符串的外部翻译文本;将所述外部翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述不可复用字符串提供翻译。In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a translation method of an operating system framework, including the steps of: importing a character string to be translated in a database of a string to be translated included in the operating system framework; The translated translation string is matched with the translated string database, wherein the successfully translated character string to be translated is a reusable character string, and the translated string corresponding to the reusable character string is a reference string, and the matching The untranslated string to be translated is a non-multiplexable string; extracting reference translation text of the reference string in the translated string database; exporting the reference translation text to the operating system, Providing a translation for the reusable string contained in the operating system framework; deriving the non-multiplexable string; receiving an external translated text of the non-multiplexable string; and exporting the external translated text to The operating system is configured to provide translation for the non-multiplexable string included in the operating system framework.
为解决上述技术问题,本发明采用的另一个技术方案是,提供一种移动终端,包括处理器和通信电路,所述处理器耦合所述通信电路,其中,所述处理器可读取程序数据,执行以下步骤:导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串;将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述可复用字符串提供翻译。In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a mobile terminal including a processor and a communication circuit, the processor coupling the communication circuit, wherein the processor can read program data. And performing the following steps: importing a to-be-translated string in the to-be-translated string database included in the operating system framework; matching the to-be-translated string with the translated string database, where the matching is successful The character string is a reusable character string, and the translated character string corresponding to the reusable character string is a reference character string, and the untranslated character string to be unsuccessful is a non-reusable character string; and the reference character string is extracted. Reference translation text in the translated string database; exporting the reference translation text to the operating system for providing translations for the reusable string contained in the operating system framework.
为解决上述技术问题,本发明采用的又一个技术方案是,提供一种存储装置,用于存储程序数据,所述程序数据可被加载并执行以下步骤:导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串;将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述可复用字符串提供翻译。In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a storage device for storing program data, the program data can be loaded and perform the following steps: importing into the operating system framework Translating a string to be translated in the string database; matching the to-be-translated string with the translated string database, wherein the successfully translated string to be translated is a reusable string, the reusable character The translated string corresponding to the string is a reference string, and the untranslated string to be unsuccessful is a non-repeatable string; the reference translated text of the reference string in the translated string database is extracted; The reference translated text is exported to the operating system for providing translation for the reusable string contained in the operating system framework.
本发明通过导入操作系统框架所含的待翻译字符,将待翻译字符串与已翻译字符串匹配,筛选出其中的可复用字符串,进而导入可复用字符串对应的参考字符串的参考翻译文本,并将参考翻译文本导出至操作系统,可以直接使用参考翻译文本对可复用字符串提供翻译文本。因此,本发明可以减少可以复用的字符串的重复翻译,从而节约翻译成本。The present invention matches the to-be-translated character string with the translated character string by importing the character to be translated included in the operating system framework, and filters out the reusable character string therein, and then imports the reference string corresponding to the reusable character string. Translate the text and export the reference translated text to the operating system, which can be used to provide translated text to the reusable string directly using the reference translated text. Therefore, the present invention can reduce repeated translation of reusable character strings, thereby saving translation costs.
附图说明DRAWINGS
图1是本发明操作系统框架的翻译方法一实施例的流程图;1 is a flow chart of an embodiment of a translation method of an operating system framework of the present invention;
图2是本发明操作系统框架的翻译方法另一实施例的流程图;2 is a flow chart of another embodiment of a translation method of an operating system framework of the present invention;
图3是如图1或图2的翻译方法中将待翻译字符串与已翻译字符串数据库匹配的子步骤一实施例的流程图;3 is a flow chart of an embodiment of a sub-step of matching a string to be translated with a translated string database in the translation method of FIG. 1 or FIG. 2;
图4是本发明移动终端一实施例的结构图;4 is a structural diagram of an embodiment of a mobile terminal of the present invention;
图5是本发明一实施例的产品翻译总体流程。FIG. 5 is a general flow of product translation according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施方式对本发明进行详细说明。The invention will now be described in detail in conjunction with the drawings and embodiments.
本发明主要解决的技术问题是如何减少电子产品操作系统框架的翻译时间和成本。为了清楚地解释本发明的原理和相关的步骤,说明书中描述的实施例主要基于Android系统,提到的一些要素也以在Android系统的名称来表示,例如字符串的格式和内容。可以理解的是,本发明相关的技术方案不仅可被用于Android系统,也可以被用于其他的操作系统,例如OX系统、Windows系统等。其中,各操作系统可以被用于不同种类的电子产品,例如手机、平板电脑、智能手表等移动电子设备,或者计算机、电视等其他类型的电子设备。The technical problem mainly solved by the present invention is how to reduce the translation time and cost of the electronic product operating system framework. In order to clearly explain the principles of the present invention and related steps, the embodiments described in the specification are mainly based on the Android system, and some of the elements mentioned are also represented by the name of the Android system, such as the format and content of the character string. It can be understood that the related technical solutions of the present invention can be used not only in the Android system but also in other operating systems, such as an OX system, a Windows system, and the like. Among them, each operating system can be used for different kinds of electronic products, such as mobile electronic devices such as mobile phones, tablet computers, smart watches, or other types of electronic devices such as computers and televisions.
请参阅图1,图1展示的系统框架翻译方法包括以下步骤:Referring to FIG. 1, the system framework translation method shown in FIG. 1 includes the following steps:
S101:导入操作系统框架所含的待翻译字符串数据库中的待翻译字符串。S101: Import the to-be-translated string in the to-be-translated string database included in the operating system framework.
操作系统是用于电子产品的操作系统,例如用于手机的Android系统。本申请中的系统框架是指操作系统的系统文件。当操作系统应用于电子产品时,包含若干显示界面、功能模块以及自带应用程序等,在这些显示界面、功能模块和应用程序中常常会出现文字信息,例如:程序名称、操作指令名称以及说明文字等,这些文字信息存储于系统文件中,包括用于指示的字符串以及对应的显示文字。在系统进程或者程序执行时,调用这些字符串,并根据对应的显示文字来显示文字信息。在开发新产品操作系统,需要将这些用于指示的字符串对应的显示文字录入系统文件中,例如Android系统文件的res目录,这些 用于指示的字符串即为待翻译字符串,对应的显示文字即为翻译文本,如果操作系统需要提供多种语言环境,那么就需要录入多种语言的翻译文本。本申请中的“翻译”可以理解为将字符串翻译为符合一般读写习惯的特定语言文字,或者将一种语言的翻译文本翻译为另一种/几种语言的翻译文本。The operating system is an operating system for electronic products, such as an Android system for mobile phones. The system framework in this application refers to the system files of the operating system. When the operating system is applied to an electronic product, it includes several display interfaces, function modules, and built-in applications. In these display interfaces, function modules, and applications, text information often appears, such as: program name, operation instruction name, and description. Text, etc., these text information is stored in the system file, including the string for the indication and the corresponding display text. When the system process or program is executed, these strings are called and the text information is displayed according to the corresponding display text. In the development of a new product operating system, it is necessary to input the display text corresponding to the indicated character string into the system file, for example, the res directory of the Android system file, and the string for indicating is the character to be translated, and the corresponding display The text is translated text. If the operating system needs to provide multiple language environments, then you need to enter translated text in multiple languages. "Translation" in this application can be understood as translating a string into a specific language that conforms to general reading and writing habits, or translating a translated text of one language into a translated text of another language.
需要注意地是,待翻译字符串数据库是指待翻译字符串的集合,而并不应被理解为某种特定的数据结构。待翻译字符串数据库可以包括操作系统框架的所有待翻译字符串,也可以包括操作系统框架的部分待翻译字符串。在一些实施例中,步骤S101导入操作系统框架所含的待翻译字符串数据库中的待翻译字符串的方法可以为:对系统文件进行识别,找到存储待翻译字符串的文件或文件夹,将其中的待翻译字符串导入。在另一些实施例中,导入方法可以为,导入包含待翻译字符串的表格或者数据库文件,例如excel表。在其他一些实施例中,导入的方法还可以为,由操作人员手动录入待翻译的字符串。It should be noted that the string database to be translated refers to a collection of strings to be translated, and should not be understood as a specific data structure. The string database to be translated may include all the strings to be translated of the operating system framework, and may also include some to-be-translated strings of the operating system framework. In some embodiments, the method for importing the to-be-translated character string in the to-be-translated string database included in the operating system framework in step S101 may be: identifying the system file, and finding a file or folder storing the string to be translated, The string to be translated is imported. In other embodiments, the import method may be to import a table or database file containing a string to be translated, such as an excel table. In some other embodiments, the method of importing may also be: manually inputting a character string to be translated by an operator.
S102:将待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的待翻译字符串为可复用字符串,可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的待翻译字符串为不可复用字符串。S102: Matching the to-be-translated string with the translated string database, wherein the successfully-matched string to be translated is a reusable string, and the translated string corresponding to the reusable string is a reference string, and the matching is unsuccessful. The string to be translated is a non-multiplexable string.
已翻译字符串数据库是已具有对应的翻译文本的字符串的数据库,对应的翻译文本包括至少一种语言的翻译文本。已翻译字符串数据库可以是翻译系统内存储的数据库,其中的字符串和对应的翻译文本可以被编辑、修改,或者,已翻译字符串数据也可以通过导入已翻译字符串以及对应的参考翻译文本生成。举例说明如下,在对Android 2.0系统框架国际化过程中,可以通过导入Android 1.0系统框架中的字符串以及对应的多种语言翻译文本,从而生成已翻译字符串数据库。The translated string database is a database of strings having corresponding translated text, and the corresponding translated text includes translated text of at least one language. The translated string database can be a database stored in the translation system, in which the string and the corresponding translated text can be edited, modified, or the translated string data can also be imported by importing the translated string and the corresponding reference translated text. generate. For example, in the process of internationalizing the Android 2.0 system framework, a translated string database can be generated by importing a string in the Android 1.0 system framework and corresponding texts in multiple languages.
在步骤S102中,将待翻译字符串与已翻译字符串数据库匹配。根据需要,将待翻译字符串数据库中的全部或者部分待翻译字符串与已翻译字符串数据库匹配。对于一条待翻译字符串,如果在已翻译字符串数据库中匹配到对应的已翻译字符串,则认为匹配成功,否则匹配失败。匹配成功的待翻译字符串称为可复用字符串,其对应的已翻译字符串为参考字符串,匹配不成功的待翻译字符串称为不可复用字符串。经过步骤S102,可将待翻译字符串数据库中的待翻译字符串划分为一条或若干条可复用字符串,和/或一条或若干条不可复用字 符串。In step S102, the character string to be translated is matched with the translated character string database. Match all or part of the to-be-translated string in the database to be translated to the translated string database as needed. For a string to be translated, if the corresponding translated string is matched in the translated string database, the match is considered successful, otherwise the match fails. A string to be translated that is successfully matched is called a reusable string, and the corresponding translated string is a reference string. The unsuccessfully translated string to be translated is called a non-multiplexable string. After step S102, the character string to be translated in the string database to be translated may be divided into one or several reusable character strings, and/or one or several non-reusable character strings.
其中,待翻译字符串数据库可不包括待翻译字符串对应的翻译文本,例如,对于一个新的操作系统产品,开发人员仅设计了系统内使用到的字符串,还没有录入字符串的任何一种语言的翻译文本。在这种情况下,在将待翻译字符串与已翻译字符串数据库匹配的过程中,将待翻译字符串与已翻译字符串数据库中的已翻译字符串匹配,具体的匹配算法可根据实际需要确定,例如可采用穷举式搜索将待翻译字符串逐一与已翻译字符串匹配,或者也可以使用其他优化搜索效率的算法,以找到与待翻译字符串相同或者最接近的已翻译字符串,进而待翻译字符串与这条已翻译字符串进行匹配。The string to be translated may not include the translated text corresponding to the string to be translated. For example, for a new operating system product, the developer only designs the string used in the system, and has not entered any of the strings. Translated text of the language. In this case, in the process of matching the to-be-translated string with the translated string database, the to-be-translated string is matched with the translated string in the translated string database, and the specific matching algorithm can be based on actual needs. Determining, for example, an exhaustive search can be used to match the string to be translated one by one with the translated string, or other algorithms for optimizing search efficiency can be used to find the translated string that is the same or closest to the string to be translated. The string to be translated is then matched against the translated string.
在一些实施例中,若待翻译字符串等同于已翻译字符串数据库中的一条已翻译字符串,则待翻译字符串与该条已翻译字符串匹配成功。“等同于”可以包括,待翻译字符串与已翻译字符串完全一致,或者待翻译字符串与已翻译字符串具有相同数量的子字符串,且待翻译字符串的子字符串与已翻译字符串的子字符串一致,其中,子字符串是原字符串中由分隔符分割成的若干条字符串。举例说明如下,以一条已翻译字符串S:LockScreen:text_food为例,在一种情况下,如果待翻译字符串与其完全一致,即待翻译字符串也为S:LockScreen:text_food,则待翻译字符串等同于已翻译字符串,在另外一种情况下,比如待翻译字符串为S:LockScreen%text_food或者S:text_food%LockScreen,那么待翻译字符串具有与已翻译字符串一致的子字符串S、text、food以及LockScreen,此时也可以认为待翻译字符串等同于已翻译字符串。分割符可以是系统默认值,例如所有除英文字母及数字外的符号,也可以由开发人员指定,例如,若开发人员指定分割符为“%”和“:”,那么前面的已翻译字符串S:LockScreen:text_food的子字符串就变为S、LockScreen和text_food。In some embodiments, if the string to be translated is equivalent to a translated string in the translated string database, the string to be translated matches the translated string successfully. "Equivalent to" may include that the string to be translated is exactly the same as the translated string, or that the string to be translated has the same number of substrings as the translated string, and the substring of the string to be translated and the translated character The substring of the string is consistent, where the substring is a number of strings separated by a separator in the original string. For example, a translated string S:LockScreen:text_food is taken as an example. In one case, if the string to be translated is exactly the same, that is, the string to be translated is also S:LockScreen:text_food, the character to be translated The string is equivalent to the translated string. In another case, such as the string to be translated is S:LockScreen%text_food or S:text_food%LockScreen, then the string to be translated has a substring S consistent with the translated string. , text, food, and LockScreen, in this case, the string to be translated can also be considered equivalent to the translated string. The separator can be a system default, such as all symbols except English letters and numbers, or can be specified by the developer. For example, if the developer specifies the separators as "%" and ":", then the preceding translated string S:LockScreen: The substring of text_food becomes S, LockScreen, and text_food.
在另一些实施例中,为进一步避免翻译错误,也可以由开发人员进一步确认是否匹配成功。因此,在待翻译字符串等同于已翻译字符串数据库中的一条已翻译字符串的情况下,还执行如图3所示的操作,即:In other embodiments, to further avoid translation errors, the developer may further confirm whether the match is successful. Therefore, in the case where the string to be translated is equivalent to a translated string in the translated string database, the operation as shown in FIG. 3 is also performed, namely:
S301:输出备选信息。备选信息至少包括该条待翻译字符串,可选地,还可以包括与之等同的已翻译字符串和该已翻译字符串对应的翻译文本,以利于 开发人员核对为准。备选信息被发送给相应人员,提醒相应人员审核,审核完成后,继续执行步骤S302。S301: Output candidate information. The candidate information includes at least the character string to be translated, and optionally, a translated string equivalent to the translated text corresponding to the translated string, which is suitable for the developer to check. The candidate information is sent to the corresponding personnel to remind the corresponding personnel to review, and after the audit is completed, the process proceeds to step S302.
S302:接收备选信息的确认信息,根据确认信息,确认待翻译字符串匹配成功或者匹配不成功。确认信息的形式与备选信息对应,例如,若备选信息是以表格形式将待确认的字符串发送给开发人员确认,开发人员可以在表格中的指定行/列对该列/行的字符串进行确认,标注“是”或“否”,或者,若备选信息是在程序界面上对每条待确认的字符串弹出要求选择的通知框,则根据开发人员选择的结果判断。可以理解的是,备选信息和确认信息并不限于上述形式。S302: Receive confirmation information of the candidate information, and confirm, according to the confirmation information, that the to-be-translated string is successfully matched or the matching is unsuccessful. The form of the confirmation information corresponds to the alternative information. For example, if the candidate information is sent to the developer for confirmation in a tabular form, the developer can specify the row/line character in the specified row/column in the table. The string is confirmed, marked with "yes" or "no", or, if the alternative information is a notification box for selecting a selection for each character string to be confirmed on the program interface, it is judged according to the result selected by the developer. It is to be understood that the alternative information and the confirmation information are not limited to the above forms.
继续参考如图1所示的实施例,S102执行完毕后,执行步骤S103。With continued reference to the embodiment shown in FIG. 1, after the execution of S102 is completed, step S103 is performed.
S103:提取参考字符串在已翻译字符串数据库中的参考翻译文本。S103: Extract reference translation text of the reference string in the translated string database.
如上文所述,参考字符串是可复用字符串对应的已翻译字符串,它在已翻译字符串数据库中具有至少一种语言的翻译文本。在步骤S103中,按照需要,提取参考字符串在已翻译字符串数据库中的一种、部分或者全部语言的翻译文本,例如英语翻译和/或中文翻译,以在后续的步骤中,为对应的可复用字符串提供翻译。提取的参考翻译文本可以和可复用字符串存储在一个数据库/表单中,也可以分开存放,只要在存储和读取的过程中能使它们相互对应即可。可以理解的是,“提取”并不一定改变参考翻译文本的存储位置,也可以是将其存储位置标记,以便于后续调用。As described above, the reference string is a translated string corresponding to the reusable string, which has translated text of at least one language in the translated string database. In step S103, the translated text of the reference character string in one, part or all of the translated character string database, such as English translation and/or Chinese translation, is extracted as needed, in the subsequent steps, corresponding The reusable string provides translation. The extracted reference translation text can be stored in a database/form with reusable strings, or can be stored separately, as long as they can be matched in the process of storage and reading. It can be understood that “extraction” does not necessarily change the storage location of the reference translated text, or it may be stored in a location mark for subsequent calls.
在一些实施例中,参考翻译文本包括至少两种不同语言的译文,以提供操作系统框架国际化需要的资源文本。In some embodiments, the reference translated text includes translations in at least two different languages to provide resource text needed for the internationalization of the operating system framework.
S104:将参考翻译文本导出至操作系统,用于为操作系统框架中包含的可复用字符串提供翻译。S104: Export the reference translated text to an operating system for providing translation for the reusable string contained in the operating system framework.
在步骤S104中,将已从已翻译字符串数据库中提取的参考翻译文本导出至操作系统的系统文件,可以存储在操作系统的系统文件目录下的指定位置,比如Android系统的res目录下不同国家和语种资源目录中的strings.xml或arrays.xml。这样一来,就将可复用字符串对应的翻译资源存入了操作系统文件中,在需要显示可复用字符串对应的特定语种文字时,调用对应语种的翻译文 本即可。例如,对于可复用字符串S:LockScreen:text_food,它的参考翻译文本包括英文翻译文本“Food”和中文翻译文本“美食”,那么将参考翻译文本导出至操作系统后,当操作系统需要在界面显示可复用字符串S:LockScreen:text_food的英文文字时,操作系统可调用对应的英文翻译文本,在界面上显示“Food”。In step S104, the reference translation text extracted from the translated string database is exported to a system file of the operating system, and may be stored in a specified location under the system file directory of the operating system, such as a different country under the res directory of the Android system. And strings.xml or arrays.xml in the language resource directory. In this way, the translation resource corresponding to the multiplexable character string is stored in the operating system file, and when the specific language text corresponding to the multiplexable character string needs to be displayed, the translated text of the corresponding language can be called. For example, for the reusable string S:LockScreen:text_food, its reference translation text includes the English translation text "Food" and the Chinese translation text "Gourmet", then after exporting the reference translation text to the operating system, when the operating system needs to When the interface displays the English text of the reusable string S:LockScreen:text_food, the operating system can call the corresponding English translation text and display “Food” on the interface.
本发明通过导入操作系统框架所含的待翻译字符串数据库中的待翻译字符串,并将待翻译字符串与已翻译字符串数据库匹配,得到可复用字符串及参考字符串的参考翻译文本,进而可将参考翻译文本导出至操作系统,以为操作系统框架中包含的该可复用字符串提供翻译。因此,本发明可减少翻译成本。The invention imports the to-be-translated string in the to-be-translated string database included in the operating system framework, and matches the to-be-translated string with the translated string database to obtain a reference translated text of the reusable string and the reference string. The reference translated text can then be exported to the operating system to provide translation for the reusable string contained in the operating system framework. Therefore, the present invention can reduce the cost of translation.
请参阅图2,图2展示了本申请操作系统框架的翻译方法的另一实施例,图2实施例的翻译方法包括:Please refer to FIG. 2. FIG. 2 illustrates another embodiment of a translation method of the operating system framework of the present application. The translation method of the embodiment of FIG. 2 includes:
S201:导入操作系统框架所含的待翻译字符串数据库中的待翻译字符串。S201: Import the to-be-translated string in the to-be-translated string database included in the operating system framework.
S202:导入操作系统框架所含的待翻译字符串数据库中的待翻译字符串对应的第一译文。S202: Import a first translation corresponding to the to-be-translated string in the to-be-translated string database included in the operating system framework.
在图2所示的实施例中,待翻译字符串数据库可包括待翻译字符串对应的第一译文,例如,对于一个新的操作系统产品,开发人员不仅涉及了系统内使用到的字符串,还录入了字符串的至少一种语言的翻译文本。在这种情况下,图2所示的翻译方法用于补充待翻译字符串的至少一部分其他语种的翻译文本。因此,除在步骤S201中导入待翻译字符串外,还可以在步骤S202中导入待翻译字符串对应的已经录入待翻译字符串数据库的第一译文,例如,中文翻译文本。可以被本领域技术人员理解的是,虽然步骤S201与S202的标号体现为前后顺序,在实际的过程中它们也可以是同时执行的。In the embodiment shown in FIG. 2, the to-be-translated string database may include a first translation corresponding to the string to be translated. For example, for a new operating system product, the developer not only refers to the string used in the system, The translated text of at least one language of the string is also entered. In this case, the translation method shown in FIG. 2 is used to supplement the translated text of at least a part of other languages of the character string to be translated. Therefore, in addition to importing the to-be-translated character string in step S201, a first translation, such as a Chinese translation text, that has been entered into the to-be-translated string database corresponding to the character string to be translated may be imported in step S202. It can be understood by those skilled in the art that although the numerals of steps S201 and S202 are embodied in the order of the preceding and succeeding, they may be simultaneously performed in the actual process.
S203:将待翻译字符串与已翻译字符串数据库匹配:将待翻译字符串以及对应的第一译文与已翻译字符串数据库中的已翻译字符串以及对应的参考第一译文匹配。其中,匹配成功的待翻译字符串为可复用字符串,可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的待翻译字符串为不可复用字符串。S203: Matching the to-be-translated string with the translated string database: matching the to-be-translated string and the corresponding first translation with the translated string in the translated string database and the corresponding reference first translation. The successfully translated string to be translated is a multiplexable string, and the translated string corresponding to the multiplexable string is a reference string, and the unsuccessfully translated string to be translated is a non-reusable string.
参考第一译文是已翻译字符串的一个翻译文本,与待翻译字符串的第一译 文是相同的语种。在步骤S203中,与步骤S102类似,将待翻译字符串与已翻译字符串数据库匹配,区别在于,匹配的过程还要考虑第一译文和参考第一译文。The reference first translation is a translated text of the translated string, which is the same language as the first translation of the string to be translated. In step S203, similar to step S102, the character string to be translated is matched with the translated character string database, except that the matching process also considers the first translation and the reference first translation.
在一种情况下,若待翻译字符串等同于已翻译字符串数据库中的一条已翻译字符串,且待翻译字符串的第一译文与已翻译字符串的参考第一译文一致,则待翻译字符串与已翻译字符串匹配成功。“等同于”的意思在前文中已经解释,在此不再赘述。也就是说,如果字符串互相“等同”,而且对应的特定语种的翻译文本一致,则认为匹配成功,该待翻译字符串为可复用字符串。举例说明如下,表1展示了一个已翻译字符串数据库的部分内容,其中对于一个操作系统框架内包含的字符串,至少有三种语言,即中文、英语、法语的翻译文本。若待翻译字符串为S:LockScreen@text_food,且待翻译字符串的法语译文为“Aliment”,则与已翻译字符串S:LockScreen:text_food等同,且法语译文一致,匹配成功。In one case, if the string to be translated is equivalent to a translated string in the translated string database, and the first translation of the string to be translated is consistent with the reference first translation of the translated string, the to-be-translated The string matches the translated string successfully. The meaning of "equivalent to" has been explained in the foregoing and will not be repeated here. That is to say, if the strings are "equivalent" to each other and the translated texts of the corresponding specific languages are identical, the matching is considered successful, and the to-be-translated string is a reusable string. For example, Table 1 shows a part of a translated string database, in which there are at least three languages for the strings contained in an operating system framework, namely translated text in Chinese, English, and French. If the string to be translated is S:LockScreen@text_food, and the French translation of the string to be translated is "Aliment", it is equivalent to the translated string S:LockScreen:text_food, and the French translation is consistent, and the matching is successful.
Figure PCTCN2018103216-appb-000001
Figure PCTCN2018103216-appb-000001
表1Table 1
在另一种情况下,若待翻译字符串等同于已翻译字符串,但是待翻译字符串的第一译文与已翻译字符串的参考第一译文不一致,执行如图3所示的操作,即输出备选信息而后接收备选信息的确认信息,并根据确认信息确认待翻译字符串匹配成功或者匹配不成功。也就是说,虽然待翻译的字符串与已翻译字符串一致,但是它们的一个语种的翻译不一样,这可能是由于对于不同的操作系统产品需求不同导致的,如果此时认为该待翻译字符串可以复用,则可能出现错误。因此,通过备选信息的方式,交由开发人员进一步判断待翻译字符串是 否可以复用,以避免翻译错误。举例说明如下,若待翻译字符串为S:LockScreen:text_food,但其中文翻译是“食物”,则与表1中已翻译字符串S:LockScreen:text_food等同,但中文译文不一致,此时交由开发人员判断是否匹配成功,在这个例子中,虽然“食物”与“美食”不一致,但可以认为它们其他语种的翻译应该可以复用,因此,开发人员可以确认匹配成功。In another case, if the string to be translated is equivalent to the translated string, but the first translation of the string to be translated is inconsistent with the reference first translation of the translated string, the operation shown in FIG. 3 is performed, ie The candidate information is output and then the confirmation information of the candidate information is received, and according to the confirmation information, it is confirmed that the to-be-translated string is successfully matched or the matching is unsuccessful. That is to say, although the string to be translated is consistent with the translated string, the translation of one of their languages is different, which may be due to different requirements for different operating system products, if the character to be translated is considered at this time. Strings can be reused and errors can occur. Therefore, by means of alternative information, the developer can further determine whether the string to be translated can be reused to avoid translation errors. For example, if the string to be translated is S:LockScreen:text_food, but the Chinese translation is "food", it is equivalent to the translated string S:LockScreen:text_food in Table 1, but the Chinese translation is inconsistent. The developer judges whether the match is successful. In this example, although "food" is inconsistent with "food", it can be considered that the translation of other languages should be reusable, so the developer can confirm that the match is successful.
在另一情况下,若待翻译字符串不等同于已翻译字符串,但是待翻译字符串的第一译文与已翻译字符串的参考第一译文一致,且第一译文的长度大于预设的阈值,同样执行如图3所示的操作,即输出备选信息而后接收备选信息的确认信息,并根据确认信息确认待翻译字符串匹配成功或者匹配不成功。也就是说,虽然待翻译的字符串与已翻译字符串不一致,但是它们的一个语种的翻译一致,这可能是由于对于不同的操作系统产品,开发人员选用了不同的字符串来表示相同意义的系统架构元素,如果此时认为该待翻译字符串不可以复用,则浪费了已有的翻译资源。因此,同样通过备选信息的方式,交由开发人员进一步判断待翻译字符串是否可以复用,以避免遗漏可复用的字符串。通常来说,由于同样的文字可能具有不同的意思,对于一个语种的较短的翻译文本,将其翻译为另一个语种往往有几种不同的选择,因此,可设置一个长度阈值,只有在第一译文的长度大于阈值的情况下才认为需要输出备选信息,例如,可以对英文设置为2个或者3个英文单词,对中文设置为2个、3个或者5个字等。举例说明如下,若待翻译字符串为S:LockScreen:text_Play,则与表1中已翻译字符串S:Music:Play不等同,但是其英文译文都是“Play”,英文“play”翻译为中文可以有“玩”、“播放”等选择,如果将这样的字符串设为备选信息,无疑会增大开发人员的负担,因此,进一步判断阈值,例如,若英文译文的长度阈值时两个英文单词,则由于待翻译字符串的英文译文“Play”只有一个英文单词,因此不符合条件,不会输出备选信息。与之相反,如果待翻译字符串为S:Show:WLAN_title且英文译文为“WLAN title”,则符合条件,输出备选信息交由开发人员判断。In another case, if the string to be translated is not equivalent to the translated string, but the first translation of the string to be translated is consistent with the reference first translation of the translated string, and the length of the first translation is greater than the preset The threshold also performs the operation shown in FIG. 3, that is, outputs the candidate information and then receives the confirmation information of the candidate information, and confirms that the to-be-translated string matches successfully or the matching is unsuccessful according to the confirmation information. That is, although the strings to be translated are inconsistent with the translated strings, the translation of one of their languages is consistent, which may be due to the fact that developers use different strings to represent the same meaning for different operating system products. The system architecture element wastes the existing translation resources if it is considered that the to-be-translated string cannot be reused at this time. Therefore, the same information is passed to the developer to further determine whether the string to be translated can be reused to avoid missing the reusable string. Generally speaking, since the same text may have different meanings, for a shorter translated text of one language, there are often several different choices for translating it into another language. Therefore, a length threshold can be set, only in the first If the length of a translation is greater than the threshold, it is considered that the candidate information needs to be output. For example, English may be set to 2 or 3 English words, and Chinese may be set to 2, 3 or 5 words. For example, if the string to be translated is S:LockScreen:text_Play, it is not equivalent to the translated string S:Music:Play in Table 1, but the English translation is "Play", and the English "play" is translated into Chinese. There can be "play", "play" and other options. If such a string is set as candidate information, it will undoubtedly increase the burden on the developer. Therefore, the threshold is further judged, for example, if the length threshold of the English translation is two. English words, because the English translation "Play" of the string to be translated has only one English word, it does not meet the conditions and will not output alternative information. In contrast, if the string to be translated is S:Show: WLAN_title and the English translation is "WLAN title", then the condition is met and the output candidate information is left to the developer to judge.
通过执行步骤S203,将待翻译字符串以及对应的第一译文与翻译字符串数据库中的已翻译字符串以及对应的参考第一译文进行匹配,可以得到更准确的匹配结果,避免遗漏一些可以复用的字符串,以及避免将一些不可复用的字符串误判为可以复用。By performing step S203, matching the to-be-translated character string and the corresponding first translation with the translated character string in the translation string database and the corresponding reference first translation, a more accurate matching result can be obtained, and some missing can be avoided. Use strings, and avoid misresolving some non-multiplexable strings as reusable.
S204:提取参考字符串在已翻译字符串数据库中的参考翻译文本。S204: Extract reference translation text of the reference string in the translated string database.
S205:将参考翻译文本导出至操作系统,用于为操作系统框架中包含的可复用字符串提供翻译。S205: Export the reference translated text to an operating system for providing translation for the reusable string contained in the operating system framework.
步骤S204与S205分别与S103和S104类似,在此不再赘述。Steps S204 and S205 are similar to S103 and S104, respectively, and are not described herein again.
S206:导出不可复用字符串。S206: Export a non-multiplexable string.
在步骤S206中,将匹配不成功的字符串,即不可复用字符串导出,以提供给相应的人员。可选地,可以将不可复用字符串以列表的形式发送给操作系统框架的开发人员,开发人员在其中添加和/标注适当的信息,并进而发送给负责翻译的人员,由负责翻译的人员进行翻译,提供不可复用字符串的至少两种国家和语种的译文,即不可复用字符串的外部翻译文本。In step S206, the unsuccessful matching string, that is, the non-multiplexable character string, is exported to be provided to the corresponding person. Optionally, the non-reusable strings can be sent to the developer of the operating system framework in the form of a list in which the developer adds and/or labels the appropriate information and sends it to the person responsible for the translation, by the person responsible for the translation. Translation, providing translations of at least two countries and languages of non-reusable strings, ie externally translated text of non-reusable strings.
S207:接收不可复用字符串的外部翻译文本。S207: Receive external translated text of the non-multiplexable string.
S208:将外部翻译文本导出至操作系统,用于为操作系统框架中包含的不可复用字符串提供翻译。S208: Export the external translated text to an operating system for providing translation for the non-multiplexable string included in the operating system framework.
在步骤S207和S208中,接收不可复用字符串的外部翻译文本,并将外部翻译文本导出至操作系统的系统文件,这样一来,就将不可复用字符串对应的翻译资源存入了操作系统文件中,在需要显示不可复用字符串对应的特定语种文字时,调用对应语种的翻译文本即可。至此,待翻译字符串数据库中的可复用字符串和不可复用字符串均“翻译”完成,即其对应的多个语种的翻译资源均存入了操作系统文件中,以供调用。In steps S207 and S208, the external translated text of the non-multiplexable character string is received, and the external translated text is exported to the system file of the operating system, so that the translation resource corresponding to the non-multiplexable character string is stored in the operation. In the system file, when it is necessary to display a specific language text corresponding to the non-reusable character string, the translated text of the corresponding language may be called. At this point, the reusable string and the non-reusable string in the to-be-translated string database are all "translated", that is, the translation resources of the corresponding multiple languages are stored in the operating system file for calling.
需要注意的是,图2实施例中,步骤S206至S208的操作同样适用于待翻译字符串数据库中不包括待翻译字符串的任何一种语言的翻译文本的情况,在这种情况下,外部翻译文本可以只提供待翻译字符串一种语种的译文,当然,也可以提供多种语种的译文。It should be noted that, in the embodiment of FIG. 2, the operations of steps S206 to S208 are also applicable to the case where the translated text of any language that does not include the character string to be translated is not included in the string database to be translated, in which case the external The translated text can only provide a translation of the language to be translated in one language. Of course, translations in multiple languages can also be provided.
请参阅图4,本发明移动终端的一个实施例,其中移动终端400包括通信总线401、处理器402、存储器403和通信电路404。处理器402、存储器403和通信电路404通过通信总线401传递信号,处理器402可通过通信电路404 获取外部信息,例如导入和/或导出的操作。Referring to FIG. 4, an embodiment of a mobile terminal of the present invention, wherein the mobile terminal 400 includes a communication bus 401, a processor 402, a memory 403, and a communication circuit 404. Processor 402, memory 403, and communication circuitry 404 communicate signals over communication bus 401, and processor 402 can obtain external information, such as operations for import and/or export, via communication circuitry 404.
其中,存储器403保存有程序数据,程序数据可被处理器502加载并执行上述任意实施例的操作系统的翻译方法。可以理解地,在其它一些实施例中,也可以不在移动终端400中存储程序数据,而是通过将移动终端400结合网络来执行上述任一实施例的方法。The memory 403 holds program data, and the program data can be loaded by the processor 502 and execute the translation method of the operating system of any of the above embodiments. It can be understood that in some other embodiments, the program data may not be stored in the mobile terminal 400, but the method of any of the above embodiments may be performed by combining the mobile terminal 400 with a network.
请参阅图5,图5是根据本发明操作系统框架的翻译方法的一个翻译流程整体方案。Please refer to FIG. 5. FIG. 5 is a schematic diagram of an overall translation process of a translation method of an operating system framework according to the present invention.
如图5所示,开发人员可先判断新的操作系统产品是否可与已有的操作系统产品共用。如果可以共用,即新老产品基本一致,则无需经过翻译系统,进一步判断是否有新增功能,如没有新增功能可直接使用老产品的翻译文本资源,将其导入新产品工程中,如有新增功能则开发人员提交新增功能需要的字符串,经审核后发送给相应的翻译人员,并将返回的翻译文本资源导入新产品工程。As shown in Figure 5, developers can first determine if a new operating system product can be shared with an existing operating system product. If it can be shared, that is, the old and new products are basically the same, then there is no need to go through the translation system to further judge whether there are new functions. If there is no new function, you can directly use the translated text resources of the old products and import them into the new product project. The new feature allows the developer to submit the string needed for the new feature, which is sent to the appropriate translator after review and the returned translated text resource is imported into the new product project.
如果不可以共用,则向翻译系统导入新产品需求的字符串,并根据上述实施例的方法检测复用,将字符串分为可复用字符串和不可复用字符串。然后由开发人员判断是否有新增功能,若有,则提交新增功能需要的字符串信息,此外,开发人员还需完善分配到各自名下的不可复用部分的字符串信息,例如前文提到的添加相应的批注。接着,将上述信息发给相应的审核人员审核,审核通过后将需要外部翻译的不可复用字符串导出,由相应的翻译人员翻译,最后将得到的翻译文本导入翻译系统,并进一步导出至新产品工程中,从而实现为新产品工程包含的所有字符串提供对应的多国语言翻译文本。If it is not possible to share, the character string of the new product requirement is imported into the translation system, and the multiplexing is detected according to the method of the above embodiment, and the character string is divided into a reusable character string and a non-reusable character string. Then the developer will determine if there are any new features, and if so, submit the string information needed for the new feature. In addition, the developer needs to improve the string information assigned to the non-reusable part of the respective name, for example, Add the corresponding comments to. Then, the above information is sent to the corresponding auditor for review. After the audit is passed, the non-reusable strings that need external translation are exported, translated by the corresponding translators, and finally the translated texts are imported into the translation system and further exported to the new one. In product engineering, the corresponding multi-language translated text is provided for all strings contained in the new product project.
需要注意的是,图5所示流程仅为开发人员使用本发明操作系统框架的翻译方法的一个实施例,仅为了解释和说明本发明的技术方案,而不应被认为是对本发明范围的限制。根据需要,开发人员还可使用本发明操作系统框架的翻译方法制订其他相应的整体翻译流程,例如,可以不由开发人员判断产品是否可以共用,而直接将新操作系统产品的待翻译字符串数据库导入,并检测复用以执行后续步骤。It should be noted that the flow shown in FIG. 5 is only one embodiment of the translation method of the operating system framework of the present invention, and is only for explaining and explaining the technical solution of the present invention, and should not be construed as limiting the scope of the present invention. . According to the needs, the developer can also use the translation method of the operating system framework of the present invention to formulate other corresponding overall translation processes. For example, the developer can directly determine the product string to be translated from the new operating system product without being judged by the developer. And detect multiplexing to perform the next steps.
上述实施例所述功能如果以软件形式实现并作为独立的产品销售或使用 时,可存储在一个具有存储功能的装置中,即,本发明还提供一种存储有程序的存储装置。存储装置中程序数据能够被执行以实现上述实施例中操作系统框架的翻译方法,该存储装置包括但不限于U盘、光盘、服务器或者硬盘等。The functions described in the above embodiments can be stored in a device having a storage function if implemented in software and sold or used as a stand-alone product, that is, the present invention also provides a storage device storing the program. The program data in the storage device can be executed to implement the translation method of the operating system framework in the above embodiments, including but not limited to a USB flash drive, an optical disk, a server, a hard disk, and the like.
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (20)

  1. 一种操作系统框架的翻译方法,其特征在于,包括步骤:A method for translating an operating system framework, comprising the steps of:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串;Importing a string to be translated in the database of the string to be translated included in the operating system framework;
    将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;The string to be translated is matched with the translated string database, wherein the string to be translated that is successfully matched is a reusable string, and the translated string corresponding to the reusable string is a reference string. The untranslated character string to be unsuccessful is a non-reusable character string;
    提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;Extracting reference translation text of the reference string in the translated string database;
    将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述可复用字符串提供翻译;Exporting the reference translated text to the operating system for providing translation for the reusable character string included in the operating system framework;
    导出所述不可复用字符串;Exporting the non-multiplexable string;
    接收所述不可复用字符串的外部翻译文本;Receiving an external translated text of the non-multiplexable string;
    将所述外部翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述不可复用字符串提供翻译。Exporting the external translated text to the operating system for providing translations for the non-multiplexable string contained in the operating system framework.
  2. 如权利要求1所述的翻译方法,其特征在于,所述导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串的步骤还包括:The translation method according to claim 1, wherein the step of importing the to-be-translated character string in the to-be-translated string database included in the operating system framework further comprises:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串对应的第一译文;Importing a first translation corresponding to the to-be-translated string in the to-be-translated string database included in the operating system framework;
    所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The step of matching the to-be-translated string with the translated string database includes:
    将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配;Matching the to-be-translated string and the first translation with a translated string in the translated string database and a reference first translation corresponding to the translated string;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,所述待翻译字符串与所述已翻译字符串匹配成功;When the string to be translated is equivalent to a translated string in the translated string database, and the first translation of the string to be translated and the reference of the translated string are first When the translations are consistent, the to-be-translated string is successfully matched with the translated string;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  3. 如权利要求2所述的翻译方法,其特征在于,在所述将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配的过程中:The translation method according to claim 2, wherein said translated character string and said first translation and said translated character string in said translated character string database and said translated The string corresponds to the reference first translation in the process of matching:
    当所述待翻译字符串等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文不一致时,输出备选信息;或者When the character string to be translated is equivalent to the translated character string, and the first translation of the to-be-translated character string is inconsistent with the reference first translation of the translated character string, outputting candidate information ;or
    当所述待翻译字符串不等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,且所述第一译文的长度大于预设的阈值时,输出所述备选信息;When the to-be-translated character string is not identical to the translated character string, and the first translation of the to-be-translated character string is consistent with the reference first translation of the translated character string, and Outputting the candidate information when the length of the first translation is greater than a preset threshold;
    接收所述备选信息的确认信息,并根据所述确认信息,确认所述待翻译字符串匹配成功或者匹配不成功,其中,所述备选信息包括所述待翻译字符串。Receiving the confirmation information of the candidate information, and confirming that the to-be-translated string is successfully matched or the matching is unsuccessful according to the confirmation information, wherein the candidate information includes the to-be-translated character string.
  4. 如权利要求1所述的翻译方法,其特征在于,所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The translation method according to claim 1, wherein the step of matching the to-be-translated character string with the translated character string database comprises:
    将所述待翻译字符串与所述已翻译字符串数据库中的已翻译字符串匹配;Matching the to-be-translated string with the translated string in the translated string database;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,所述待翻译字符串与所述已翻译字符串匹配成功;或者When the character string to be translated is equivalent to a translated character string in the translated string database, the string to be translated matches the translated string successfully; or
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,输出备选信息,所述备选信息包括所述待翻译字符串,接收所述备选信息的确认信息,根据所述确认信息,确认所述待翻译字符串匹配成功或者匹配不成功;When the to-be-translated character string is equivalent to a translated character string in the translated character string database, outputting candidate information, the candidate information including the to-be-translated character string, and receiving the candidate information Confirming the information, according to the confirmation information, confirming that the to-be-translated string is successfully matched or the matching is unsuccessful;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串 具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  5. 如权利要求1所述的翻译方法,其特征在于,所述已翻译字符串数据库通过导入所述已翻译字符串以及对应的所述参考翻译文本生成。The translation method according to claim 1, wherein said translated character string database is generated by importing said translated character string and corresponding reference translation text.
  6. 如权利要求1所述的翻译方法,其特征在于,所述参考翻译文本包括至少两种不同语言的译文。The translation method of claim 1 wherein said reference translated text comprises translations in at least two different languages.
  7. 如权利要求1所述的翻译方法,其特征在于,所述操作系统是Android系统。The translation method according to claim 1, wherein the operating system is an Android system.
  8. 一种移动终端,其特征在于,所述移动终端包括处理器和通信电路,所述处理器耦合所述通信电路,其中,所述处理器可读取程序数据,执行操作系统框架的翻译方法,所述翻译方法包括步骤:A mobile terminal, characterized in that the mobile terminal comprises a processor and a communication circuit, the processor is coupled to the communication circuit, wherein the processor can read program data and execute a translation method of an operating system framework, The translation method includes the steps of:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串;Importing a string to be translated in the database of the string to be translated included in the operating system framework;
    将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;The string to be translated is matched with the translated string database, wherein the string to be translated that is successfully matched is a reusable string, and the translated string corresponding to the reusable string is a reference string. The untranslated character string to be unsuccessful is a non-reusable character string;
    提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;Extracting reference translation text of the reference string in the translated string database;
    将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述可复用字符串提供翻译。Exporting the reference translated text to the operating system for providing translations for the reusable string contained in the operating system framework.
  9. 如权利要求8所述的移动终端,其特征在于,所述导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串的步骤还包括:The mobile terminal according to claim 8, wherein the step of importing the to-be-translated character string in the to-be-translated string database included in the operating system framework further comprises:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串对应的第一译文;Importing a first translation corresponding to the to-be-translated string in the to-be-translated string database included in the operating system framework;
    所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The step of matching the to-be-translated string with the translated string database includes:
    将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配;Matching the to-be-translated string and the first translation with a translated string in the translated string database and a reference first translation corresponding to the translated string;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,所述待翻译字符串与所述已翻译字符串匹配成功;When the string to be translated is equivalent to a translated string in the translated string database, and the first translation of the string to be translated and the reference of the translated string are first When the translations are consistent, the to-be-translated string is successfully matched with the translated string;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  10. 如权利要求9所述的移动终端,其特征在于,在所述将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配的过程中:A mobile terminal according to claim 9, wherein said translated character string and said first translation and said translated character string in said translated character string database and said translated The string corresponds to the reference first translation in the process of matching:
    当所述待翻译字符串等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文不一致时,输出备选信息;或者When the character string to be translated is equivalent to the translated character string, and the first translation of the to-be-translated character string is inconsistent with the reference first translation of the translated character string, outputting candidate information ;or
    当所述待翻译字符串不等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,且所述第一译文的长度大于预设的阈值时,输出所述备选信息;When the to-be-translated character string is not identical to the translated character string, and the first translation of the to-be-translated character string is consistent with the reference first translation of the translated character string, and Outputting the candidate information when the length of the first translation is greater than a preset threshold;
    接收所述备选信息的确认信息,并根据所述确认信息,确认所述待翻译字符串匹配成功或者匹配不成功,其中,所述备选信息包括所述待翻译字符串。Receiving the confirmation information of the candidate information, and confirming that the to-be-translated string is successfully matched or the matching is unsuccessful according to the confirmation information, wherein the candidate information includes the to-be-translated character string.
  11. 如权利要求8所述的移动终端,其特征在于,所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The mobile terminal according to claim 8, wherein the step of matching the to-be-translated character string with the translated character string database comprises:
    将所述待翻译字符串与所述已翻译字符串数据库中的已翻译字符串匹配;Matching the to-be-translated string with the translated string in the translated string database;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,所述待翻译字符串与所述已翻译字符串匹配成功;或者When the character string to be translated is equivalent to a translated character string in the translated string database, the string to be translated matches the translated string successfully; or
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,输出备选信息,所述备选信息包括所述待翻译字符串,接收所述备选信息的确认信息,根据所述确认信息,确认所述待翻译字符串匹配成功或者匹 配不成功;When the to-be-translated character string is equivalent to a translated character string in the translated character string database, outputting candidate information, the candidate information including the to-be-translated character string, and receiving the candidate information Confirming the information, according to the confirmation information, confirming that the to-be-translated string is successfully matched or the matching is unsuccessful;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  12. 如权利要求8所述的移动终端,其特征在于,还包括:The mobile terminal of claim 8, further comprising:
    导出所述不可复用字符串;Exporting the non-multiplexable string;
    接收所述不可复用字符串的外部翻译文本;Receiving an external translated text of the non-multiplexable string;
    将所述外部翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述不可复用字符串提供翻译。Exporting the external translated text to the operating system for providing translations for the non-multiplexable string contained in the operating system framework.
  13. 如权利要求8所述的移动终端,其特征在于,所述已翻译字符串数据库通过导入所述已翻译字符串以及对应的所述参考翻译文本生成。The mobile terminal of claim 8, wherein the translated character string database is generated by importing the translated character string and the corresponding reference translated text.
  14. 如权利要求8所述的移动终端,其特征在于,所述参考翻译文本包括至少两种不同语言的译文。The mobile terminal of claim 8, wherein the reference translated text comprises translations of at least two different languages.
  15. 如权利要求8所述的移动终端,其特征在于,所述操作系统是Android系统。The mobile terminal of claim 8, wherein the operating system is an Android system.
  16. 一种具有存储功能的装置,其特征在于,用于存储程序数据,所述程序数据可被加载并执行操作系统框架的翻译方法,所述翻译方法包括步骤:A device having a storage function, configured to store program data, the program data can be loaded and execute a translation method of an operating system framework, the translation method comprising the steps of:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串;Importing a string to be translated in the database of the string to be translated included in the operating system framework;
    将所述待翻译字符串与已翻译字符串数据库匹配,其中,匹配成功的所述待翻译字符串为可复用字符串,所述可复用字符串对应的已翻译字符串为参考字符串,匹配不成功的所述待翻译字符串为不可复用字符串;The string to be translated is matched with the translated string database, wherein the string to be translated that is successfully matched is a reusable string, and the translated string corresponding to the reusable string is a reference string. The untranslated character string to be unsuccessful is a non-reusable character string;
    提取所述参考字符串在所述已翻译字符串数据库中的参考翻译文本;Extracting reference translation text of the reference string in the translated string database;
    将所述参考翻译文本导出至所述操作系统,用于为所述操作系统框架中包 含的所述可复用字符串提供翻译。The reference translated text is exported to the operating system for providing translations for the reusable string contained in the operating system framework.
  17. 如权利要求16所述的装置,其特征在于,所述导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串的步骤还包括:The device according to claim 16, wherein the step of importing the to-be-translated character string in the to-be-translated string database included in the operating system framework further comprises:
    导入所述操作系统框架所含的待翻译字符串数据库中的待翻译字符串对应的第一译文;Importing a first translation corresponding to the to-be-translated string in the to-be-translated string database included in the operating system framework;
    所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The step of matching the to-be-translated string with the translated string database includes:
    将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配;Matching the to-be-translated string and the first translation with a translated string in the translated string database and a reference first translation corresponding to the translated string;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,所述待翻译字符串与所述已翻译字符串匹配成功;When the string to be translated is equivalent to a translated string in the translated string database, and the first translation of the string to be translated and the reference of the translated string are first When the translations are consistent, the to-be-translated string is successfully matched with the translated string;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  18. 如权利要求17所述的装置,其特征在于,在所述将所述待翻译字符串以及所述第一译文与所述已翻译字符串数据库中的已翻译字符串以及与所述已翻译字符串对应的参考第一译文匹配的过程中:The apparatus according to claim 17, wherein said translated character string and said translated text in said first translation and said translated character string database and said translated character are said The string corresponds to the reference first translation in the process of matching:
    当所述待翻译字符串等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文不一致时,输出备选信息;或者When the character string to be translated is equivalent to the translated character string, and the first translation of the to-be-translated character string is inconsistent with the reference first translation of the translated character string, outputting candidate information ;or
    当所述待翻译字符串不等同于所述已翻译字符串,且所述待翻译字符串的所述第一译文与所述已翻译字符串的所述参考第一译文一致时,且所述第一译文的长度大于预设的阈值时,输出所述备选信息;When the to-be-translated character string is not identical to the translated character string, and the first translation of the to-be-translated character string is consistent with the reference first translation of the translated character string, and Outputting the candidate information when the length of the first translation is greater than a preset threshold;
    接收所述备选信息的确认信息,并根据所述确认信息,确认所述待翻译字符串匹配成功或者匹配不成功,其中,所述备选信息包括所述待翻译字符串。Receiving the confirmation information of the candidate information, and confirming that the to-be-translated string is successfully matched or the matching is unsuccessful according to the confirmation information, wherein the candidate information includes the to-be-translated character string.
  19. 如权利要求16所述的装置,其特征在于,所述将所述待翻译字符串与已翻译字符串数据库匹配的步骤包括:The apparatus according to claim 16, wherein said step of matching said to-be-translated string with a translated string database comprises:
    将所述待翻译字符串与所述已翻译字符串数据库中的已翻译字符串匹配;Matching the to-be-translated string with the translated string in the translated string database;
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,所述待翻译字符串与所述已翻译字符串匹配成功;或者When the character string to be translated is equivalent to a translated character string in the translated string database, the string to be translated matches the translated string successfully; or
    当所述待翻译字符串等同于所述已翻译字符串数据库中的一条已翻译字符串时,输出备选信息,所述备选信息包括所述待翻译字符串,接收所述备选信息的确认信息,根据所述确认信息,确认所述待翻译字符串匹配成功或者匹配不成功;When the to-be-translated character string is equivalent to a translated character string in the translated character string database, outputting candidate information, the candidate information including the to-be-translated character string, and receiving the candidate information Confirming the information, according to the confirmation information, confirming that the to-be-translated string is successfully matched or the matching is unsuccessful;
    其中,所述待翻译字符串等同于所述已翻译字符串包括:所述待翻译字符串与所述已翻译字符串完全一致,或者所述待翻译字符串与所述已翻译字符串具有相同数量的子字符串,且所述待翻译字符串的子字符串与所述已翻译字符串的子字符串一致。The character string to be translated is equivalent to the translated character string, and the character string to be translated is completely consistent with the translated character string, or the character string to be translated has the same meaning as the translated character string. a substring of the number, and the substring of the string to be translated is consistent with the substring of the translated string.
  20. 如权利要求16所述的装置,其特征在于,还包括:The device of claim 16 further comprising:
    导出所述不可复用字符串;Exporting the non-multiplexable string;
    接收所述不可复用字符串的外部翻译文本;Receiving an external translated text of the non-multiplexable string;
    将所述外部翻译文本导出至所述操作系统,用于为所述操作系统框架中包含的所述不可复用字符串提供翻译。Exporting the external translated text to the operating system for providing translations for the non-multiplexable string contained in the operating system framework.
PCT/CN2018/103216 2017-08-30 2018-08-30 Translation method, mobile terminal and storage device of operating system framework WO2019042349A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710762822.7A CN107741931A (en) 2017-08-30 2017-08-30 Interpretation method, mobile terminal and the storage device of operating system framework
CN201710762822.7 2017-08-30

Publications (1)

Publication Number Publication Date
WO2019042349A1 true WO2019042349A1 (en) 2019-03-07

Family

ID=61235821

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103216 WO2019042349A1 (en) 2017-08-30 2018-08-30 Translation method, mobile terminal and storage device of operating system framework

Country Status (2)

Country Link
CN (1) CN107741931A (en)
WO (1) WO2019042349A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107741931A (en) * 2017-08-30 2018-02-27 捷开通讯(深圳)有限公司 Interpretation method, mobile terminal and the storage device of operating system framework
CN108491398B (en) * 2018-03-26 2021-09-07 深圳市元征科技股份有限公司 Method for translating updated software text and electronic equipment
CN110210039B (en) * 2018-04-23 2023-05-30 深圳市腾讯网络信息技术有限公司 Translation content checking method, device, system and computer equipment
CN111143348A (en) * 2019-11-25 2020-05-12 三盟科技股份有限公司 Data translation method, system, computer device and readable storage medium
CN111144136B (en) * 2019-11-25 2024-02-23 三盟科技股份有限公司 Data conversion method, system, computer device and readable storage medium
CN114201248B (en) * 2020-09-17 2023-10-20 福建天泉教育科技有限公司 Method and system for judging whether component needs translation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702621A (en) * 2004-04-22 2005-11-30 微软公司 Language localization using tables
CN101322097A (en) * 2005-12-05 2008-12-10 微软公司 Flexible display translation
US20140249797A1 (en) * 2011-11-25 2014-09-04 Mindy Liu Providing translation assistance in application localization
CN104412256A (en) * 2012-07-02 2015-03-11 微软公司 Generating localized user interfaces
CN107741931A (en) * 2017-08-30 2018-02-27 捷开通讯(深圳)有限公司 Interpretation method, mobile terminal and the storage device of operating system framework

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060116865A1 (en) * 1999-09-17 2006-06-01 Www.Uniscape.Com E-services translation utilizing machine translation and translation memory
FR2902543A1 (en) * 2006-06-20 2007-12-21 Alcatel Sa Creation method for multimedia service, involves translating generic description of service into chosen rich media format by syntax analysis software associated with inference engine
CN102722479B (en) * 2011-03-30 2015-11-04 腾讯科技(深圳)有限公司 A kind of method of implementation language translation and device
CN104317788B (en) * 2014-11-03 2018-02-02 锐嘉科集团有限公司 The multi-lingual interpretation methods of Android and device
CN105808528B (en) * 2016-03-04 2019-01-25 张广睿 A kind of processing method of document text
CN106156013B (en) * 2016-06-30 2019-02-19 电子科技大学 A kind of two-part machine translation method that regular collocation type phrase is preferential
CN106777268A (en) * 2016-12-28 2017-05-31 语联网(武汉)信息技术有限公司 A kind of method of translation document storage and retrieval

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702621A (en) * 2004-04-22 2005-11-30 微软公司 Language localization using tables
CN101322097A (en) * 2005-12-05 2008-12-10 微软公司 Flexible display translation
US20140249797A1 (en) * 2011-11-25 2014-09-04 Mindy Liu Providing translation assistance in application localization
CN104412256A (en) * 2012-07-02 2015-03-11 微软公司 Generating localized user interfaces
CN107741931A (en) * 2017-08-30 2018-02-27 捷开通讯(深圳)有限公司 Interpretation method, mobile terminal and the storage device of operating system framework

Also Published As

Publication number Publication date
CN107741931A (en) 2018-02-27

Similar Documents

Publication Publication Date Title
WO2019042349A1 (en) Translation method, mobile terminal and storage device of operating system framework
US10755093B2 (en) Hierarchical information extraction using document segmentation and optical character recognition correction
US7149971B2 (en) Method, apparatus, and system for providing multi-language character strings within a computer
US10713437B2 (en) Method and apparatus for identifying questionable line break characters in an application
US8976118B2 (en) Method for character correction
US8745071B2 (en) Delta language translation
US9195653B2 (en) Identification of in-context resources that are not fully localized
CN102693221A (en) Method and system for converting resource file language
WO2020259141A1 (en) File processing method and apparatus, and computer device
US9977766B2 (en) Keyboard input corresponding to multiple languages
US20150106701A1 (en) Input support method and information processing system
JP2012181571A (en) Translation support device, translation delivery date setting method, and program
WO2022068556A1 (en) Code translation method and apparatus, and device
CN112965772A (en) Web page display method and device and electronic equipment
CN110275712B (en) Text replacement method, device and equipment
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
JP6568968B2 (en) Document review device and program
KR101820495B1 (en) Multilingual translation and output method of websites, communities and bulletin board user interfaces on the Internet and characters
CN115309706A (en) Method, device, equipment, medium and product for updating multi-language configuration file
KR101523842B1 (en) Method and apparatus for translation management
CN109948251B (en) CAD-based data processing method, device, equipment and storage medium
CN113033177A (en) Method and device for analyzing electronic medical record data
CN114282550B (en) Method, device and related components for realizing QT multi-language translation system
CN113792557A (en) Language file generation method and device
CN114416035A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18851183

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18851183

Country of ref document: EP

Kind code of ref document: A1