Multilingual information processing method and device, and storage medium

CN122614367APending Publication Date: 2026-08-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510180922.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种多语言信息处理方法、装置以及存储介质,能够在编译与国际化资源有关的项目时自动触发多语言检查插件,使得在项目源码编译过程中自动对项目源码中存在的国际化字符资源进行漏检和翻译校准,解决当前人工检测存在的漏翻和翻译准确性问题,同时,提升翻译审阅的效率

Benefits of technology

[0017]本申请实施例提出多语言信息处理方法、装置以及存储介质。本申请实施例通过设置适合国际化资源翻译场景的全自动的多语言信息处理框架,并在编译与国际化资源有关的项目时自动触发多语言检查插件,使得在项目源码编译过程中自动对项目源码中存在的国际化字符资源进行漏检和翻译校准,解决当前人工检测存在的漏翻和翻译准确性问题,同时,提升翻译审阅的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122614367A_ABST
    Figure CN122614367A_ABST
Patent Text Reader

Abstract

The application discloses a multilingual information processing method and device and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: sending an internationalized resource to be translated to a translation platform; the translation platform is used for pushing a translation task for translating the internationalized resource to a translation client; a translation resource interface corresponding to the translation task is generated according to a translation result; the internationalized resource to be translated belongs to a first target project; the translation resource interface is called, and the translation result is updated in source code of the first target project; in the process of compiling the source code of the first target project by a compiler, a multilingual check plug-in is triggered; the multilingual check plug-in is automatically loaded by the compiler through an exposed plug-in detection interface; and the multilingual check plug-in is used for detecting the translation result and outputting a detection result. According to the embodiment of the application, the multilingual check plug-in is automatically triggered to automatically perform missed detection and translation calibration when a project related to an internationalized resource is compiled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to multilingual information processing methods, apparatus and storage media. Background Technology

[0002] In many scenarios within related technologies, the translation of internationalized resources is required. For example, when an application is used in a multilingual environment, it needs to be configured with internationalized resources applicable to each language environment. Internationalized resources refer to text information resources applicable to the corresponding language environment. In many cases, given a text information resource for a single language environment (internationalized resource A), translating the internationalized resource yields a text information resource for another language environment (internationalized resource B).

[0003] To ensure the accuracy of international resource translations, manual translation checking and review are usually required. However, if developers manually compare and check the translations one by one, it is easy to miss translations and mix up translated terms, thus affecting the accuracy of the translation. On the other hand, manual translation checking and review is inefficient and not conducive to the rapid deployment and iteration of applications. Summary of the Invention

[0004] This application provides a multilingual information processing method, apparatus, and storage medium that can automatically trigger a multilingual checking plugin when compiling projects related to internationalization resources. This enables the automatic detection and translation calibration of internationalized character resources in the project source code during the compilation process, solving the problems of missed translations and translation accuracy that exist in current manual detection, while improving the efficiency of translation review.

[0005] According to one aspect of the embodiments of this application, a multilingual information processing method is provided, the method comprising:

[0006] The internationalized resource to be translated is sent to the translation platform, which pushes the translation task for translating the internationalized resource to the translation client, and generates the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project.

[0007] Call the translation resource interface to update the translation result in the source code of the first target project;

[0008] During the compilation of the source code of the first target project by the compiler, the multilingual checking plugin is triggered. The multilingual checking plugin exposes an external plugin detection interface, which allows the compiler to automatically load the multilingual checking plugin. The multilingual checking plugin is used to detect the translation results and output the detection results.

[0009] According to one aspect of the embodiments of this application, a multilingual information processing apparatus is provided, the apparatus comprising:

[0010] The translation interaction module is used to send the internationalized resource to be translated to the translation platform. The translation platform is used to push the translation task for translating the internationalized resource to the translation client and generate the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project.

[0011] The translation update module is used to call the translation resource interface to update the translation result in the source code of the first target project;

[0012] The compilation processing module is used to trigger the multilingual checking plugin during the compilation of the source code of the first target project by the compiler. The multilingual checking plugin exposes an external plugin detection interface, so that the multilingual checking plugin is automatically loaded by the compiler. The multilingual checking plugin is used to detect the translation results and output the detection results.

[0013] According to one aspect of the embodiments of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described multilingual information processing method.

[0014] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described multilingual information processing method.

[0015] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the above-described multilingual information processing method.

[0016] The technical solution provided in this application can bring the following beneficial effects:

