Localization enhancement for applications

The localization enhancement device improves translation quality by identifying and modifying text strings with static and injected portions, ensuring natural language phrasing and reducing translation costs by addressing potential issues before deployment.

US20260377299A1Pending Publication Date: 2026-11-26HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/216316
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing translation methods for software applications fail to maintain natural language phrasing when translating static and injected portions of text strings across different languages, leading to awkward translations due to inconsistent handling of gendered nouns and variable conditions.

Method used

A localization enhancement device identifies text strings with static and injected portions in source code, applies tests to ensure proper isolation, and generates proposed modifications to improve translatability, ensuring natural language phrasing by moving articles and phrases to the appropriate portions.

Benefits of technology

Enhances translation quality by preventing awkward phrasing, improving translation speed, accuracy, and reducing costs by preemptively addressing potential translation issues before deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377299A1-D00000_ABST
    Figure US20260377299A1-D00000_ABST
Patent Text Reader

Abstract

In certain examples, a method includes obtaining source code of an application that includes text strings in a native language; determining that the source code includes a text string that is to be translated into other languages, and that includes a static portion and an injected portion; executing a set of localization enhancement tests, that are each separately configured to identify whether the text string includes a potential translation problem; and based on at least one test of the set of localization enhancement tests identifying that the text string includes the potential translation problem: generating a proposed modification to the text string, where the proposed modification modifies a split in the text string between the static portion and the injected portion of the text string; and denying a commit of the source code to a source code repository.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND

[0001] User interfaces for software applications (e.g., cloud-based applications) are often rendered using the native language of the entity providing the software. Such applications are often used in any number of locations where the local language is not the same as the native language of the entity providing the application. Therefore, it may be useful to translate the text of the user interface into any number of other languages.BRIEF DESCRIPTION OF THE DRAWINGS

[0002] Certain examples discussed herein will be described with reference to the accompanying drawings listed below. However, the accompanying drawings illustrate only certain aspects or implementations of examples described herein by way of example, and are not meant to limit the scope of the claims. Aspects of the present disclosure are best understood from the following detailed description when read with the accompanying figures. For a more complete understanding of this disclosure, and advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:

[0003] FIG. 1 shows a block diagram of a system for localization enhancement for applications, in accordance with one or more examples disclosed herein;

[0004] FIG. 2 shows a localization enhancement device, in accordance with one or more examples disclosed herein;

[0005] FIG. 3 illustrates an overview of an example method for enhancing localization of an application, in accordance with one or more examples disclosed herein;

[0006] FIG. 4 illustrates a block diagram of a computing device, in accordance with one or more examples disclosed herein; and

[0007] FIG. 5 illustrates a block diagram of a computing device, in accordance with one or more examples disclosed herein.DESCRIPTION

[0008] Software applications often display text to users in a user interface of the application in order to convey information. As an example, cloud-based applications are often structured as any number of microservices that operate collectively to provide some service or functionality, in part via a user interface through which text may be provided to a user. Such text is generally in the native language of the entity providing the application (e.g., an entity in the United States of America may produce an application with text in the English language). Producing versions of a user interface in a software application that are translated into multiple languages may require translating the native language text, integrating the translated text with the product, and visually inspecting the product for errors.

[0009] In some instances, the text to be translated includes a static portion and an injected portion. As an example, the application may include text for display to a user that indicates the power state of a server. Such text, in a native language of English, may read “Server test-machine has powered {power_state}”. In such a sentence, the portion “Server test-machine has powered” may be the static portion, and the injected portion may be {power_state}. In general, when the text string is rendered in a user interface, the static portion should remain the same, and the injected portion will change depending on a condition (in this case, the power state of the server). As an example, the aforementioned text string may be rendered as “Server test-machine has powered on” or “Server test-machine has powered off”, depending on the power state of the server (e.g., the condition on which the injected portion depends).

[0010] In one or more examples, the translation effort for an application may request that a translation service translate the static portions of text in the application, separate from whatever will be injected by the application as the injected portion. Continuing the above example, a translation service may be requested to translate “Server test-machine has powered”. However, because various languages are structured differently, such a translation may lead to awkward phrasing in the language to which the application is being translated, which may reduce the quality of and user satisfaction with the application.

[0011] As an example, in German, the English phrase “powered on” should be translated “eingeschaltet”, and the English phrase “powered off” should be translated “ausgeschaltet”. Thus, a translation of “Server test-machine has powered” followed by an injected portion indicating on or off would not read naturally if translated into German, as the word “powered” (which is in the static portion) is combined with either “on” or “off” (which is in the injected portion) in a single word in German. Thus, asking a translation service to translate the static portion “Server test-machine has powered” into German may lead to a complete translation of the text (e.g., including the static portion and the injected portion) that reads awkwardly in German, as the translation service may be forced to use a non-native way of stating the power state of the server.

[0012] As another example, in English, nouns are often genderless, as are corresponding articles that may precede such nouns. However, in other languages (e.g., Spanish, Portuguese, French, Italian, German, Russian, Hindi, Marathi, Hausa, Arabic, Hungarian, Greek, Romanian, and others), nouns, may, as an example, have a masculine, a feminine, or, in some cases, a neutral form, which may affect the article preceding the noun (e.g., the article changes depending on the gender of the noun). As an example, in English, the article “the” is often used to precede a noun. However, in German, the word “the” may be translated to “der” when the following noun is feminine, “die” when the following noun is masculine, and “das” when the following noun is neutral. As another example, in Spanish, el and un are used with masculine gendered nouns, while la and una are used with feminine gendered nouns. Thus, when a translation service is tasked with translating a static portion of text that includes an article preceding an injected portion, translating the article may be challenging, as the injected portion may be a noun, which may be masculine, feminine, or neutral, for which the article would need to be different for the text to read naturally in the language into which the text is translated.

[0013] In order to address, at least in part, the above-described challenges with translating an application from a native language to any number of other languages, examples disclosed herein include systems and methods for identifying text strings to be translated from the source code of an application, identifying when such text strings include one or more injected portions (which are variable depending on a condition) along with static portions for which translation will be needed, executes a variety of tests on such text, and proposes modification(s) of the text strings, so that, after translation is requested and performed, the translated text is more likely to read naturally in the language to which the text is translated.

[0014] In one or more examples, source code for an application (e.g., a set of microservices of a cloud-based application) includes text strings that are to be rendered in a user interface of the application. As an example, a cloud-based application for monitoring and managing cloud infrastructure (e.g., devices and software deployed in a cloud computing environment) may have a user interface, and text strings that provide information about aspects of the cloud infrastructure that are to be rendered for viewing by a user of the user interface may be included in the source code of the application. Such text strings in the source code may include a static portion and an injected portion. The static portion may be a portion of the text string that is not intended to change, and the injected portion may be variable depending on a condition of some type (e.g., the state of a component in a cloud infrastructure).

[0015] Source code for an application, including text strings that may be rendered when the application executes, is often checked into a source code repository, from which instances of the application may be built and deployed. As an example, the source code of any number of microservices of a cloud-based application may have source code that is checked into a source code repository of the cloud-based application, from which instances of the application may be built or otherwise deployed. In such an example, the source code for the microservices may include any number of text strings that would be rendered in a user interface of the cloud-based application.

[0016] When an application is intended for use by users that prefer to communicate in any number of different languages, the text strings in the source code of the application must be translated from a native language (e.g., a language used by the developers of the source code of the application) to each of the other languages that the application is to configured to support. Translating an application during runtime is generally facilitated, at least in part, via a process of internationalization and localization.

[0017] In such a process, the source code of the application may be assessed, the text strings in the source code of the application may be identified. Such text strings, or portions thereof, are often replaced with markers or variables, which is referred to as internationalization.

[0018] The original native language text strings are then collected into a resource bundle of all native language text strings, which may include any number of files, each including a portion of the native language text of the application. During runtime for a user that views the application in the native language, the user interface's presentation layer replaces the internationalization markers with the correct strings from the native language files.

[0019] In order to support multiple languages or locales, the set of native language text strings are translated and bundled into resource bundles similar to the native language bundle, but including text in other languages. When the application is executed, and a particular language is selected by a user, the language files corresponding to the selected language are used to replace the internationalization markers. The process of replacing internationalization markers with text strings in a user-selected language may be referred to as localization.

[0020] In order to facilitate the above-described process of internationalization and localization, the text strings of an application, which may be obtained from the source code of the application, are often provided to a translation service for translation. The translation service may return the translations of the text stings in any number of languages to be used as language files in resource bundles during the localization process as the application executes.

[0021] However, as discussed above, in some instances, the text strings include static portions and injected portions, and tasking the translation service with fully translating the static portions to be properly combined at runtime with the injected portions may lead to awkward phrasing in the language(s) into which the text strings are translated.

[0022] Therefore, in one or more examples, before such source code may be checked into a final source code repository from which the application may be built or otherwise deployed, and, thus, before the text strings from the source code are provided to a translation service for translation, a localization enhancement device may be configured to obtain the source code (e.g., from an initial source code repository). In one or more examples, the localization enhancement device may assess the source code to identify any text strings therein that require translation, and that include both a static portion and an injected portion.

