# US 9,436,679 B2 · Generating a context for translating strings based on associated application source code and markup

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,436,679 B2
- Document ID: US9436679B2
- Status: Granted
- Kind: B2
- Application number: 14/967,888
- Filed: 2015-12-14
- Published: 2016-03-24
- Granted: 2016-09-06
- Earliest claimed: 2013-06-04
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Timothy S. Bartley; Gavin G. Bray; Elizabeth M. Hughes; Kalvinder P. Singh
- Web page: https://patentgrep.com/patent/US9436679B2

## CPC

- G06F 40/143: Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
- G06F 3/0484: for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F 8/40: Transformation of program code
- G06F 9/454: {Multi-language systems; Localisation; Internationalisation}
- G06F 40/47: Machine-assisted translation, e.g. using translation memory
- G06F 40/55: Rule-based translation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An approach to generating a context for translating strings for a graphical user interface. The approach includes a computer receiving a string to be translated and associated source code, the string identified by a unique key within the associated source code and the associated source code is markup language. The computer identifies a first logical section of the associated source code corresponding to a unique key of the string and one or more graphical user interface components within the identified logical section of the associated source code. The computer then creates a mockup image presenting the one or more graphical user interface components and the string. The computer then labels, in the created mockup image, each of the one or more graphical user interface components and the first string of the plurality of strings, and identifies one or more additional graphical user interface components.

## Claims

### Claim 1

A method for generating a context for translating strings for a graphical user interface, the method comprising:
receiving a string to be translated and associated source code, the string identified by a unique key within the associated source code, the unique key used to identify a location of the string, and wherein the associated source code is markup language;
identifying, by one or more computer processors, a first logical section of the associated source code corresponding to the unique key of the string;
identifying, by the one or more computer processors, one or more graphical user interface components within the identified logical section of the associated source code, wherein the one or more graphical user interface components includes one or more of: widgets, pages, dialogs, images, and graphics;
creating, by the one or more computer processors, a mapping of each string to be translated to the one or more graphical user interface components within the identified logical section of the associated source code;
grouping, by the one or more computer processors, the string to be translated, and the mapping to the one or more graphical user interface components to provide a context for each string to be translated;
creating, by the one or more computer processors, based, at least in part, on the grouping of the string to be translated and the mapping, a first mockup image presenting the one or more graphical user interface components and the string;
labeling, in the created first mockup image, each of the one or more graphical user interface components and the first string of the plurality of strings;
identifying, by the one or more computer processors, one or more additional graphical user interface components in one or more additional logical sections adjacent or near to the first logical section, wherein the one or more additional graphical user interface components include both graphical user interface components and an additional one or more strings to be translated; and
creating a second mockup image presenting the one or more graphical user interface components and the string, and the one or more additional graphical user interface components.