[0017] This application proposes a multilingual information processing method, apparatus, and storage medium. By establishing a fully automated multilingual information processing framework suitable for international resource translation scenarios, and automatically triggering a multilingual check plugin when compiling projects related to international resources, this application enables automatic detection and translation calibration of international character resources in the project source code during the compilation process. This solves the problems of missed translations and translation accuracy issues present in current manual detection methods, while also improving the efficiency of translation review. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating an international resource translation scenario in a related technology provided in one embodiment of this application;

[0020] Figure 2 This is a schematic diagram of an application runtime environment provided in one embodiment of this application;

[0021] Figure 3 This is a flowchart of a multilingual information processing method provided in one embodiment of this application;

[0022] Figure 4 This is an interaction diagram of a multilingual information processing method provided in one embodiment of this application;

[0023] Figure 5 This is a schematic diagram of the operation logic of a multilingual checking plugin provided in one embodiment of this application;

[0024] Figure 6 This is a schematic diagram of the inspection process of a multilingual inspection plugin provided in one embodiment of this application;

[0025] Figure 7 This is a method flow for building a multilingual inspection plugin provided in one embodiment of this application. Figure 1 ;

[0026] Figure 8 This is a schematic diagram illustrating the relationship between a multilingual checking plugin and a development environment provided in one embodiment of this application;

[0027] Figure 9 This is a logic block diagram of a multilingual inspection plugin provided in one embodiment of this application;

[0028] Figure 10 This is a method flow for building a multilingual inspection plugin provided in one embodiment of this application. Figure 2 ;

[0029] Figure 11 This is a block diagram of a multilingual information processing apparatus provided in one embodiment of this application;

[0030] Figure 12 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the relevant background of the embodiments of this application is briefly introduced below:

[0032] In many scenarios within related technologies, the translation of internationalized resources is required. For example, when an application is used in a multilingual environment, it needs to be configured with internationalized resources applicable to each language environment. Internationalized resources refer to text information resources applicable to the corresponding language environment. In many cases, given a text information resource for a single language environment (internationalized resource A), translating the internationalized resource yields a text information resource for another language environment (internationalized resource B).

[0033] In the context of translating international resources, there can be two core roles: developers and translators. Please refer to [reference needed]. Figure 1 The document illustrates a flowchart of an internationalization resource translation scenario in related technologies. The application developer submits the original files of the internationalization resources to be translated to an online translation repository. After submission, the developer notifies translators to translate the original files of the internationalization resources in the online repository, specifying the target language. The translators retrieve the original files of the internationalization resources to be translated from the online repository and translate the resources, obtaining the translation results. Once the translation is complete, the results are placed in the online repository, and the developer is notified of the completion. The developer retrieves the translated resource files and extracts the translated internationalization resource files from them. Following development specifications, the developer copies the information of the translated internationalization resource files into the corresponding internationalization resources in the source code project. After the developer completes the replacement of the internationalization resources, a new version is released, and translators are invited to participate in the review to confirm the accuracy of the translation and whether any omissions have been made.

[0034] exist Figure 1 In the illustrated scenario of translating international resources, given the large number of international resources, on the one hand, if developers manually compare and check the translation results one by one, it is easy to cause omissions and misuse of translated terms, thus affecting the accuracy of the translation. On the other hand, manual translation checking and review is inefficient, which is not conducive to the rapid deployment and iteration of applications.

[0035] In view of this, embodiments of this application propose a multilingual information processing method, which sets suitable... Figure 1 The framework demonstrates a fully automated multilingual information processing framework for translating internationalized resources. It automatically triggers a multilingual check plugin when compiling projects related to internationalized resources, enabling automatic detection and translation calibration of internationalized character resources in the project source code during the compilation process. This solves the problems of missed translations and translation accuracy that exist in current manual detection, while improving the efficiency of translation review.

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be noted that all data used in the embodiments of this application has been fully authorized by the relevant parties before use.

[0037] Please refer to Figure 2 This diagram illustrates an application runtime environment provided in one embodiment of this application under an exemplary implementation. The application runtime environment may include: terminal 10 and server 20.

[0038] Terminal 10 includes, but is not limited to, electronic devices such as mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, game consoles, e-book readers, multimedia playback devices, and wearable devices. Application clients can be installed on terminal 10.

[0039] In this embodiment, the application described above can be any application that runs and supports multilingual information processing services. Typically, the application is a video application. Of course, besides video applications, other types of applications can also run and support multilingual information processing services. For example, news applications, social applications, search applications, interactive entertainment applications, browser applications, shopping applications, content sharing applications, virtual reality (VR) applications, augmented reality (AR) applications, etc., are not limited in this embodiment. Optionally, the terminal 10 runs a client of the above-mentioned application.