[0023] In one or more examples, once the localization enhancement device obtains text strings from the source code that include both a static portion and an injected portion, the localization enhancement device may be configured to execute a set of localization enhancement tests on the text strings. In one or more examples, the localization enhancement tests are configured to identify when such text strings have a split (e.g., a boundary) between the static portion and the injected portion that may be problematic for a translation service, and to provide proposed modifications (e.g., to the splits between static portions and injected portions of the text strings).

[0024] The localization enhancement device may, in effect, reject or otherwise prevent source code from being checked into a final source code repository when any text strings do not pass all of the localization enhancement tests and / or are determined to have proposed modifications to improve the translatability of the text strings. In one or more examples, the proposed modifications are provided to the developers of the source code, who may then modify the text strings based on the proposed modifications from the localization enhancement device. In one or more examples, once the localization enhancement device assesses the updated source code and determines that the text strings therein that include static and injected portions pass all of the localization enhancement tests, the source code may be checked into the final source code repository.

[0025] In one or more examples, a first localization enhancement test executed by the localization enhancement device may be an article test. In one or more examples, an article test is a test that determines if a text string that includes a static portion and an injected portion has an article (e.g., ‘a’, ‘an’, ‘the’, and the like) that immediately precedes the injected portion. As an example, if the application is an application related to a retail environment, a restaurant, or the like, the source code may include a text string as follows: “The {wait staff person} will see you now”. In such a sentence, “The” and “will see you now” are the static portion, and {wait staff person} is the injected portion. In such an example, the localization enhancement device executing the article test would identify this text string as being potentially problematic for a translator, because the article “The” immediately precedes the injected portion. Based on such an identification, the localization enhancement device may generate a proposed modification to the text string as follows: {the wait staff person} will see you now. In the proposed modification, the split between the static portion of the text string and the injected portion of the text string is modified such that the injected portion now includes the article that immediately preceded the injected portion prior to the modification.

[0026] In one or more examples, a second localization enhancement test executed by the localization enhancement device may be a phrase identification test. In one or more examples, a phrase identification test is a test that determines if the text strings from the source code of the application include phrases that should not be split. In one or more examples, such phrases may be stored, as an example, in a phrase repository of (or otherwise accessible to) the localization enhancement device. The text strings obtained from the source code may be compared with the phrases in such a repository to identify any instances where a phrase that should not be split (e.g., ‘powered off’ or ‘powered on’ from the example above) is, in fact, split such that some of the phrase is in the static portion of the text string, and some of the phrase is in the injected portion of the text string (e.g., “powered {on or off}”).

[0027] Based on such an identification, the localization enhancement device may generate a proposed modification to the text string in which the phrase, as a whole, is included in the injected portion. As an example, the dictionary test may identify the text string “Server test-machine is powered {power state}” as including the phrase “powered {power state}”, which corresponds to (e.g., is at least a partial match of) the phrases “powered on” and “powered off” in the phrase repository. Based on such an identification, the localization enhancement device may generate a proposed modification of “Server test-machine is {powered power_state}”. In the proposed modification, the split between the static portion of the text string and the injected portion of the text string is modified such that the injected portion now includes the entire phrase that matched (partially) one or more phrases of the repository of phrases that should not be split.

[0028] In one or more examples, a third localization enhancement test executed by the localization enhancement device may be a translation test. In one or more examples, a translation test includes performing a machine translation of the static portion of the text string, as well as a machine translation of instances of the text string where the injected portion is replaced with at least some number of the possible text options of the variable injected portion. In one or more examples, to perform the machine translation, the localization enhancement device may be configured to include one or more machine learning models (e.g., neural networks) for natural language processing and language translation.

[0029] As an example, the localization translation device may perform a machine translation of “Server test-machine has powered”, “Server test machine has powered on” and “Server test-machine has powered off” for at least a portion of the languages into which the application text strings are to be translated. In one or more examples, the localization enhancement device obtains a word count of the translated static portion of the text string, as well as a word count of the translations of the various versions of the text string as a whole that include the static portion and the variations of the injected portion.

[0030] In one or more examples, if the word count of the translation of the static portion is less than the word count of each of the translations of the variations of the entire text string, then the localization enhancement device has identified proper isolation between the static portion of the text string and the injected portion of the text string. If the localization enhancement device determines that the word count of the static portion of the text string matches the word count of any of the word counts of the translated variations of the entire text string, then the localization enhancement device determines that the static portion of the text string and the injected portion of the text string are not properly isolated.

[0031] In one or more examples, in the event of a determination by the localization enhancement device that the static and injected portions of the text string are not properly isolated, the localization enhancement device may be further configured to provide a proposed modification to the text string. The proposed modification may be generated by iteratively expanding the injected portion to include additional words from the static portion until the above-described translation test passes (e.g., the word count of the static portion is less, in all cases, than the word count of the translated variations of the entire text string). In one or more examples, once the translation test is passed by a proposed modification, the proposed modification may be selected as the final proposed modification by the localization enhancement device.

[0032] In one or more examples, each of the above-described tests may be executed on each of the text strings obtained from source code of an application that are to be translated, and include a static portion and an injected portion. In one or more examples, if any of the tests result in an identification of a text string for which a modification is proposed, the source code may not be allowed to be committed to the final source code repository. The denial of the commit, the text strings that lead to the denial, and / or the proposed modification may then be provided from the localization enhancement device to the developer of the source code.

[0033] The developer may then modify the source code based on the proposed modifications, and re-submit the source code to an initial source code repository, from which the updated source code may be obtained by the localization enhancement device. In one or more examples, once the source code is subjected to the above-described tests, and no text string is identified as requiring modification to improve the ability of a translation service to effectively translate the text string, the source code may be committed to the final source code repository, after which, for example, the source code may be further subjected to the above-described processes of internationalization and localization.

[0034] Examples disclosed herein may preemptively address potential problems for a translation service when translating text strings of an application from a native language to any number of other languages by identifying text strings having a static portion and an injected portion, executing a set of localization enhancement tests to determine if any such text strings could pose a translation problem, and generating proposed modifications to address the potential translation problems, which may, for example improve the translation process in terms of speed, cost, accuracy, and the like.

[0035] FIG. 1 shows a block diagram of a system for localization enhancement for applications, in accordance with one or more examples disclosed herein. As shown in FIG. 1, the system may include a localization enhancement device 100, an initial source code repository 108, a final source code repository 110, a translation repository 112, and a translation service 114. The localization enhancement device may include a localization enhancement test A component 102, a localization enhancement test B component 104, and a localization enhancement test C component 106. Each of these components is described below.

[0036] In one or more examples, the localization enhancement device 100 is any hardware (including circuitry), or software and / or firmware executing using hardware, that is configured to obtain source code for an application (e.g., from the initial source code repository 108, discussed below), identify text strings within the source code that include a static portion and an injected portion, perform a set of localization enhancement tests on such text strings, and, if necessary, generate proposed modifications to one or more of the text strings based on the results of one or more of the set of localization enhancement tests executed by one or more localization enhancement test components (e.g., 102, 104, 106, discussed below).

[0037] As an example, the localization enhancement device 100 may be a computing device. In one or more examples, as used herein, a computing device may be any single computing device, a set of computing devices, a portion of one or more computing devices, or any other physical, virtual, and / or logical grouping of computing resources. Non-limiting examples of a computing device are shown in FIG. 4 and FIG. 5, which are described below. In one or more examples, a computing device may be any device of any type that is configured to host all or any portion of one or more operating systems, applications, microservices, clustered environment services, virtualized environments, storage services, network services, and / or any other computing function, which may include executing instructions, performing operations, executing functions, performing computations, and the like.

[0038] In one or more examples, a computing device is any device, portion of a device, or any set of devices capable of electronically processing instructions and may include, but is not limited to, any of the following: one or more processors (e.g. components that include circuitry) (not shown), memory (e.g., random access memory (RAM)) (not shown), input and output device(s) (not shown), non-volatile storage hardware (e.g., solid-state drives (SSDs), persistent memory (Pmem) devices, hard disk drives (HDDs) (not shown)), one or more physical interfaces (e.g., network ports, storage ports) (not shown), any number of other hardware components (not shown), and / or any combination thereof. As used herein, a processor may be any component that can be configured to execute operations. Examples of a processor include, but are not limited to, central processing units (CPUs), multi-core CPUs, application-specific integrated circuits (ASICs), accelerators (e.g., graphics processing units (GPUs)), field programmable gate arrays (FPGAs), and the like. Other types of processors may be used without departing from the scope of examples disclosed herein, such as, for example, the various types of processors included in the description of FIG. 5, below.

[0039] Examples of computing devices may include, but are not limited to, a server (e.g., a blade-server in a blade-server chassis, a rack server in a rack, any other type of server device), a desktop computer, a mobile device (e.g., laptop computer, smart phone, personal digital assistant, tablet computer, automobile computing system, and / or any other mobile computing device), a storage device (e.g., a disk drive array, a fibre channel storage device, an Internet Small Computer Systems Interface (iSCSI) storage device, a tape storage device, a flash storage array, a network attached storage device, and the like), a network device (e.g., switch, router, multi-layer switch, access point, and the like), a virtual machine, a virtualized computing environment, a container, a container pod, an Internet of Things (IoT) device, an array of nodes of computing resources, a supercomputing device, a data center or any portion thereof, and / or any other type of computing device.

