Transforming character strings that are contained in a unit...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S112000, C717S117000, C717S142000

Reexamination Certificate

active

06802059

ABSTRACT:

FIELD OF THE INVENTION
The present invention generally relates to computer programming, including substitution of character strings. The invention relates more specifically to transforming character strings that are contained in a unit of code.
BACKGROUND OF THE INVENTION
In general, computer programs or software applications include some sort of user interface mechanism that allows a user to interact with the software application. Many software applications include a graphical user interface (GUI), such as a menu interface system, which enhances the user's ability to interact with the application software. For example, a user of a bank teller machine typically is presented with several different menu interface windows. Each menu generally includes one or more options that allow the user to enter information and to perform a particular transaction.
To provide a more “user-friendly” program, a graphical user interface generally includes visual information that describes the different options that may be performed through the user interface. In this context, visual information includes any set of characters or symbols that have been combined in a particular manner to present certain information to the user. For example, a menu interface for a bank teller machine may include the visual information “ENTER YOUR PIN NUMBER” to inform the user to first enter a personal identification number (PIN) to access their account. Alternatively, a window for a word processing application may include a menu interface that contains the visual information “File”, “Edit”, “View” and “Format” to inform the user that certain pull-down menus are available for manipulating the contents of a document.
In general, visual information in a user interface is based on the symbols and language that is most familiar to the typical end user. For example, if a bank teller machine is located in the United States, the user interface typically will include visual information that is in English. Alternatively, if a bank teller machine is located in Germany, the user interface will include visual information that is in German.
One approach for generating a user interface that includes visual information is by “hard coding” character strings throughout the computer program code that generates the user interface. A character string or “string” is a sequence of alphanumeric characters. In many computer programming languages, strings may be stored in discrete named storage locations that may be manipulated as a unit, or may be inserted literally in expressions that are defined, in the grammar of the language, as capable of receiving string parameters. As an example, to generate a user interface that requests a user to enter a username and password when attempting to access an application program, the string “Enter your Username and Password” may be hard coded into a display routine of the user interface code. To generate a user interface that includes an accept and a reject button on a user interface, the strings “ACCEPT” and “REJECT” may be hard coded into the user interface code.
The hard coding approach has a significant disadvantage; it is inflexible. Changing visual information requires changing the source code of the program that generates the visual information, recompiling it, and re-deploying it to end users. Errors are easily introduced in this process. Unfortunately, hard coding has been used in many software applications that are currently in use. Some applications include thousands or millions of lines of code. As a result, a significant problem with software applications that include hard coded character strings is that a huge amount of time and resources may be required to update or modify the user interface.
For example, if the application includes hard coded character strings throughout the code that provide a user interface in which the visual information is in Japanese, a significant amount of time and resources will be required to convert the visual information to English. In particular, because a string may contain any combination or number of Japanese characters, to convert the user interface to English, a software developer generally must manually search each file to locate each hard coded string. Upon locating each string, the developer must then manually convert the string to English. Once the developer has identified and translated all of the strings, the code must be recompiled and relinked to generate a new executable program.
However, to verify that all of the hard coded strings were properly translated, after building the new executable, the developer must physically view each interface to verify the strings were correctly translated to English. In addition, if the developer determines that a string was not properly translated, the developer must repeat this process to locate the string and to generate a new executable. In a program that has hundreds of different menus that are linked together, it can be extremely difficult for the developer to view and verify each and every interface that may be presented to an end user.
Translation of foreign language content is not the only problem that may arise in a computer program having hard-coded character strings. Any change in the content of the character strings requires a similar, time-consuming revision process that may result in the introduction of new errors.
Consistency is another issue. When a computer program uses the same message in the form of several hard coded strings that are used in different parts of the program, a programmer may revise one string without revising other strings that represent other instances of the same message. As a result, the program will produce inconsistent output.
Based on the foregoing, there is a need for a method or mechanism that can automatically translate hard coded visual information from one language to another.
There is also a need for a method or mechanism that can address the known disadvantages of using hard coded strings in computer programs.
SUMMARY OF THE INVENTION
The foregoing needs and objects, and other needs and objects that will become apparent from the following disclosure, are fulfilled by the present invention, which comprises, in one aspect, a method for transforming character strings that are contained in a unit of code, the method comprising the steps of identifying a hard coded string that is contained in the computer program; replacing the string with a macro that is uniquely associated with the string; creating and storing an entry in a mapping that defines an association of the macro and the string; and referencing the mapping in a program element that is associated with the computer program.
According to another feature of this aspect, the step of identifying a string further comprises the steps of identifying one or more computer programs that contain one or more hard coded strings; and parsing one of the computer programs to identify the hard coded strings while copying instructions from the one of the computer programs to an output.
In yet another feature of this aspect, the step of identifying a string further includes the steps of parsing a computer program to locate hard coded strings contained therein; and in response to locating a string, determining whether a macro was previously generated for the string; and generating a corresponding macro uniquely associated with the string only when a macro was not previously generated.
According to another feature, the method further comprises the step of compiling the computer program to generate an executable, including substituting the string in the executable for each instance of the unique macro string in the computer program.
According to yet another feature, the method further comprises the steps of parsing a computer program to locate hard coded strings contained therein; creating and storing a mapping of macros to strings characters; in response to locating a string, determining whether a macro was previously generated for the string by searching the mapping; and generating a corresponding macro uniquely associated

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Transforming character strings that are contained in a unit... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Transforming character strings that are contained in a unit..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Transforming character strings that are contained in a unit... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3276919

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.