[0040] Server 20 provides background services to clients of applications in terminal 10. For example, server 20 can be a background server for the aforementioned applications. Server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, server 20 can simultaneously provide background services to applications in multiple terminals 10.

[0041] Optionally, terminal 10 and server 20 can communicate with each other via network 30. Terminal 10 and server 20 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0042] Please refer to Figure 3 The diagram illustrates a flowchart of a multilingual information processing method according to an exemplary embodiment. This method can be applied to a computer device, which refers to an electronic device capable of data computation and processing. Figure 2 The client 10 or server 20 in the method can specifically be the client 10 or server 20 corresponding to the application developer. The method may include the following steps:

[0043] Step S301. Send the internationalized resource to be translated to the translation platform. The translation platform is used to push the translation task for translating the internationalized resource to the translation client, and generate the translation resource interface corresponding to the translation task according to the translation result. The internationalized resource to be translated belongs to the first target project.

[0044] This application does not limit the internationalization resources to be translated; they can be text resources that express information in a certain language. The internationalization resources in this application all have corresponding language types, which can be represented by language identifiers. For example, the language identifier for Chinese is zh, for English it is en, and for French it is fr.

[0045] The original language type of the internationalized resource to be translated may be A. Step S301 aims to obtain the corresponding translation result through the translation platform, and the language type of the translation result may be B.

[0046] The translation client is the client for translators. Translators receive translation tasks pushed by the translation platform through the translation client and return the translation results to the platform. The platform then generates a translation resource interface corresponding to the translation task based on the results. The internationalized resource to be translated belongs to the first target project. The first target project is the project containing the source code of the application that needs to use the translation results of the internationalized resource to be translated.

[0047] Step S302. Call the translation resource interface to update the translation result in the source code of the first target project.

[0048] By calling this translation resource interface, the translation results can be updated in the source code of the first target project, for example, by adding a link to the storage location of the translation results on the translation platform.

[0049] Step S303. During the compilation of the source code of the first target project by the compiler, the multilingual checking plugin is triggered. The multilingual checking plugin exposes an external plugin detection interface, so that the multilingual checking plugin is automatically loaded by the compiler. The multilingual checking plugin is used to detect the translation results and output the detection results.

[0050] The embodiments of this application do not limit the output method of the detection results. They can be output to the client corresponding to the developer, the translation platform and / or the translation client, thereby significantly improving the work efficiency of developers and translators.

[0051] This plugin detection interface can be automatically triggered during the compilation of the source code of the first target project by the compiler, requiring no manual control and offering convenience and speed. Please refer to [link / reference]. Figure 4 The diagram illustrates an interaction diagram of a multilingual information processing method according to an embodiment of this application. This interaction diagram involves the electronic device corresponding to the developer, the translation platform, the translation client corresponding to the translator, and a multilingual checking plugin that can be automatically triggered by the compiler of the electronic device corresponding to the developer.

[0052] In step S401, after receiving the request to translate internationalized resources, the developers upload the internationalized resources to be translated to the translation platform.

[0053] In step S402, a to-do item can be created in the translation platform, specifying which target language the internationalized resource needs to be translated into.

[0054] In step S403, after the to-do item is created, the translation platform notifies the translator's translation client via email or chat software that there are internationalized character resources that need to be translated.

[0055] In step S404, the translator performs translation on the international resources of the translation platform through the translation client and uploads the translation results to the translation platform for storage.

[0056] In step S405, the translation platform generates a corresponding translation resource interface based on the translation results provided by the translation client and notifies the developers that the translation is complete.

[0057] In step S406, the translated results are extracted from the translation platform, and the internationalization resources are updated in the relevant source code by adding the storage path of the translation results in the translation platform.

[0058] In step S407, the compilation of the first target project containing the source code is triggered, and the multilingual checking plugin is started.

[0059] In step S408, the multilingual checking plugin reads the relevant configuration files, reads internationalization resources, and performs omission detection and accuracy detection on the internationalization resources. During both omission and accuracy detection, the plugin compares the results with the character resources corresponding to the base language type of the translation platform to obtain the detection results, which are then notified to the developers. Specifically, omission detection checks for translation omissions in the internationalization resources, while accuracy detection checks the accuracy of the character meanings in the internationalization resources.

[0060] Please refer to Figure 5 This diagram illustrates the operational logic of the multilingual checking plugin according to an embodiment of this application. The diagram includes the following steps:

[0061] S501. Configuration Reading.

[0062] During the configuration reading phase, the multilingual checking plugin can read the configuration information for running the multilingual checking plugin from the source code of the first target project. This configuration information is pre-configured in the first target project before the compiler starts. Specifically, the first target project configures the internationalization resource version, the language type of the internationalization resource, the base language type, and the translation server address used for online verification required for the multilingual checking plugin to run. The language type of the internationalization resource is the language type corresponding to the translation result, and the base language type is the basic language type used for translation and verification. It can be the language type used during application development or the language type in the application's primary use case.

[0063] S502. Read translation results.

[0064] Extract the storage path of the translation results in the translation platform from the source code of the first target project, and access that storage path to read the translation results.

[0065] S503. Omission Detection.

[0066] Using the character resources of the baseline language type as a standard, check for any omissions in the translation results. The character resources of the baseline language type can be considered as the resources formed by all the information of the internationalization resource to be translated under the baseline language type.

[0067] In one exemplary implementation, the multilingual checking plugin performs the following operations:

[0068] Obtain the character resources corresponding to the base language type. The character resources are stored in key-value pairs to form a source key-value pair table, where the key corresponds to the character identifier and the value corresponds to the value of the character identifier. According to the language type of the internationalization resource, access the path where the translation result is located through the source code of the first target project to obtain the target key-value pair table corresponding to the translation result. If the first key value of the source key-value pair table does not exist in the target key-value pair table, then generate translation omission information corresponding to the first key value.

[0069] This application does not limit the first key value, which can be any key value that belongs to the source key-value pair table but not to the target key-value pair table. This application does not limit the specific content of the translation omission information, as long as it can indicate that the first key value has translation omissions.

[0070] S504. Translation accuracy detection.

[0071] The accuracy of the translation results is verified using the address of an online verification translation server. In an exemplary embodiment, the multilingual checking plugin performs the following operations: if the second key value of the source key-value pair table exists in the target key-value pair table, the current value corresponding to the second key value is extracted, and the translation value corresponding to the current value is obtained through the address of the online verification translation server; if the value corresponding to the second key value in the target key-value pair table is different from the translation value, translation error information corresponding to the second key value is generated.

[0072] This application does not limit the second key value; it can be any key value that belongs to both the source and target key value tables. This application does not limit the specific content of the translation error information; it is sufficient as long as it can indicate that there is a translation error in the second key value and provide the correct translation.

[0073] S505. Abnormal prompts and calibration.

[0074] Based on the results of omission detection and accuracy detection, developers and / or translators are alerted to translation anomalies, and the correct translation information is provided through the translation server.

[0075] Please refer to Figure 6The diagram illustrates the inspection process of the multilingual inspection plugin in this embodiment.

[0076] In step S601, the multilingual checking plugin reads configuration information based on the source code of the first target project. From the configuration information, the version of internationalization resources required for the multilingual checking plugin to run, the language type of the internationalization resources, the base language type, and the address of the translation server used for online verification can be obtained.

[0077] In step S602, the character resources corresponding to the base language type are obtained, namely the source key-value pair table.

[0078] The source key-value pair table is also known as the base character dictionary. Here, the key represents a globally unique identifier for the character resource, and the value represents the value of the character resource. For example, key = mini_key_start, value = start.

[0079] In step S603, the translation results are extracted from the source code of the first target project based on the configuration information to form a target key-value pair table.

[0080] In step S604, the key values ​​of the source key-value pair table and the target key-value pair table are compared.

[0081] In step S605, if the key in the source key-value pair table cannot be matched in the target key-value pair table, it is determined that the corresponding key is missing in the translation result. The missing key value and the corresponding language type are recorded.

[0082] In step S606, if the key in the source key-value pair table matches the key in the target key-value pair table, the current value of the corresponding key in the source key-value pair table can be extracted, and the corresponding translation value can be obtained by accessing the online verification translation server address.

[0083] In step S607, it is determined whether the translated value is consistent with the value of the corresponding key in the target key-value pair table, i.e., whether they match.

[0084] In step S608, if there is a mismatch, the translation is incorrect. The translation error is recorded, and the translation value is used for auxiliary correction, that is, to correct the value with the translation error corresponding to the key in the target key-value pair table.

[0085] In step S609, the target key-value pair table is traversed, and the aforementioned steps are repeated until the traversal is complete.