[0040] As one of ordinary skill in the art will appreciate, any of the aforementioned examples of computing devices necessarily require at least some hardware components. As an example, a virtual machine, a container, and / or a container pod, when considered herein as a computing device, or a portion of a computing device, includes the underlying hardware on which the virtual machine, container, and / or container pod executes.

[0041] In one or more examples, any or all the aforementioned examples may be combined to create a system of such devices, or may be partitioned into separate logical devices, which may individually or collectively be referred to as a computing device. Other types of computing devices may be used without departing from the scope of examples described herein.

[0042] In one or more examples, the storage and / or memory of a computing device or system of computing devices, may be and / or include one or more data repositories for storing any number of data structures storing any amount of data (e.g., information) of any type. In one or more examples, a data repository is any type of storage unit and / or device (e.g., a file system, database, collection of tables, RAM, and / or any other storage mechanism or medium) for storing data. Further, the data repository may include multiple different storage units and / or devices. The multiple different storage units and / or devices may or may not be of the same type or located at the same physical location.

[0043] In one or more examples, any storage and / or memory of a computing device, system of computing devices, or portion of a computing device may be considered, in whole or in part, as one or more non-transitory computer readable mediums storing software and / or firmware.

[0044] Such software and / or firmware may include instructions which, when executed by the one or more processors (not shown) and / or other hardware (e.g., circuitry) of a computing device and / or system of computing devices, cause the one or more processors and / or other hardware components to perform operations in accordance with one or more examples described herein.

[0045] The instructions may be in the form of computer readable program code to perform methods, processes, and the like of examples described herein, and may, as an example, be stored, in whole or in part, temporarily or permanently, on a non-transitory computer readable medium such as a compact disc (CD), digital versatile disc (DVD), storage device, diskette, tape storage, flash storage, physical memory, or any other non-transitory computer readable medium.

[0046] In one or more examples, the localization enhancement device 100 is operatively connected to the initial source code repository 108. In one or more examples, the initial source code repository 108 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware, that is configured to store initial source code of an application. As an example, the initial source code repository 108 may be all or any portion of a computing device (described above). The initial source code repository 108 may be or include any number of storage devices configured to store source code of an application.

[0047] As an example, the initial source code repository 108 may be a centralized storage system in which source code for applications in the process of development is stored, managed, tracked, and the like. In one or more examples, once source code for all or any portion of an application has been developed, it may be stored (e.g., uploaded) to the initial source code repository 108. In one or more examples, the initial source code repository 108 is intended to store non-final versions of the source code, so that the source code may, for example, be subjected to any number of tests, validations, quality checks, and the like, prior to being committed to a final source code repository (e.g., the final source code repository 110, discussed below) from which production instances of the application may be built or otherwise deployed.

[0048] In one or more examples, the initial source code repository 108 is operatively connected to the final source code repository 110. In one or more examples, the final source code repository 110 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware, that is configured to store final (e.g., ready-for-production) source code of an application. As an example, the final source code repository 110 may be all or any portion of a computing device (described above). The final source code repository 110 may be or include any number of storage devices configured to store source code of an application. As an example, the final source code repository 110 may be a centralized storage system in which final source code for applications that have been developed is stored, managed, tracked, and the like. In one or more examples, the final source code repository 110 may be used for building or otherwise deploying instances of the application (e.g., via processes of compilation, interpretation, and the like).

[0049] Although FIG. 1 shows the initial source code repository 108 and the final source code repository 110 as separate components, in some examples the initial source code repository 108 and the final source code repository 110 may each be part of the same device (e.g., computing device) or system of devices. Additionally, or alternatively, although FIG. 1 shows a single initial source code repository 108 and a single final source code repository 110, the system may include any number of initial and / or final source code repositories without departing from the scope of examples disclosed herein. Additionally, although FIG. 1 shows the localization enhancement device 100 separate from other components and devices of FIG. 1, in one or more examples, all or any portion of the localization enhancement device 100 may be part of one or more other components and / or devices (e.g., the initial source code repository 108, the final source code repository 110, and the like) shown in FIG. 1.

[0050] In one or more examples, the final source code repository 110 is operatively connected to the translation repository 112. In one or more examples, the translation repository 112 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware, that is configured to store text strings of an application that are intended to be rendered for users of the application. In one or more examples, an application may include any number of such text strings, which may, as an example, be intended for rendering within a user interface of the application. As an example, the translation repository 112 may be all or any portion of a computing device (described above). The translation repository 112 may be or include any number of storage devices configured to store text strings of an application.

[0051] In one or more examples, the translation repository is configured to store text strings of an application to avoid having to provide access to the remainder of the source code to entities other than the provider of the application, such as a translation service (e.g., the translation service 114, discussed below). Alternatively, in some examples, one or more entities other than the application provider may be provided access to the final source code repository 110. In such examples, the translation repository 112 may be considered part of the final source code repository 110.

[0052] In one or more examples, the translation repository 112 is configured to provide or otherwise make available to a translation service (e.g., the translation service 114) the text string portions of an application that the application provider desires to have translated into any number of languages other than the native language in which the application was developed. As an example, an application may be developed by a team of English speakers, and, thus, the text strings to be rendered to users during execution of the application may be in English. In such scenarios, the application provider may desire to have the text strings be translated into as many languages as the application is intended to support for users. To that end, the application provider may store the text strings, taken from the source code, in the translation repository 112, so that the text strings may be obtained by one or more translation services (e.g., the translation service 114) to be translated into any number of languages.

[0053] In one or more examples, the system also includes the translation service 114. In one or more examples, the translation service 114 is any entity capable of translating language files from one language to one or more other languages. The translation service may include human translators, machine translators (e.g., machine learning and / or artificial intelligence based translators), or any combination thereof. In one or more examples, the translation service 114 is operatively connected to the translation repository 112. In one or more examples, the translation service 114 may be requested to translate the text strings into any number of non-native languages. As an example, as part of the translation effort, the translation service 114 may be tasked, at least in part, with translating the static portions (discussed above) of text strings that include both a static portion and an injected portion.

[0054] In one or more examples, once the translation service 114 has translated all or any relevant portion of the text strings into any number of non-native languages, the translated text strings may be provided from the translation service 114 back to the translation repository 112 as any number of translated language files. In one or more examples, such translated language files may, for each language, be grouped into translation resource bundles, and added to the final source code repository 110. In one or more examples, the translated language resource bundles may be used during execution of the application to localize the application into a non-native language by using the translated language files therein to replace internationalization markers within the source code of the application, thereby causing the text rendered for a user of the application (e.g., in a user interface) to be rendered in whatever language is preferred by the user and supported by the application provider.

[0055] Although FIG. 1 shows a single translation service 114, the system may include any number of translation services without departing from the scope of examples disclosed herein.

[0056] In one or more examples, the localization enhancement device 100 includes any number of localization enhancement test components, such as (in the example shown in FIG. 1) the localization enhancement test A component 102, the localization enhancement test B component 104, and the localization enhancement test C component 106. In one or more examples, a localization enhancement test component (e.g., 102, 104, 106) is any hardware (e.g., including circuitry), or software and / or firmware executing on hardware, that is configured to execute a localization enhancement test on text strings obtained from source code of an application (e.g., from the initial source code repository 108) that include a static portion and an injected portion.

[0057] In one or more examples, as discussed above, the localization enhancement device 100 may be configured to obtain and / or assess source code of an application (e.g., from the initial source code repository 108) to obtain any text strings in the source code that is to be rendered for users (e.g., via a user interface) of the application and that includes a static portion and an injected portion. In one or more examples, the localization enhancement device 100 may additionally be provided or otherwise configured to obtain any other relevant information to be used by the localization enhancement test components (102, 104, 106) to perform localization enhancement tests, such as, for example, phrases to be tested against the text strings to determine full or partial matches, the various options that may exist for any injected parameter, the set of languages into which the application may be translated, and / or any other relevant information.

[0058] In one or more examples, the text strings obtained by the localization enhancement device 100 are provided to the localization enhancement test components (102, 104, 106) in parallel, after which the localization enhancement test components (102, 104, 106) each perform a localization enhancement test. The localization enhancement device, and the localization enhancement test components therein are discussed in greater detail in the description of FIG. 2, below.

[0059] While FIG. 1 shows a particular configuration of components, other configurations may be used without departing from the scope of examples described herein. For example, although FIG. 1 shows certain components as part of the same device, component, and / or infrastructure, any of the components may be grouped in sets of one or more components which may exist and execute as part of any number of separate and operatively connected devices. As another example, a single component may be configured to perform all, or any portion of the functionality performed by the all or any portion of the components shown in FIG. 1. Accordingly, examples disclosed herein should not be limited to the configuration of components shown in FIG. 1.

[0060] FIG. 2 shows a localization enhancement device 200, in accordance with one or more examples disclosed herein. In the example shown in FIG. 2, the localization enhancement device 200 includes a localization enhancement test A component 202, a localization enhancement test B component 204, and a localization enhancement test C component 206. The localization enhancement test A component 202 may include an article identifier 220 and a proposed modification generator A 222. The localization enhancement test B component 204 may include a phrase identifier 230, a phrase repository 234, and a proposed modification generator B 232. The localization enhancement test C component 206 may include a machine translation component 240, a word count component 244, and a proposed modification generator C 242. Each of these components is discussed below.

[0061] In one or more examples, the localization enhancement device 200, the localization enhancement test A component 202, the localization enhancement test B component 204, and the localization enhancement test C component 206 are the same or substantially similar, respectively, to the localization enhancement device 100, the localization enhancement test A component 102, the localization enhancement test B component 104, and the localization enhancement test C component 106 shown in FIG. 1 and discussed above. As such, for example, the localization enhancement device 200 may be all or any portion of a computing device, and the localization enhancement test components (202, 204, 206) may each be a portion of such a computing device (e.g., software executing on at least a portion of the hardware of the computing device). Although FIG. 2 shows the three localization enhancement test components (202, 204, 206) as part of the same localization enhancement device 200, all or any portion of any number of localization enhancement test components may execute on or across any number of localization enhancement devices without departing from the scope of examples disclosed herein.

[0062] In one or more examples, the localization enhancement device 200 is configured to obtain or otherwise access source code of an application. As an example, the localization enhancement device 200 may obtain or access source code of an application from an initial source code repository (e.g., the initial source code repository 108 shown in FIG. 1 and discussed above). In one or more examples, the localization enhancement device 200 is configured to assess such source code to identify any text strings therein that are to be potentially rendered to a user of the application (e.g., via a user interface), and that also include both a static portion and an injected portion (each of which are discussed above). In one or more examples, the localization enhancement device 200 is configured to provide any text strings from the source code that include a static portion and an injected portion to each of the localization enhancement test components (e.g., 202, 204, 206) of the localization enhancement device 200.

[0063] In one or more examples, the localization enhancement test A component 202 is configured to execute a first localization enhancement test. In one or more examples, the first localization enhancement test is an article test. In one or more examples, an article test is a test that determines if a text string that includes a static portion and an injected portion has, in the static portion, an article (e.g., ‘a’, ‘an’, ‘the’, and the like) that immediately precedes the injected portion.

[0064] In one or more examples, the localization enhancement test A component 202 includes the article identifier 220. In one or more examples, the article identifier 220 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to assess text strings that include a static portion and an injected portion to determine whether the text string includes an article immediately preceding the injected portion. In one or more examples, as discussed above, the static portion of a text string is a portion that should remain the same each time it is rendered, and the injected portion of a text string is a portion that is variable, depending on a condition. In one or more examples, the article identifier 220 is configured to identify any text string in which an article (e.g., for English, ‘a’, ‘an’, ‘the’, and the like) in the static portion immediately precedes an injected portion. In one or more examples, the article identifier 220 is configured to provide any text string identified as including an article immediately preceding an injected portion to the proposed modification generator A 222.

[0065] In one or more examples, the article identifier 220 is operatively connected to the proposed modification generator A 222. In one or more examples, the proposed modification generator A 222 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to receive text strings from the article identifier 220, and to generate proposed modifications to such text strings. In one or more examples, the proposed modification generator A 222 is configured to receive text strings from the article identifier 220 that include a static portion which includes an article immediately preceding an injected portion of the text string. In one or more examples, in response to receiving such a text string, the proposed modification generator A 222 may be configured to generate a modified text string in which the article immediately preceding the injected portion is moved into the injected portion, such that the static portion no longer includes the article.

[0066] As an example, because the injected portion may be a noun, and, in some languages, nouns are gendered, the article preceding the noun may change depending on which noun is used for the injected portion of the text string. Therefore, the proposed modification generator A 222 may generate a proposed modification to the text string in which the article is removed from the static portion, and added to the injected portion. In one or more examples, the proposed modification to the text string may be provided to the developer of the application. The developer of the application may then update the source code of the application to include the proposed modification of the text string. In one or more examples, by making such a modification, the static portion of the text string, which a translation service will be requested to translate, may be fully translated with less chance of the translated static portion leading to awkward or non-standard phrasing in the text string when it is rendered in the language to which it is translated.

[0067] In one or more examples, if any text string is identified by the article identifier 220 that includes an article preceding the injected portion of the text string, and, thus, proposed modification(s) are generated by the proposed modification generator A 222, the article test may be considered as having failed. In one or more examples, if no text string assessed by the article identifier 220 is identified as including a static portion that includes an article that immediately precedes an injected portion, the article test may be considered as having passed.

[0068] In one or more examples, the localization enhancement test B component 204 is configured to execute a second localization enhancement test. In one or more examples, the second localization enhancement test is a phrase identification test. In one or more examples, a phrase identification test is a test that determines if a text strings obtained from source code of an application include phrases that should not be split, where one part of the phrase is in the static portion of the text string, and the other portion may be in the injected portion of the text string.

[0069] In one or more examples, the localization enhancement test B component 204 includes the phrase repository 234. In one or more examples, the phrase repository 234 is any component (e.g., a data structure in a storage component of a computing device) configured to store various phrases. In one or more examples, the phrases that are stored in the phrase repository 234 are phrases that, at least in some languages, should not be split. For example, the phrases ‘powered on’ and ‘powered off’ are phrases that should not be split, as, in some languages (e.g., German) the phrases are a single word. Any number of such phrases may be stored in the phrase repository 234, and new phrases may be added to the phrase repository as they are identified as phrases that should not be split based on how the phrase would be translated in one or more languages.

[0070] In one or more examples, the localization enhancement test B component 204 includes the phrase identifier 230. In one or more examples, the phrase identifier 230 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to assess text strings that include a static portion and an injected portion to determine whether the text string includes, in the static portion, part of one or more phrases that should not be split. As an example, a text string may be assessed to determine if a static portion of the text string includes a word, adjacent to the injected portion, that is a partial match with one or more phrases in a phase repository. Said another way, a text string may be assessed by phrase identifier 230 to determine if any of phrases that should not be split (e.g., phrases stored in the phrase repository 234) are, in the text string, split between the static portion and the injected portion of the text string. Thus, in one or more examples, the phrase identifier 230 may be configured to perform a comparison of the static portion of a text string with the phrases included in the phrase repository 234 to determine if any part of the static portion partially matches one or more phrases in the phrase repository 234. In one or more examples, the phrase identifier 230 is configured to provide any text string identified as including, in the static portion, a partial match of one or more phrases in the phrase repository 234 to the proposed modification generator B 232.

[0071] In one or more examples, the phrase identifier 230 is operatively connected to the proposed modification generator B 232. In one or more examples, the proposed modification generator B 232 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to receive text strings from the phrase identifier 230, and to generate proposed modifications to such text strings. In one or more examples, the proposed modification generator B 232 is configured to receive text strings from the phrase identifier 230 that include a static portion that includes text that partially matches one or more phrases stored in the phrase repository 234. In one or more examples, in response to receiving such a text string, the proposed modification generator B 232 may be configured to generate a modified text string in which the entire portion of the text string that was a partial match with one or more phrases in the phrase repository 234 is moved from the static portion of the text string to the injected portion of the text string, such the entire phrase is within the injected portion of the modified text string.

[0072] As an example, the phrase identifier 230 may assess the text string “Server test-machine is powered {power_state}”, in which “Server test-machine is powered” is the static portion, and {power_state} is the injected portion. The assessment may yield that the word “powered” in the static portion is a partial match with the phrases “powered on” and “powered off” in the phrase repository 234. Thus, in this example, the text string is provided to the proposed modification generator 232. The proposed modification generator B 232 may generate a proposed modification of “Server test-machine is {powered power_state}”. In the proposed modification, the split between the static portion of the text string and the injected portion of the text string is modified such that the injected portion now includes the entire phrase that matched (partially) one or more phrases of the phrase repository 234.

[0073] In one or more examples, if any text string is identified by the phrase identifier 230 that includes a static portion that includes a partial match of one or more phrases in the phrase repository 234, and, thus, proposed modification(s) are generated by the proposed modification generator B 232, the phrase identification test may be considered as having failed. In one or more examples, if no text string assessed by the phrase identifier 230 is identified as including a partial match of one or more phrases in the phrase repository 234, the phrase identification test may be considered as having passed.

[0074] In one or more examples, the localization enhancement test C component 206 is configured to execute a third localization enhancement test. In one or more examples, the third localization enhancement test is a translation test. In one or more examples, a translation test is a test that includes performing a machine translation of a static portion of a text string, as well as a machine translation of instances of the text string where an injected portion is replaced with translated text of at least some number of the possible variations of the text of the injected portion. As an example, the machine translation may translate the static portion “Server is powered” of the text string “Server is powered {power state}”, as well as the complete phrases “Server is powered on” and “Server is powered off”. In one or more examples, a word count may then be performed on the translation of the static portion and on the translation of the completed text strings. In one or more examples, if it is determined that the word count of the static portion of the text string matches the word count of any of the word counts of the translated variations of the entire text string, then the static portion of the text string and the injected portion of the text string are not properly isolated.