[0086] In one exemplary embodiment, the translation error messages and omissions can be statistically analyzed, and translation prompts can be generated and output based on the statistical results. This application does not limit the form of the translation prompts, as long as they achieve the intended purpose. These translation prompts can be displayed through an integrated development environment or in a compiler.

[0087] In one exemplary implementation, please refer to Figure 7 It illustrates the process of constructing a multilingual inspection plugin according to an embodiment of this application. Figure 1 The multilingual checking plugin is constructed using the following method:

[0088] S701. In the second target project corresponding to the multilingual inspection plugin, the scanning interface is implemented by inheriting the target class. The target class is the base class for implementing text information inspection, and the scanning interface is used to scan text information in a preset format.

[0089] Please refer to Figure 8 This diagram illustrates the relationship between the multilingual inspection plugin and the development environment in an embodiment of this application. The multilingual inspection plugin is developed based on the integrated development environment (IDE) tool used by the developer and is associated with the compiler through compilation script configuration. The multilingual inspection plugin is automatically triggered and executed during the developer's source code compilation process. The second target project corresponding to the multilingual inspection plugin used to build the plugin is also adapted to this IDE tool.

[0090] In one exemplary implementation, the multilingual checking plugin can be customized based on Lint, a tool for static code analysis that helps programmers discover potential problems and errors in code, thereby improving code quality and maintainability. Custom Lint rules can describe the issues to be detected. This application embodiment can implement a customized multilingual checking plugin based on Lint, enabling the detection of omissions in internationalized resources and translation quality during development and code compilation, thus solving the problems of omissions and translation matching that exist in manual checking and translation processes in large-scale translation scenarios.

[0091] Please refer to Figure 9 The diagram shows the logic module diagram of the multilingual inspection plugin in an embodiment of this application.

[0092] The local resource scanning module is mainly responsible for scanning and identifying internationalized resource files, primarily string resource files, from the local resource paths of the first target project's source code, and loading these internationalized resource files into memory.

[0093] Configuration Management Module: The configuration management module is mainly used to configure the running parameters of the multilingual verification plugin, such as the internationalization resource version, language type, base language, and the backend service address information for online resource verification.

[0094] Resource inspection module: responsible for checking the completeness and accuracy of internationalization resources in the local source code.

[0095] Assisted correction module: During the resource check, if there are omissions or translation errors in the local internationalization resources, the plugin will indicate the corresponding translation error items or omission items to help developers fix the problems in the internationalization resources.

[0096] For step S701, the target class is not limited, as long as it can serve as a base class for text information inspection. The scanning interface is an interface for scanning text information in a preset format. For example, if the translation result is in XML format, then XML format information can be scanned. XML (eXtensible Markup Language) is a markup language used to mark up electronic documents to give them structure. It allows users to define their own markup languages ​​for data storage and transmission, offering good scalability and flexibility. XML allows users to define their own tags and attributes, creating markup languages ​​suitable for specific applications as needed. XML files have a strict structure; data is organized in a tree structure, and each element can contain child elements and attributes. This structured characteristic makes XML very suitable for data exchange and storage. The tags and attributes in XML files have clear semantics, clearly describing the content of the data. XML files are in plain text format, allowing them to be read, written, and transmitted on different operating systems and platforms, exhibiting excellent cross-platform compatibility.

[0097] S702. Rewrite the node processing method interface in the scanning interface, the node processing method interface being used to implement the detection.

[0098] In one implementation, the detection can detect whether there are translation omissions in the object being detected, and / or whether the translation result of the object being detected is accurate.

[0099] S703. Inherit the rule registration base class to expose the external plugin detection interface. The rule registration base class is used to register and manage the preset rule set for static code analysis.

[0100] The rule registration base class can register and manage rule sets based on Lint static code analysis.

[0101] S704. Compile the second target project into a multilingual checking plugin in binary file form, configure the multilingual checking plugin in the plugin directory of the development tool corresponding to the first target project, restart the development tool, and configure the import rules of the multilingual checking plugin.

[0102] In one specific implementation, please refer to Figure 10 It illustrates the process of constructing a multilingual inspection plugin according to an embodiment of this application. Figure 2 The construction method includes the following details:

[0103] Step S1001: Create a new project for developing the multilingual inspection plugin, i.e., the second target project. In the project's configuration file, configure the dependency projects that the plugin development needs to reference.

[0104] In the second target project, write code that inherits the Detector class and implements the XmlScanner interface. The Detector class is the base class for implementing text information inspection and is a base class supported by Java programming. Java is a widely used high-level programming language with features such as simplicity, object-oriented programming, distributed nature, interpretation, robustness, security, architecture neutrality, portability, multithreading, and dynamic capabilities. The design goal of Java is to make writing, compiling, debugging, and running code easier, while also possessing strong cross-platform compatibility.