[0075] In one or more examples, to perform the machine translation, the localization enhancement test C component 206 includes the machine translation component 240. In one or more examples, the machine translation component 240 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to perform machine translation of text strings from one language to any number of other languages. As an example, the machine translation component 240 may be configured to include one or more machine learning models (e.g., neural networks) for natural language processing and language translation. In one or more examples, the machine translation component 240 may be provided the static portion of text strings, as well as at least a portion of the variations of entire text strings in which the text strings are completed by the possible variations of injected portions of the text strings. The machine translation component 240 may provide the translations to the word count component 244.

[0076] In one or more examples, the machine translation component 240 is operatively connected to the word count component 244. In one or more examples, the word count component 244 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to receive translations of the static portions of a text string, and translations of variations of the complete text string, to perform a word count of the various translations, and to compare the word count of the translated static portion with the word counts of the translated variations of the complete text string. In one or more examples, the word count component 244 is configured to provide any text string identified as having a word count of a translated static portion that matches the word count of any of the translated variations of the complete text string to the proposed modification generator C 242.

[0077] As an example, for the text string “Server test-machine is powered {power_state}”, the static portion “Server test-machine is powered”, when translated into German, may have a word count of four. Additionally, when the variations of the complete text string “Server test-machine is powered on”, and “Server test-machine is powered off” are translated into German, the translated variations both also have a word count of four, as the phrases ‘powered on’ and ‘powered off’ are each only one word in German. Thus, in one or more examples, the text string is provided to the proposed modification generator C 242.

[0078] In one or more examples, the proposed modification generator C 242 is any hardware (e.g., circuitry), or software and / or firmware executing on hardware (e.g., computing resources of a computing device), that is configured to receive text strings (e.g., from the word count component 244), and to generate proposed modifications to such text strings. In one or more examples, in response to receiving a text string, the proposed modification generator C 242 may be configured to generate a modified text string. The proposed modification may be generated by iteratively expanding the injected portion to include additional words from the static portion, and re-performing the above described translations, word counts, and word count comparisons until the word count of the static portion is less, in all cases, than the word count of the translated variations of the entire text string). In one or more examples, once the translation test is passed by a proposed modification, the proposed modification may be selected as the final proposed modification by the proposed modification generator C 242.

[0079] In one or more examples, if any text string is identified by the word count component 244 that includes a static portion which, when translated, has a word count that matches the word count of the translations of one or more variations of the translated complete text string, the translation test may be considered as having failed. In one or more examples, if no text string assessed by the word count component 244 is identified as having a word count that matches the word count of the translations of one or more variations of the translated complete text string, the translation test may be considered as having passed.

[0080] In one or more examples, if any of the localization enhancement tests executed by the localization enhancement test components (202, 204, 206) fail for any text string of the application, the source code may be considered as including one or more text strings that include a potential translation problem. Thus, the localization enhancement device 200 may be configured to prevent the source code of the application from being committed to a final source code repository (e.g., the final source code repository 110 shown in FIG. 1 and discussed above). As an example, the localization enhancement device 200 may set a flag corresponding to the source code that prevents the source code from being committed to the final source code repository.

[0081] In such a scenario, the localization enhancement device 200 may be further configured to provide any proposed modifications generated by the proposed modification generators (222, 232, 242) to the developer of the source code. As an example, the localization enhancement device 200 may cause the proposed modifications to be stored on the initial source code repository, from which the developer of the application may obtain the proposed modifications, and make modifications to the text strings of the source code to modify the split between the static portions and the injected portions of the text strings consistent with the proposed modifications.

[0082] In one or more examples, if all localization enhancement tests for source code assessed by the localization enhancement device 200 pass, and no proposed modifications are generated (e.g., either in the initial assessment of the text strings of the source code or after assessment of source code updated based on proposed modifications generated after a previous assessment), the localization enhancement device 200 may be configured to allow the source code to be committed to a final source code repository. In such a scenario, the source code may be considered as not including any potential translation problems.

[0083] In one or more examples, the various localization enhancement tests executed by the localization enhancement test components (202, 204, 206) of the localization enhancement device 200 may each be executed in parallel, and may each be executed for every text string in the source code identified by the localization enhancement device 200 as including a static portion and an injected portion.

[0084] While FIG. 2 shows a particular configuration of components, other configurations may be used without departing from the scope of examples described herein. For example, although FIG. 2 shows certain components as part of the same device, component, and / or infrastructure, any of the components may be grouped in sets of one or more components which may exist and execute as part of any number of separate and operatively connected devices. As another example, a single component may be configured to perform all, or any portion of the functionality performed by the all or any portion of the components shown in FIG. 2. Accordingly, examples disclosed herein should not be limited to the configuration of components shown in FIG. 2.

[0085] FIG. 3 illustrates an overview of an example method 300 for enhancing localization of an application, in accordance with one or more examples disclosed herein.

[0086] The method 300 may be performed, at least in part, by one or more devices and / or components of the system shown in FIG. 1 and / or in FIG. 2. As such, all or any portion of the method 300 may be performed, for example, by a localization enhancement device (e.g., the localization enhancement device 100 of FIG. 1, the localization enhancement device 200 of FIG. 2), a localization enhancement test component (e.g., the localization enhancement test components 102, 104, 106 of FIG. 1, the localization enhancement test components 202, 204, 206 of FIG. 2), and / or any component of a localization enhancement test component (e.g., the article identifier 220, the phrase modification generator A 222, the phrase identifier 230, the proposed modification generator B 232, the phrase repository 234, the machine translation component 240, the proposed modification generator C 242, and / or the word count component 244 of FIG. 2).

[0087] While the various steps in the flowchart shown in FIG. 3 are presented and described sequentially, some or all of the steps may be executed in different orders, some or all of the steps may be combined or omitted, and some or all of the steps may be executed in parallel with other steps of FIG. 3 and / or steps not shown in FIG. 3.

[0088] In Step 302 the method 300 includes obtaining, by a localization enhancement device, source code of an application, wherein the source code comprises a plurality of text strings in a native language. As an example, source code of an application may be stored in an initial source code repository (e.g., the initial source code repository 108 of FIG. 1), and a localization enhancement device (e.g., the localization enhancement device 100 of FIG. 1, the localization enhancement device 200 of FIG. 2) may be configured to obtain the source code from the initial source code repository. Source code for an application may be obtained by the localization enhancement device at any time (e.g., as it is added to an initial source code repository, at periodic intervals, and the like).

[0089] In Step 304 the method 300 includes determining, by the localization enhancement device (e.g., the localization enhancement device 100 of FIG. 1, the localization enhancement device 200 of FIG. 2), that the source code includes a text string of the plurality of text strings that is to be translated into one or more other languages, and that includes a static portion and an injected portion. In one or more examples, the localization enhancement device assesses the source code to discover text strings within the source code that are intended to be rendered to a user (e.g., via a user interface). Such text strings may then be assessed to discover each text string that includes both a static portion and an injected portion. In one or more examples, the set of text strings that include a static portion and an injected portion become the set of text strings on which a set of localization enhancement tests are to be performed. Accordingly, in one or more examples, the localization enhancement device separately provides the set of text strings that include a static portion and an injected portion to a set of localization enhancement test components (e.g., the localization enhancement test components 102, 104, 106 of FIG. 1, the localization enhancement test components 202, 204, 206 of FIG. 2). Thus, each localization enhancement test component may independently have the set of text strings having a static portion and an injected portion, one which each respective localization enhancement test component will execute a localization enhancement test.

[0090] In Step 306 the method 300 includes executing, by the localization enhancement device and using the text string, a set of localization enhancement tests. In one or more examples, the set of localization enhancement tests are each separately configured to identify whether the text string includes a potential translation problem. The set of localization enhancement test may include, but are not limited to, an article test, a phrase identification test, and a translation test, as discussed above in the descriptions of FIG. 1 and FIG. 2. Examples of a text string that includes potential translation problem include, but may not be limited to: a text string in which an article in the static portion of the text string immediately precedes the injected portion of the text string; a text string where a portion of the text in the static portion of the text string at least partially matches one or more phrases stored in a phrase repository (e.g., the phrase repository 234 of FIG. 2); and a text string in which a translation of the static portion of the text string into a particular language has a word count that matches the word count of a translation into the same particular language of the text string as a whole when completed by including a possible variation of the injected portion with the static portion.

[0091] In one or more examples, the set of localization enhancement tests is performed by a set of localization enhancement test components (e.g., the localization enhancement test components 102, 104, 106 of FIG. 1, the localization enhancement test components 202, 204, 206 of FIG. 2). Each such localization enhancement test component may be configured to execute a separate one of the localization enhancement tests. As an example, a localization enhancement test A component (e.g., the localization enhancement test A component 102 of FIG. 1, the localization enhancement test A component 202 of FIG. 2) may be configured to execute the article test, a localization enhancement test B component (e.g., the localization enhancement test B component 104 of FIG. 1, the localization enhancement test B component 204 of FIG. 2) may be configured to execute the phrase identifier test, and a localization enhancement test C component (e.g., the localization enhancement test C component 106 of FIG. 1, the localization enhancement test C component 206 of FIG. 2) may be configured to execute the translation test.

[0092] In Step 308 the method 300 includes generating, when at least one test of the set of localization enhancement tests identifies that the text string includes the potential translation problem, a proposed modification to the text string. In one or more examples, each text string identified as including a potential translation problem by a localization enhancement test component may be provided to a proposed modification generator (e.g., the proposed modification generators 222, 232, 242 of FIG. 2). In one or more examples, a proposed modification generator is configured to generate a proposed modification of a text string such that the text string would pass the localization enhancement test that identified the text string as including a potential translation problem.

[0093] As an example, when a localization enhancement test component executing the article test identifies that a text string includes an article in the static portion that immediately precedes an injected portion, the proposed modification generator may generate a proposed modification in which the article is moved from the static portion to the injected portion of the text string.

[0094] As another example, when a localization enhancement test component executing the phrase identification test identifies that a text string includes, in the static portion, a partial match of a phrase in a repository of phrases that should not be split, the proposed modification generator may generate a proposed modification in which the part of the static portion that was a partial match with one or more phrases from the phrase repository is moved from the static portion to the injected portion of the text string.

[0095] As another example, when a localization enhancement test component executing the translation test identifies that a text string includes a static portion that, when translated into another language, has a word count that matches the word count of a translation of the entire text string, including the static portion and at least one possible variations of the injected portion, the proposed modification generator may generate a proposed modification in which the static portion and the injected portion are adjusted such that a translation of the static portion has, in all cases, a word count that is less that the word count of any translations of the entire text string, including the static portion and all possible variations of the injected portion.

[0096] In one or more examples, the proposed modifications to each text string identified as including a potential translation problem may be provided by the localization enhancement device to a developer of the source code. As an example, the proposed modification(s) may be provided to and stored on the initial source code repository from which the source code was obtained, and a developer may be notified that the source code failed at least one localization enhancement test, and provided a location of the proposed modifications. In one or more examples, the developer may then view the proposed modifications, and update the source code based thereon. As an example, the developer may modify the boundaries of the static portion and the injected portion of the text strings based on the proposed modifications.

[0097] In Step 310 the method 300 includes denying a commit of the source code to a source code repository. In one or more examples, before source code can be committed to a source code repository (e.g., the final source code repository 110 of FIG. 1), the source code must pass all localization enhancement test executed by the localization enhancement device. Thus, in one or more examples, when any of the localization enhancement tests fails, and one or more proposed modifications are generated, the source code is not ready to be committed, as, after commitment, the source code, or at least the static portions of the text strings therein, may be provided to a translation service (e.g., the translation service 114 of FIG. 1) for translation. Therefore, in one or more examples, the potential translation problems identified by the localization enhancement tests executed by the localization enhancement device should be addressed in order to improve the translation process, and increase the likelihood that the text strings, when translated, do not read awkwardly in the language(s) to which the text strings are translated. In one or more examples, as used herein, denying a commit of the source code may include, but is not necessarily limited to, any form of not allowing source code to be committed to a source code repository without performing, by a localization enhancement device, one or more actions related to the source code. As an example, denying a commit of the source code may include generating a flag and associating the flag with the source code to indicate that one or more localization enhancement tests failed. As another example, denying a commit of the source code may include performing any number of suitable actions that prevent the source code from being committed to a source code repository. In one or more examples, denying a commit of the source code may be one or more of any of the aforementioned actions, or any other relevant actions, depending on which localization enhancement tests failed. As an example, if either the article test or the phrase identification test failed, denying a commit of the source code may include taking steps to prevent the commit of the source code, while if the translation test is the only test that fails, denying a commit of the source code may include just flagging the source code as having failed a localization enhancement test (or specifically having failed the translation test), which a developer could choose to override, and commit the source code anyway.

[0098] In one or more examples, the denial of the commit of the source code may be performed using any suitable technique for preventing the commit of the source code. As an example, the commit process may include checking the source code to determine whether a particular flag is set by the localization enhancement device, and only proceeding with allowing the commit when the flag is not set. In such an example, the localization enhancement device may set the relevant flag whenever one or more localization enhancement tests fails for a given version of the source code.

[0099] In one or more examples, although not shown in FIG. 3, Steps 302-310 may be repeated each time the source code is updated, until the localization enhancement device obtains a version of the source code in which no localization enhancement test fails, at which point, the source code may be committed to a final source code repository. At that point, for example, the static portions of the text strings in the source code may be moved to a translation repository (e.g., the translation repository 112 of FIG. 1), and a translation service may access the translation repository, obtain the static portions, and perform the translations.

[0100] FIG. 4 illustrates a block diagram of a computing device 400, in accordance with one or more examples disclosed herein. The computing device 400 may be an example of all or any portion of any components shown in FIG. 1 (e.g., the localization enhancement device 100) and described above, all or any portion of any components shown in FIG. 2 (e.g., the localization enhancement device 200 or any component therein) and described above, and / or of the computing device 500 of FIG. 5, described below. As discussed above in the descriptions of FIG. 1, FIG. 2, and FIG. 3, the computing device 400 may be used to implement all or any portion of the various components shown in FIG. 1 and FIG. 2 and described above and / or to perform all or any portion of the method 300 shown in FIG. 3 and described above.

[0101] The computing device 400 may include one or more processors 402 and memory 404. The memory 404 may include a non-transitory computer-readable medium that stores programming for execution by one or more of the one or more processors 402. In this implementation, one or more modules within the computing device 400 may be embodied, at least in part, as software for performing any functionality described in this disclosure. The computing device 400 may be, for example, configured to perform the method 300 shown in FIG. 3 and described above, by executing instructions included in the memory 404 and executed by the one or more processors 402.

[0102] For example, the memory 404 may include instructions 406 to obtain, by a localization enhancement device, source code of an application, wherein the source code comprises a plurality of text strings in a native language (e.g., as described above in reference to Step 302 of FIG. 3).

[0103] For example, the memory 404 may include instructions 408 to determine, by the localization enhancement device, that the source code includes a text string of the plurality of text strings that is to be translated into one or more other languages, and that includes a static portion and an injected portion (e.g., as described above in reference to Step 304 of FIG. 3).

[0104] For example, the memory 404 may include instructions 410 to execute, by the localization enhancement device and using the text string, a set of localization enhancement tests, wherein the set of localization enhancement tests are each separately configured to identify whether the text string includes a potential translation problem (e.g., as described above in reference to Step 306 of FIG. 3).

[0105] For example, the memory 404 may include instructions 412 to generate, when at least one test of the set of localization enhancement tests identifies that the text string includes the potential translation problem, a proposed modification to the text string (e.g., as described above in reference to Step 308 of FIG. 3).

[0106] For example, the memory 404 may include instructions 414 to deny a commit of the source code to a source code repository. (e.g., as described above in reference to Step 310 of FIG. 3).

[0107] FIG. 5 illustrates a block diagram of a computing device 500, in accordance with one or more examples of this disclosure. As discussed above, examples described herein may be implemented, at least in part, using computing devices, and the computing device 500 shown in FIG. 5 may be such a computing device. For example, all or any portion of the components shown in FIG. 1 (e.g., the localization enhancement device 100 or any component therein) or FIG. 2 (e.g., the localization enhancement device 200 or any component therein) may be implemented, at least in part using a computing device such as the computing device 500, and may include all or any portion of the components of the computing device 500 shown in FIG. 5 and described below.

[0108] In one or more examples, a computing device (e.g., the computing device 500) is any device, portion of a device, or any set of devices capable of electronically processing instructions and may include, but is not limited to, any of the following: one or more processors (e.g. components that include circuitry) (e.g., the processor 502), memory (e.g., random access memory (RAM)) (not shown), input and output device(s) (e.g., the non-persistent storage 506), non-volatile storage hardware (e.g., solid-state drives (SSDs), persistent memory (Pmem) devices, hard disk drives (HDDs) (not shown)), one or more physical interfaces (e.g., network ports, storage ports) (e.g., the persistent storage 506), any number of other hardware components (not shown), and / or any combination thereof. As used herein, a processor may be any component that can be configured to execute operations, processes, threads, and the like. In some examples, a computing device (e.g., the computing device 500) may include any number of homogeneous or heterogeneous processors of any type.

[0109] The computing device 500 may include a communication interface 512 (e.g., Bluetooth interface, infrared interface, network interface, optical interface, any other type of communication interface), input devices 510, output devices 508, and numerous other elements (not shown) and functionalities. Each of these components is described below.

[0110] In one or more examples, the computer processor(s) 502 may be an integrated circuit for processing instructions. For example, the computer processor(s) may be one or more cores or micro-cores of a processor. The processor 502 may be a general-purpose processor configured to execute program code included in software executing on the computing device 500. The processor 502 may be a special purpose processor where certain instructions are incorporated into the processor design. The processor 502 may be a central processing unit (CPU), a multi-core CPU, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), a data processing unit (DPU), a tensor processing units (TPU), an associative processing unit (APU), a vision processing units (VPU), a quantum processing unit (QPU), and / or various other processing units that use special purpose hardware (e.g., field programmable gate arrays (FPGAs), System-on-a-Chips (SOCs), digital signal processors (DSPs)). Although only one processor 502 is shown in FIG. 5, the computing device 500 may include any number of processors without departing from the scope of examples disclosed herein.