[0105] Rewrite the visitNode interface of XmlScanner. The XmlScanner interface is used to scan information in XML format, and the visitNode interface is used to implement the detection.

[0106] In addition to overriding the XmlScanner's visitNode interface, it is necessary to inherit the IssueRegistry class to expose an external multilingual checking plugin detection interface, so that the multilingual checking plugin can be discovered and loaded by the toolchain of the integrated development environment.

[0107] Step S1002: In the visitNode interface, complete the two main detection processes for internationalization resource detection: resource omission detection and resource accuracy detection.

[0108] Step S1003: After completing the development process of the multilingual checking plugin, the build tool for the multilingual checking plugin needs to be used to compile the source code of the second target project into a binary product. The final product is a JAR file. A JAR (Java Archive) file is a format used to package multiple Java class files and related information into a single file. JAR files can significantly reduce file size, making them easier to store and transmit.

[0109] Step S1004: Copy the generated JAR file to the plugins directory of the development tool, then restart the development tool, and configure the custom rules for importing the multilingual checking plugin in the project's lint.xml file. This embodiment does not limit the rules; they can be designed according to the scenario and do not constitute an obstacle to implementation.

[0110] Step S1005: After completing the source code writing, release, and plugin import configuration of the multilingual checking plugin, it is also necessary to configure the runtime configuration information of the multilingual checking plugin, which mainly includes: the version of the internationalization resource, the language type of the internationalization resource, the base language type of the internationalization resource, and the address of the backend translation service used for online translation verification.

[0111] By building a multilingual checking plugin, we can solve the problems of missing characters and inaccurate translations in the process of translating internationalized resources in related technologies. The multilingual checking plugin can check and prompt problems with internationalized resources during the compilation process, thereby improving the efficiency of internationalized resource translation and verification and reducing labor costs.

[0112] The following are embodiments of the apparatus of this application, which can be used to execute embodiments of the method of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method of this application.

[0113] Please refer to Figure 11 This diagram illustrates a block diagram of a multilingual information processing apparatus according to an exemplary embodiment. The apparatus has the functionality to implement the aforementioned multilingual information processing method; this functionality can be implemented in hardware or by hardware executing corresponding software. The apparatus can be a computer device or can be located within a computer device. The apparatus may include:

[0114] The translation interaction module 1101 is used to send the internationalized resource to be translated to the translation platform. The translation platform is used to push the translation task for translating the internationalized resource to the translation client and generate the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project.

[0115] Translation update module 1102 is used to call the translation resource interface to update the translation result in the source code of the first target project;

[0116] The compilation processing module 1103 is used to trigger the multilingual checking plugin during the compilation of the source code of the first target project by the compiler. The multilingual checking plugin exposes an external plugin detection interface, so that the multilingual checking plugin is automatically loaded by the compiler. The multilingual checking plugin is used to detect the translation results and output the detection results.

[0117] In one exemplary embodiment, the compilation processing module 1103 is configured to perform the following operations:

[0118] In the second target project corresponding to the multilingual inspection plugin, the scanning interface is implemented by inheriting the target class. The target class is the base class for implementing text information inspection, and the scanning interface is used to scan text information in a preset format.

[0119] Rewrite the node processing method interface in the scanning interface, which is used to implement the omission detection and accuracy detection.

[0120] The rule registration base class, which inherits from the base class, exposes the plugin detection interface. The base class is used to register and manage preset rule sets for static code analysis.

[0121] Compile the second target project into a multilingual checking plugin in binary file form, configure the multilingual checking plugin in the plugin directory of the development tool corresponding to the first target project, restart the development tool, and configure the import rules for the multilingual checking plugin.

[0122] In one exemplary embodiment, the compilation processing module 1103 is configured to perform the following operations:

[0123] In the first target project, configure the internationalization resource version, language type, base language type, and translation server address required for the multilingual checking plugin to run. The language type of the internationalization resource is the language type corresponding to the translation result.

[0124] In one exemplary implementation, the multilingual checking plugin performs the following operations:

[0125] Obtain the character resources corresponding to the base language type. The character resources are stored in key-value pairs to form a source key-value pair table, where the key corresponds to the character identifier and the value corresponds to the value of the character identifier.

[0126] Based on the language type of the internationalization resource, the path where the translation result is located is accessed through the source code of the first target project to obtain the target key-value pair table corresponding to the translation result;

[0127] If the first key value in the source key-value pair table does not exist in the target key-value pair table, then translation omission information corresponding to the first key value is generated.

[0128] In one exemplary implementation, the multilingual checking plugin performs the following operations:

[0129] If the second key value of the source key-value pair table exists in the target key-value pair table, extract the current value corresponding to the second key value, and obtain the translation value corresponding to the current value through the translation server address of the online verification;

[0130] If the value corresponding to the second key value in the target key-value pair table is different from the translation value, then translation error information corresponding to the second key value is generated.

[0131] In one exemplary embodiment, the compilation processing module 1103 is configured to perform the following operations:

[0132] The system compiles statistics on all translation errors and omissions, and generates and outputs translation prompts based on the statistical results.

[0133] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0134] Please refer to Figure 12 It illustrates a structural block diagram of a computer device according to an exemplary embodiment, for performing the above-described multilingual information processing method. Specifically:

[0135] Computer device 1200 includes a central processing unit (CPU) 1201, a system memory 1204 including random access memory (RAM) 1202 and read-only memory (ROM) 1203, and a system bus 1205 connecting the system memory 1204 and the CPU 1201. Computer device 1200 also includes a basic input / output system (I / O system) 1206 to facilitate information transfer between various devices within the computer, and a mass storage device 1207 for storing the operating system 1213, application programs 1214, and other program modules 1215.

[0136] The basic input / output system 1206 includes a display 1208 for displaying information and an input device 1209 for user input, such as a mouse or keyboard. Both the display 1208 and the input device 1209 are connected to the central processing unit 1201 via an input / output controller 1210 connected to the system bus 1205. The basic input / output system 1206 may also include the input / output controller 1210 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1210 also provides output to a display screen, printer, or other types of output devices.

[0137] Mass storage device 1207 is connected to central processing unit 1201 via a mass storage controller (not shown) connected to system bus 1205. Mass storage device 1207 and its associated computer-readable media provide non-volatile storage for computer device 1200. That is, mass storage device 1207 may include computer-readable media (not shown) such as hard disk or CD-ROM (Compact Disc Read-Only Memory) drive.

[0138] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1204 and mass storage device 1207 described above can be collectively referred to as memory.

[0139] According to various embodiments of this application, the computer device 1200 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 1200 can be connected to the network 1212 via the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 can be used to connect to other types of networks or remote computer systems (not shown).

[0140] The aforementioned memory also includes a computer program stored in the memory and configured to be executed by one or more processors to implement the aforementioned multilingual information processing method.

[0141] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is executed by a processor to implement the multilingual information processing method.

[0142] Specifically, the multilingual information processing method includes:

[0143] The internationalized resource to be translated is sent to the translation platform, which pushes the translation task for translating the internationalized resource to the translation client, and generates the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project.

[0144] Call the translation resource interface to update the translation result in the source code of the first target project;

[0145] During the compilation of the source code of the first target project by the compiler, the multilingual checking plugin is triggered. The multilingual checking plugin exposes an external plugin detection interface, which allows the compiler to automatically load the multilingual checking plugin. The multilingual checking plugin is used to detect the translation results and output the detection results.

[0146] In one exemplary implementation, the multilingual checking plugin is constructed using the following method:

[0147] In the second target project corresponding to the multilingual inspection plugin, the scanning interface is implemented by inheriting the target class. The target class is the base class for implementing text information inspection, and the scanning interface is used to scan text information in a preset format.

[0148] Rewrite the node processing method interface in the scanning interface, which is used to implement the omission detection and accuracy detection.

[0149] The rule registration base class, which inherits from the base class, exposes the plugin detection interface. The base class is used to register and manage preset rule sets for static code analysis.

[0150] Compile the second target project into a multilingual checking plugin in binary file form, configure the multilingual checking plugin in the plugin directory of the development tool corresponding to the first target project, restart the development tool, and configure the import rules for the multilingual checking plugin.

[0151] In one exemplary embodiment, the method further includes:

[0152] In the first target project, configure the internationalization resource version, language type, base language type, and translation server address required for the multilingual checking plugin to run. The language type of the internationalization resource is the language type corresponding to the translation result.

[0153] In one exemplary implementation, the multilingual checking plugin performs the following operations:

[0154] Obtain the character resources corresponding to the base language type. The character resources are stored in key-value pairs to form a source key-value pair table, where the key corresponds to the character identifier and the value corresponds to the value of the character identifier.