[0111] The computing device 500 may also include one or more input devices 510, such as a touchscreen, keyboard, mouse, microphone, touchpad, electronic pen, motion sensor, or any other type of input device. The input devices 510 may allow a user to interact with the computing device 500. In one or more examples, the computing device 500 may include one or more output devices 508, such as a screen (e.g., a liquid crystal display (LCD), a plasma display, touchscreen, cathode ray tube (CRT) monitor, projector, or other display device), a printer, external storage, or any other output device. One or more of the output devices may be the same or different from the input device(s). The input and output device(s) may be locally or remotely connected to the computer processor(s) 502, non-persistent storage 504, and persistent storage 506. Many different types of computing devices exist, and the aforementioned input and output device(s) may take other forms. In some instances, multimodal systems can allow a user to provide multiple types of input / output to communicate with the computing device 500.

[0112] Further, the communication interface 512 may facilitate connecting the computing device 500 to a network (not shown) (e.g., a local area network (LAN), a wide area network (WAN) such as the Internet, mobile network, or any other type of network) and / or to another device, such as another computing device. The communication interface 512 may perform or facilitate receipt and / or transmission of wired or wireless communications using wired and / or wireless transceivers of any type and / or technology. Examples include, but are not limited to, those making use of an audio jack / plug, a microphone jack / plug, a universal serial bus (USB) port / plug, an Apple® Lightning® port / plug, an Ethernet port / plug, a fiber optic port / plug, a proprietary wired port / plug, a Bluetooth® wireless signal transfer, a BLE wireless signal transfer, an IBEACON® wireless signal transfer, an RFID wireless signal transfer, near-field communications (NFC) wireless signal transfer, dedicated short range communication (DSRC) wireless signal transfer, 802.11 WiFi wireless signal transfer, WLAN signal transfer, Visible Light Communication (VLC), Worldwide Interoperability for Microwave Access (WiMAX), IR communication wireless signal transfer, Public Switched Telephone Network (PSTN) signal transfer, Integrated Services Digital Network (ISDN) signal transfer, 3G / 4G / 5G / LTE cellular data network wireless signal transfer, ad-hoc network signal transfer, radio wave signal transfer, microwave signal transfer, infrared signal transfer, visible light signal transfer, ultraviolet light signal transfer, wireless signal transfer along the electromagnetic spectrum, or some combination thereof. The communications interface 512 may also include one or more Global Navigation Satellite System (GNSS) receivers or transceivers that are used to determine a location of the computing device 500 based on receipt of one or more signals from one or more satellites associated with one or more GNSS systems. GNSS systems include, but are not limited to, the US-based GPS, the Russia-based Global Navigation Satellite System (GLONASS), the China-based BeiDou Navigation Satellite System (BDS), and the Europe-based Galileo GNSS. There is no restriction on operating on any particular hardware arrangement, and therefore the basic features here may easily be substituted for improved hardware or firmware arrangements as they are developed.

[0113] The term computer-readable medium includes, but is not limited to, portable or non-portable storage devices, optical storage devices, and various other mediums capable of storing, containing, or carrying instruction(s) and / or data. A computer-readable medium may include a non-transitory medium in which data can be stored and that does not include carrier waves and / or transitory electronic signals propagating wirelessly or over wired connections. Examples of a non-transitory medium may include, but are not limited to, a magnetic disk or tape, optical storage media such as CD or DVD, flash memory, memory or memory devices. A computer-readable medium may have stored thereon code and / or machine-executable instructions that may represent a procedure, a function, a subprogram, a program, a routine, a subroutine, a module, a software package, a class, or any combination of instructions, data structures, or program statements. A code segment may be coupled to another code segment or a hardware circuit by passing and / or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, and the like may be passed, forwarded, or transmitted via any suitable means including memory sharing, message passing, token passing, network transmission, or the like.

[0114] All or any portion of the components of the computing device 500 may be implemented in circuitry. For example, the components can include and / or can be implemented using electronic circuits or other electronic hardware, which can include one or more programmable electronic circuits (e.g., microprocessors, GPUs, DSPs, FPGAs, CPUs, CAMs, and / or other suitable electronic circuits), and / or can include and / or be implemented using computer software, firmware, or any combination thereof, to perform the various operations described herein. In some aspects, the computer-readable storage devices, mediums, and memories can include a cable or wireless signal containing a bit stream and the like. However, when mentioned, non-transitory computer-readable storage media expressly exclude media such as energy, carrier signals, electromagnetic waves, and signals per se.

[0115] In the above description, numerous details are set forth as examples described herein. It will be understood by those skilled in the art (who also have the benefit of this disclosure) that one or more examples described herein may be practiced without these specific details, and that numerous variations or modifications may be possible without departing from the scope of the examples described herein. Certain details known to those of ordinary skill in the art may be omitted to avoid obscuring the description.

[0116] Specific details are provided in the description above to provide a thorough understanding of the aspects and examples provided herein. However, it will be understood by one of ordinary skill in the art that the aspects and examples may be practiced without these specific details. For clarity of explanation, in some instances the present technology may be presented as including functional blocks that may include devices, device components, steps or routines in a method embodied in software, or combinations of hardware and software. Additional components may be used other than those shown in the figures and / or described herein. For example, circuits, systems, networks, processes, and other components may be shown as components in block diagram form in order not to obscure the aspects in unnecessary detail. In other instances, well-known circuits, processes, algorithms, structures, and techniques may be shown without unnecessary detail in order to avoid obscuring the aspects of examples disclosed herein.

[0117] Individual aspects may be described above as a process or method which is depicted as a flowchart, a flow diagram, a data flow diagram, a structure diagram, or a block diagram. Although a flowchart or flow diagram may describe the operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged. A process may be terminated when its operations are completed, but may have additional steps not included in a drawing. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, and the like. When a process corresponds to a function, its termination can correspond to a return of the function to the calling function or the main function.

[0118] Processes and methods according to the above-described examples can be implemented using computer-executable instructions that are stored or otherwise available from computer-readable media. Such instructions can include, for example, instructions and data which cause or otherwise configure a general-purpose computer, special purpose computer, a network device, or a processing device (e.g., one or more processors) to perform a certain function or group of functions. Portions of computer resources used can be accessible over a network. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, firmware, source code, and the like. Examples of computer-readable media that may be used to store instructions, information used, and / or information created during methods according to described examples include magnetic or optical disks, flash memory, USB devices provided with non-volatile memory, networked storage devices, and the like.

[0119] In the above description of the figures, any component described with regard to a figure, in various examples described herein, may be equivalent to one or more same or similarly named and / or numbered components described with regard to any other figure. For brevity, descriptions of these components may not be repeated with regard to each figure. Thus, each and every example of the components of each figure is incorporated by reference and assumed to be optionally present within every other figure having one or more same or similarly named and / or numbered components or elements. Additionally, in accordance with various examples described herein, any description of the components of a figure is to be interpreted as an optional example, which may be implemented in addition to, in conjunction with, or in place of the examples described with regard to a corresponding one or more same or similarly named and / or numbered component in any other figure.

[0120] Throughout the application, ordinal numbers (e.g., first, second, third) may be used as an adjective for an element (i.e., any noun in the application). The use of ordinal numbers is not to imply or create any particular ordering of the elements, nor to limit any element to being only a single element unless expressly disclosed, such as by the use of the terms “before”, “after”, “single”, and other such terminology. Rather, the use of ordinal numbers is to distinguish between the elements. By way of an example, a first element is distinct from a second element, and the first element may encompass more than one element and succeed (or precede) the second element in an ordering of elements.

[0121] As used herein, the phrase operatively connected, operative connection, and variations thereof, means that there exists between elements / components / devices a direct or indirect connection that allows the elements to interact with one another in some way. For example, the phrase ‘operatively connected’ may refer to any direct (e.g., wired directly between two devices or components) or indirect (e.g., wired and / or wireless connections between any number of devices or components connecting the operatively connected devices) connection. Thus, any path through which information may travel may be considered an operative connection.

[0122] While examples discussed herein have been described with respect to a limited number of examples, those skilled in the art, having the benefit of this disclosure, will appreciate that other examples can be devised which do not depart from the scope of examples as disclosed herein. Accordingly, the scope of examples described herein should be limited only by the attached claims.

Claims

1. A system, comprising:one or more processors; andone or more non-transitory computer readable media storing instructions which, when executed by the one or more processors, cause the one or more processors to:obtain, by a localization enhancement device, source code of an application, wherein the source code comprises a plurality of text strings in a native language;determine, by the localization enhancement device, that the source code includes a text string of the plurality of text strings that is to be translated into one or more other languages, and that includes a static portion and an injected portion;execute, by the localization enhancement device and using the text string, a set of localization enhancement tests, wherein the set of localization enhancement tests are each separately configured to identify whether the text string includes a potential translation problem; andbased on at least one test of the set of localization enhancement tests identifying that the text string includes the potential translation problem:generate a proposed modification to the text string, wherein the proposed modification modifies a split in the text string between the static portion and the injected portion of the text string; anddeny a commit of the source code to a source code repository.

2. The system of claim 1, wherein:the set of tests comprises an article test,to execute, by the localization enhancement device, the article test, execution of the instructions by the one or more processors further causes the one or more processors to:determine that the text string includes an article immediately preceding the injected portion of the text string, andthe proposed modification comprises a modified text string in which the article is included in a modified injected portion of the modified text string.

3. The system of claim 1, wherein:the set of tests comprises a phrase identification test,to execute, by the localization enhancement device, the phrase identification test, execution of the instructions by the one or more processors further causes the one or more processors to:determine that the text string includes one or more phrases that are split between the injected portion and the static portion and that match one or more stored phrases in a phrase repository of the localization enhancement device,the phrase repository comprises a plurality of phrases that should not be split in any text string to be rendered as the application executes, andthe proposed modification comprises a modified text string in which the one or more phrases that matched the one or more stored phrases in the phrase repository are included in a modified injected portion of the modified text string.

4. The system of claim 1, wherein:the set of tests comprises a translation test,to execute, by the localization enhancement device, the translation test, execution of the instructions by the one or more processors further causes the one or more processors to:perform a machine translation of the static portion of the text string from the native language to a different language to obtain a translated static portion;generate a first completed text string based on the text string, wherein the first completed text string comprises the static portion of the text string and a first variation of the injected portion of the text string;generate a second completed text string based on the text string, wherein the second completed text string comprises the static portion of the text string and a second variation of the injected portion of the text string;perform additional machine translations of the first completed text string and the second completed text string from the native language to the different language to obtain a first translated completed text string and a second translated completed text string;obtain a first word count of the translated static portion, a second word count of the first translated completed text string, and a third word count of the second translated completed text string;perform a comparison between the first word count and both the second word count and the third word count; andmake a determination, based on the comparison, whether the first word count is equal to either or both of the second word count and the third word count.

5. The system of claim 4, wherein:execution of the instructions by the one or more processors further causes the one or more processors to, when the determination is that the first word count matches either or both of the second word count and the third word count:generate the proposed modification to include a modified text string that includes a modified static portion and a modified injected portion, andin the modified text string, a modified split between the modified static portion and the modified injected portion differs from the split between the static portion and the injected portion of the text string.

6. The system of claim 5, wherein, to generate the proposed modification to include the modified text string, execution of the instructions by the one or more processors further causes the one or more processors to:iteratively expand the injected portion of the text string to include parts of the static portion of the text string until a second determination is made that a modified static portion word count of the modified static portion, after a translation of the modified static portion from the native language to the different language, is less than the second word count of the first translated completed text string and the third word count of the second translated completed text string.

7. The system of claim 1, wherein execution of the instructions by the one or more processors further causes the one or more processors to:when no test of the set of localization enhancement tests identifies that the text string includes the potential translation problem, allow the commit of the source code to the source code repository.

8. A computer-implemented method, comprising:obtaining, by a localization enhancement device, source code of an application, wherein the source code comprises a plurality of text strings in a native language;determining, by the localization enhancement device, that the source code includes a text string of the plurality of text strings that is to be translated into one or more other languages, and that includes a static portion and an injected portion;executing, by the localization enhancement device and using the text string, a set of localization enhancement tests, wherein the set of localization enhancement tests are each separately configured to identify whether the text string includes a potential translation problem; andbased on at least one test of the set of localization enhancement tests identifying that the text string includes the potential translation problem:generating a proposed modification to the text string, wherein the proposed modification modifies a split in the text string between the static portion and the injected portion of the text string; anddenying a commit of the source code to a source code repository.

9. The computer-implemented method of claim 8, wherein:the set of tests comprises an article test,executing, by the localization enhancement device, the article test comprises:determining that the text string includes an article immediately preceding the injected portion of the text string, andthe proposed modification comprises a modified text string in which the article is included in a modified injected portion of the modified text string.

10. The computer-implemented method of claim 8, wherein:the set of tests comprises a phrase identification test,executing, by the localization enhancement device, the phrase identification test comprises:determining that the text string includes one or more phrases that are split between the injected portion and the static portion and that match one or more stored phrases in a phrase repository of the localization enhancement device,the phrase repository comprises a plurality of phrases that should not be split in any text string to be rendered as the application executes, andthe proposed modification comprises a modified text string in which the at least one word that at least partially matched the one or more phrases in the phrase repository is included in a modified injected portion of the modified text string.

11. The computer-implemented method of claim 8, wherein:the set of tests comprises a translation test, andexecuting, by the localization enhancement device, the translation test comprises:performing a machine translation of the static portion of the text string from the native language to a different language to obtain a translated static portion;generating a first completed text string based on the text string, wherein the first completed text string comprises the static portion of the text string and a first variation of the injected portion of the text string;generating a second completed text string based on the text string, wherein the second completed text string comprises the static portion of the text string and a second variation of the injected portion of the text string;performing additional machine translations of the first completed text string and the second completed text string from the native language to the different language to obtain a first translated completed text string and a second translated completed text string;obtaining a first word count of the translated static portion, a second word count of the first translated completed text string, and a third word count of the second translated completed text string;performing a comparison between the first word count and both the second word count and the third word count; andmaking a determination, based on the comparison, whether the first word count is equal to either or both of the second word count and the third word count.

12. The computer-implemented method of claim 11, further comprising:when the determination is that the first word count matches either or both of the second word count and the third word count, generating the proposed modification to include a modified text string that includes a modified static portion and a modified injected portion,wherein, in the modified text string, a modified split between the modified static portion and the modified injected portion differs from the split between the static portion and the injected portion of the text string.

13. The computer-implemented method of claim 12, wherein generating the proposed modification to include the modified text string comprises:iteratively expanding the injected portion of the text string to include parts of the static portion of the text string until a second determination is made that a modified static portion word count of the modified static portion, after a translation of the modified static portion from the native language to the different language, is less than the second word count of the first translated completed text string and the third word count of the second translated completed text string.

14. The computer-implemented method of claim 8, further comprising:when no test of the set of localization enhancement tests identifies that the text string includes the potential translation problem, allowing the commit of the source code to the source code repository.

15. A non-transitory computer-readable medium storing programming for execution by one or more processors, the programming comprising instructions to:obtain, by a localization enhancement device, source code of an application, wherein the source code comprises a plurality of text strings in a native language;determine, by the localization enhancement device, that the source code includes a text string of the plurality of text strings that is to be translated into one or more other languages, and that includes a static portion and an injected portion;execute, by the localization enhancement device and using the text string, a set of localization enhancement tests, wherein the set of localization enhancement tests are each separately configured to identify whether the text string includes a potential translation problem; andbased on at least one test of the set of localization enhancement tests identifying that the text string includes the potential translation problem:generate a proposed modification to the text string, wherein the proposed modification modifies a split in the text string between the static portion and the injected portion of the text string; anddeny a commit of the source code to a source code repository.

16. The non-transitory computer-readable medium of claim 15, wherein:the set of tests comprises an article test,to execute, by the localization enhancement device, the article test, the non-transitory computer readable medium includes further instructions to:determine that the text string includes an article immediately preceding the injected portion of the text string, andthe proposed modification comprises a modified text string in which the article is included in a modified injected portion of the modified text string.

17. The non-transitory computer-readable medium of claim 15, wherein:the set of tests comprises a phrase identification test,to execute, by the localization enhancement device, the phrase identification test, the non-transitory computer readable medium includes further instructions to:determine that the text string includes one or more phrases that are split between the injected portion and the static portion and that match one or more stored phrases in a phrase repository of the localization enhancement device,the phrase repository comprises a plurality of phrases that should not be split in any text string to be rendered as the application executes, andthe proposed modification comprises a modified text string in which the at least one word that at least partially matched the one or more phrases in the phrase repository is included in a modified injected portion of the modified text string.

18. The non-transitory computer-readable medium of claim 15, wherein:the set of tests comprises a translation test,to execute, by the localization enhancement device, the translation test, the non-transitory computer readable medium includes further instructions to:perform a machine translation of the static portion of the text string from the native language to a different language to obtain a translated static portion;generate a first completed text string based on the text string, wherein the first completed text string comprises the static portion of the text string and a first variation of the injected portion of the text string;generate a second completed text string based on the text string, wherein the second completed text string comprises the static portion of the text string and a second variation of the injected portion of the text string;perform additional machine translations of the first completed text string and the second completed text string from the native language to the different language to obtain a first translated completed text string and a second translated completed text string;obtain a first word count of the translated static portion, a second word count of the first translated completed text string, and a third word count of the second translated completed text string;perform a comparison between the first word count and both the second word count and the third word count; andmake a determination, based on the comparison, whether the first word count is equal to either or both of the second word count and the third word count.

19. The non-transitory computer-readable medium of claim 18, wherein:the non-transitory computer readable medium includes further instructions to, when the determination is that the first word count matches either or both of the second word count and the third word count, generate the proposed modification to include a modified text string that includes a modified static portion and a modified injected portion, andin the modified text string, a modified split between the modified static portion and the modified injected portion differs from the split between the static portion and the injected portion of the text string.

20. The non-transitory computer-readable medium of claim 19, wherein, to generating the proposed modification to include the modified text string, the non-transitory computer readable medium includes further instructions to:iteratively expand the injected portion of the text string to include parts of the static portion of the text string until a second determination is made that a modified static portion word count of the modified static portion, after a translation of the modified static portion from the native language to the different language, is less than the second word count of the first translated completed text string and the third word count of the second translated completed text string.