[0155] Based on the language type of the internationalization resource, the path where the translation result is located is accessed through the source code of the first target project to obtain the target key-value pair table corresponding to the translation result;

[0156] If the first key value in the source key-value pair table does not exist in the target key-value pair table, then translation omission information corresponding to the first key value is generated.

[0157] In one exemplary implementation, the multilingual checking plugin performs the following operations:

[0158] If the second key value of the source key-value pair table exists in the target key-value pair table, extract the current value corresponding to the second key value, and obtain the translation value corresponding to the current value through the translation server address of the online verification;

[0159] If the value corresponding to the second key value in the target key-value pair table is different from the translation value, then translation error information corresponding to the second key value is generated.

[0160] In one exemplary embodiment, the method includes:

[0161] The system compiles statistics on all translation errors and omissions, and generates and outputs translation prompts based on the statistical results.

[0162] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0163] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the multilingual information processing method described above.

[0164] It should be understood that "multiple" as mentioned herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0165] In addition, in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0166] The above are merely exemplary embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A multilingual information processing method, characterized in that, The method includes: The internationalized resource to be translated is sent to the translation platform, which pushes the translation task for translating the internationalized resource to the translation client, and generates the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project. Call the translation resource interface to update the translation result in the source code of the first target project; During the compilation of the source code of the first target project by the compiler, the multilingual checking plugin is triggered. The multilingual checking plugin exposes an external plugin detection interface, which allows the compiler to automatically load the multilingual checking plugin. The multilingual checking plugin is used to detect the translation results and output the detection results.

2. The method according to claim 1, characterized in that, The multilingual checking plugin is constructed using the following method: In the second target project corresponding to the multilingual inspection plugin, the scanning interface is implemented by inheriting the target class. The target class is the base class for implementing text information inspection, and the scanning interface is used to scan text information in a preset format. Rewrite the node processing method interface in the scanning interface, which is used to implement detection; The rule registration base class, which inherits from the base class, exposes the plugin detection interface. The base class is used to register and manage preset rule sets for static code analysis. Compile the second target project into a multilingual checking plugin in binary file form, configure the multilingual checking plugin in the plugin directory of the development tool corresponding to the first target project, restart the development tool, and configure the import rules for the multilingual checking plugin.

3. The method according to claim 1 or 2, characterized in that, The method further includes: In the first target project, configure the internationalization resource version, language type, base language type, and translation server address required for the multilingual checking plugin to run. The language type of the internationalization resource is the language type corresponding to the translation result.

4. The method according to claim 3, characterized in that, The multilingual checking plugin performs the following operations: Obtain the character resources corresponding to the base language type. The character resources are stored in key-value pairs to form a source key-value pair table, where the key corresponds to the character identifier and the value corresponds to the value of the character identifier. Based on the language type of the internationalization resource, the path where the translation result is located is accessed through the source code of the first target project to obtain the target key-value pair table corresponding to the translation result; If the first key value in the source key-value pair table does not exist in the target key-value pair table, then translation omission information corresponding to the first key value is generated.

5. The method according to claim 4, characterized in that, The multilingual checking plugin performs the following operations: If the second key value of the source key-value pair table exists in the target key-value pair table, extract the current value corresponding to the second key value, and obtain the translation value corresponding to the current value through the translation server address of the online verification; If the value corresponding to the second key value in the target key-value pair table is different from the translation value, then translation error information corresponding to the second key value is generated.

6. The method according to claim 5, characterized in that, The method includes: The system compiles statistics on all translation errors and omissions, and generates and outputs translation prompts based on the statistical results.

7. A multilingual information processing device, characterized in that, The device includes: The translation interaction module is used to send the internationalized resource to be translated to the translation platform. The translation platform is used to push the translation task for translating the internationalized resource to the translation client and generate the translation resource interface corresponding to the translation task based on the translation result. The internationalized resource to be translated belongs to the first target project. The translation update module is used to call the translation resource interface to update the translation result in the source code of the first target project; The compilation processing module is used to trigger the multilingual checking plugin during the compilation of the source code of the first target project by the compiler. The multilingual checking plugin exposes an external plugin detection interface, so that the multilingual checking plugin is automatically loaded by the compiler. The multilingual checking plugin is used to detect the translation results and output the detection results.

8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the multilingual information processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the multilingual information processing method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes computer instructions, the processor of the computer device reads the computer instructions, and the processor of the computer device executes the computer instructions to implement the multilingual information processing method as described in any one of claims 1 to 6.