US9015678
US9015678
US9015678
(73) Assignee: International Business Machines 6,275,790 8, 2001 Yamamoto et al. ............... TO4/8
Corporation, Armonk, NY (US) 6.425,123 T/2002 Rojas et al.
6,453,462 9, 2002 Meade et al.
6,507,812 1, 2003 Meade et al.
(*) Notice: Subject to any disclaimer, the term of this 6,735,759 5, 2004 Yamamoto et al. ........... 717/136
patent is extended or adjusted under 35 6,760,695 T/2004 Kuno et al.
U.S.C. 154(b) by 0 days. 7,389,223 6/2008 Atkin et al. ....
7,509,251 3/2009 Andrews et al. .................. TO4/8
(21) Appl. No.: 14/145,587 (Continued)
(22) Filed: Dec. 31, 2013 Primary Examiner — Qing Chen
(74) Attorney, Agent, or Firm — Jeffrey T. Holman
(65) Prior Publication Data
US 2014/O2O1715A1 Jul. 17, 2014 (57) ABSTRACT
Related U.S. Application Data A storage medium containing computer code, which when
executed by a computer causes the computer to perform the
(62) Division of application No. 1 1/853,412, filed on Sep. steps of creating a second file of messages to be outputted by
11, 2007, now Pat. No. 8,656,357. the software from a first file of messages, the messages in the
(30) Foreign Application Priority Data first file being written in a first language and executing the
software using the second file. The creating of the second file
Sep. 11, 2006 (JP) ................................. 2006-246.177 includes for each message in the first file, applying specified
rules to form a second message by changing the character
(51) Int. C. length of the second message, filling in any blank characters
G06F 9/45 (2006.01) in the second message with a dummy character, inserting
G06F 9/44 (2006.01) characters from the target language into prescribed places in
G06F 7/28 (2006.01) the second message to form a second message having both
G06F II/36 (2006.01) characters of the first language and characters of the target
(52) U.S. C. language, and copying the second message into the second
file.
CPC .......... G06F 1 1/3672 (2013.01); G06F 17/289
(2013.01); G06F 9/4448 (2013.01); G06F
II/3684 (2013.01); G06F II/3692 (2013.01) 4 Claims, 13 Drawing Sheets
FIRST
UNIT
STORAGE
ORIGINAL
310
secondsorace
RESOURCE 330
FILE
TESTRESOURCE
320 FILE GENERATING RESOURCE
UNIT FILE
CONVERSION
TABLE
370
DEFAULTFONT 355
375 TESTOBJECT
--PROGRAM
HARD-CODED EXECUTICNUMIT
CHARACTER
DETECTIONFONT
380 y
360 TDISPLAY
GARBLED DISPLAYSCREEN DEVICE
CHARACTER CREATION UNIT
DETECTIONFONT
385
365
REVERSE FONT TDISPLAY
390 FONT
UNIT SELECTIONDEVICE
SORTFCNT
FROMINPUT
395 DEWIGE
OTHERFONT
US 9,015,678 B2
Page 2
(56) References Cited 2004/O122652 A1* 6/2004 Andrews et al. .................. TO4/2
2005/0065772 A1 3/2005 Atkin et al. ....................... TO4/2
U.S. PATENT DOCUMENTS 2006/0217954 A1* 9/2006 Koyama et al. ................... TO4/2
7,865,353 B2 * 1/2011 Koyama et al. ................... TO4/3
2003/0236658 A1* 12/2003 Yam .................................. TO4/2 * cited by examiner
U.S. Patent Apr. 21, 2015 Sheet 1 of 13 US 9,015,678 B2
FIG. 1A FIG. 1C
1OO 110
SOURCE CODE
FIRST STORAGE
UNIT
310
ORIGINAL
RESOURCE
FILE
TEST RESOURCE ||
FILE GENERATING RESOURCE
UNIT
370
DEFAULT FONT
375 TEST OBJECT
PROGRAM
HARD-CODED EXECUTION UNIT
CHARACTER
DETECTION FONT
TO DISPLAY
GARBLED DEVICE
CHARACTER
DETECTION FONT
385
REVERSE FONT TO DISPLAY
DEVICE
390
SORT FONT
iFROMINPUT
| DEVICE
U.S. Patent Apr. 21, 2015 Sheet 3 of 13 US 9,015,678 B2
FIG 4A
400
ORIGINAL RESOURCE FILE
MSG01=The status is {0}.
ColorO1=Green
ColorO2=Red
ColorO3=Yellow
MSG02=Refresh the StatuS
MSGO3=SOrt
FIG. 4B
405
U+007E U+FFEA
FIG. 4C
410
TEST RESOURCE FILE
MSG 01 - Aggift it it gig fief O.
Color(1 - Kii Y
Color.02 = x .
ColorC3 = a iii. No.:
MSGC2= trifidi d'Ét tda, d.
MSGC3=3No.
U.S. Patent Apr. 21, 2015 Sheet 4 of 13 US 9,015,678 B2
FIG 5A FIG. 5B
S500
READ ORIGINAL NEXT
RESOURCE FILE ITEM(S
NORIGINAL
S505 RESOURCE
FILE2
GENERATE TEST RESOURCE YES
FILE FROM THE ORIGINAL
RESOURCE FILE READ NEXT ITEM FROM THE
ORIGINAL RESOURCE FILE
S510
STORE THE TEST ASSIGN KEY FROM THE TEM
RESOURCE FILE TO "VARIABLE KEY"
THE
"VARIABLEX"S
NUMERICAL CHARACTER, AND
"{"AND""ARE BEFORE
AND AFTER THE
CONVERT THE "VARIABLE X" "VARIABLE X"T ASSIGN THE
BASED ON CONVERSION "VARIABLE X"
IABLE ANDASSIGNIT TO
VARABLE Y
AS IT IS TO
VARIABLEY"
F.G. 6
660
DISPLAY SCREEN USING REGULAR FONT
FIG. 7A
HARD-CODED CHARACTER DETECTION FONT
CHARACTER GLYPHIN GLYPHINHARD- 700
CODE REGULAR CODED CHARACTER
FONT DETECTION FONT
U+3000 BLANK CHARACTER CODES THAT ARE NOT
THE TEST OBJECTS
(CHARACTER CODES
CORRESPONDING TO THE
CHARACTERS OF THE TRANSLATION
U+FFEA TARGET LANGUAGE INCLUDED IN
BLANK BLANK THE CONVERSIONTABLE)
U+0020 CHARACTER CHARACTER
CHARACTER CODESAS THE TEST
OBJECTS
(CHARACTER CODES
CORRESPONDING TO THE
CHARACTERS OF THE ORIGINAL
LANGUAGE)
U+007E
CHARACTER CODES THAT
OTHER ARE NOT THE TEST OBJECTS
CHARACTER (CHARACTER CODES NOT
CODES CORRESPONDING TO EITHER
THE CHARACTERS OF THE
ORIGINAL LANGUAGE OR THE
CHARACTERS OF THE TRANSLATION
TARGET LANGUAGE INCLUDED
INTHE CONVERSIONTABLE)
710
Green
715 720
DDDDD
DOD
OOOOOO
725
OOOOOOOOOOOOOOOO
U.S. Patent Apr. 21, 2015 Sheet 7 of 13 US 9,015,678 B2
FIG. 8A
8OO
GARBLED CHARACTER DETECTION FONT
CHARACTER GLYPHIN GLYPHN GARBLED
CODE REGULAR CHARACTER
(JAPANESE) FONT DETECTION FONT
U+3000 DOUBLE-WIDTH
BLANK
CHARACTER CODES
ORRESPONDING TO
THE CHARACTERS
OF THE TRANSLATION CHARACTER
U+FFEA A O TARGET LANGUAGE
INCLUDED IN THE
CODES THAT
ARE NOT THE
U+0020 | CHARACTER
BANK O CONVERSIONTABLE) TEST
OBJECTS
CHARACTER CODES
ORRESPONDING TO
THE CHARACTERS OF
LANGUAGE)
8EcTER T CHARACTER CODESAS THE TEST
CODES OBJECTS
CHARACTER CODES NOT
ORRESPONDING TO EITHER
THE CHARACTERS OF THE ORIGINAL
LANGUAGE OR THE CHARACTERS OF
THE TRANSLATION TARGET LANGUAGE
INCLUDED IN THE CONVERSIONTABLE)
FIG. 8B
SCREEN DISPLAYUSING GARBLED 810
CHARACTER DETECTION FONT
815
82O 825
DDD
DDDDDD
830
TTTTTTT TTTTTTTTT
U.S. Patent Apr. 21, 2015 Sheet 8 of 13 US 9,015,678 B2
FIG. 9A
REVERSE FONT
CHARACTER CORRES- CHARACTER GLYPH GLYPHIN 850
CODE PONDING CODE INREGULAR REVERSE FONT
(ENGLISH) CHARACTER (JAPANESE)|FONT
U+002O BLANK DOUBLE- BLANK
CHARACTER U+3000 WIDTH CHARACTER
BLANK
(CHARACTER CODES
CORRESPONDING CHARAC
SHESS ?cies
TARGETLANGUAGE
as
THE TEST
INCLUDED IN THE OBJECTS
CONVERSIONTABLE)
EE D O/T CHARACTERCODESTHAIARENOT
THE TESTOBJECTS (CHARACTER
CODES NOT CORRESPONDING TO
EITHER THE CHARACTERS OF THE
ORIGINAL LANGUAGE OR THE
CHARACTERS OF THE TRANSLATION
TARGET LANGUAGE INCLUDED
INTHE CONVERSIONTABLE)
:TTTTTTTTTTTTTTTT:
U.S. Patent Apr. 21, 2015 Sheet 9 of 13 US 9,015,678 B2
SORT FONT
CHARACTER GLYPHIN GLYPHINHARD- 900
CODE REGULAR CODED CHARACTER
FONT DETECTION FONT
U+3000 EEE-WIDTH (15) ID
CHARACTER CODES
AS THE TEST OBJECTS
(CHARACTERCODES
CORRESPONDING TO THE
CHARACTERS OF THE TRANSLATION
TARGET LANGUAGE INCLUDED IN
THE CONVERSIONTABLE)
U+FFEA
(CHARACTERCODES
CORRESPONDING TO THE CHARACTER
CHARACTERS OF THE CODES THAT
ORIGINALLANGUAGE) ARE NOT THE
TEST OBJECTS
(CHARACTER CODES NOT
CORRESPONDING TO
EITHER THE CHARACTERS OF
THE ORIGINAL LANGUAGE
OR THE CHARACTERS OF
THE TRANSLATION TARGET
LANGUAGE INCLUDED IN
F G 1 OB THE CONVERSIONTABLE)
SCREEN DISPLAY USING 905
SORT FONT
910
(28)(31)(44)(21)(14)(10)(14)(29)(21)(41)(21)
OOOOO
915
(16)(15)(44)(1) (38)(5)(15)(14):
(7)(44)(62)
(58)(44)(35)(35)(5)(36)
E3:33:33:39:
U.S. Patent Apr. 21, 2015 Sheet 10 of 13 US 9,015,678 B2
S600 S660
RESULTS FROM BUFFER
S605
S665
S610 DATA TO
BE PROCESSED
OUTPUT PROCESSED RESULTS INCLUDED IN THE
PROCESSED
S615 RESULTS?
CREATE DISPLAY SCREEN
USING DEFAULT FONT
READ THE DATA TO BE
TRANSMIT THE DISPLAY PROCESSED FROM THE
SCREENTO DISPLAY DEVICE PROCESSED RESULTS S680
S625 CREATE PART
WAIT FOR INPUT NO OF DISPLAY
CHARACTER SCREEN
S630 CODE DETECTED? BASED ON
THE READ
FONT NO DATA
SELECTION
REQUEST? RETRIEVE CORRESPONDING
CHARACTER SHAPE FROM
END THE DESIGNATED FONT
S635
CREATE SCREEN FOR CREATE PART OF DISPLAY
FONT SELECTION
S640
SERENESSEATER
SHAPE
TRANSMIT THE SELECTION
SCREEN TO THE DISPLAY
DEVICE
S645
RECEIVE DESIGNATION
OF FONT
S650
CREATE DISPLAY SCREEN
USING THE DESIGNATED
FONT
S655
TRANSMIT THE DISPLAY
SCREEN TO THE DISPLAY
DEVICE
U.S. Patent Apr. 21, 2015 Sheet 11 of 13 US 9,015,678 B2
955 98O
HTTP
a. < D.
970
WEBSERVER CLIENT
U.S. Patent Apr. 21, 2015 Sheet 12 of 13 US 9,015,678 B2
FIG. 13
WEBAPPLICATION WEBSERVER WEB BROWSER
7
960 970 S700 986 s705
WAIT FORREGUEST WAIT FOR INPUT
S715 S710
RECEIVE THE REOUEST TRANSMIT REQUEST
S770
NO
YES S775
CREATE FONT LIST
CREATE DISPLAY
SCREEN USING THE
DESIGNATED FONT
RECEIVE DESIGNATION
OF FONT
CREATE DISPLAY
SCREEN USING THE
DESIGNATED FONT
DISPLAY IT ON THE
DISPLAY
EXECUTE OTHER
PROCESSING
U.S. Patent Apr. 21, 2015 Sheet 13 of 13 US 9,015,678 B2
F.G. 14
FONT SELECTION
FONT LIST
EARESSEESARACTERA
s
DETECTION FONT
SORT FONT
MSP GOTHC
FIG. 15 1OOO
1010
CPU
1040 1 O15 102O 1025
1070 1030 s
HDD
1050
COMMUNICATION I/O
CD-ROM 1060
DRIVE
1080 1100
1110
SUPER I/O FLASH KMC
CONTROLLER ROM
1090
FDDRIVE
US 9,015,678 B2
1. 2
TESTING INTERNATIONALIZED mock-translating an externalized resource file to use it as the
SOFTWARE USING TEST RESOURCE FILE externalized resource file that approximates certain attributes,
AND TEST FONT Such as character length, of a target language. In this conven
tional technology, the mock translation includes placeholder
CROSS-REFERENCE TO RELATED data, e.g., characters, that expands the spacing allocated to the
APPLICATIONS text to accommodate for the spacing required for translations.
In a preferred embodiment, all English text that would appear
This application is a divisional of U.S. application Ser. No. on the graphical user interface (i.e., buttons, menus, pop-up
1 1/853,412, now U.S. Pat. No. 8,656,357, filed on Sep. 11, dialogs, dialog window titles, dialog text, error messages,
2007, which claims the benefit of priority of Japanese Patent 10 help windows, etc.) is expanded using tildes, and is enclosed
Application No. 2006-246177, which was filed on Sep. 11, with brackets, i.e., . This mock translation data is stored in
2006. Each referenced application is hereby incorporated by localization files and displayed in a Software application in
reference in its entirety. This application is also related to U.S. place of the English or foreign-language text. The GUI is then
Pat. No. 7,581,208, issued on Aug. 25, 2009, and U.S. Pat. tested by visually inspecting each screen. The programmer or
No. 8,286,136, issued on Oct. 9, 2012 15 proofreader is able to easily recognize many errors that would
occur if the GUI were to be displayed in a translated language,
FIELD OF THE INVENTION without requiring the ability to read any foreign languages.
These errors, referred to as internationalization errors,
The present invention relates to a technology for testing include truncation, expansion, alignment, or otherformatting
internationalized software executed in a plurality of language errors, and programming errors such as text that is hard
environments. More particularly, the present invention relates coded, text missing from localization files, localization files
to a technology concerning a test of an output to a user from missing from the program build, and text composed of more
the internationalized software executed in a language envi than one translated message (see U.S. Pat. No. 6,507,812 and
ronment different from that of an original language, which is U.S. Pat. No. 6,453.462). There also is a technology in which
capable of improving visibility of test objects to enable effi 25 narrow or single-width alphabetic characters of the original
cient testing. language are all replaced with wide or double-width alpha
betic characters to create a mock translation (see U.S. Pat. No.
BACKGROUND OF THE INVENTION 6.425,123). In these technologies, it is confirmed that on a
screen display of the output of the internationalized software
Software Supporting a plurality of languages is called 30 that performs processing by referring to the mock-translated
“internationalized software'. In the internationalized soft resource file, the added characters or the double-width alpha
ware, a text string part to be displayed on a screen is separated betic characters are displayed properly for each of the char
from the source code, and the text string part thus separated is acterstrings of the original language. If only a character string
stored as an externalized resource file. The externalized of the original language is displayed, it is a hard-coded char
resource file is referred to upon execution of the internation 35 acter string. Further, if any of the added characters or the
alized software, and used by the internationalized software to double-width alphabetic characters is replaced with another
make a screen display. When such a configuration is character, it is a garbled character.
employed, it is only necessary for a developer of the interna
tionalized software to translate the externalized resource file SUMMARY OF THE INVENTION
to another language to make the internationalized software 40
Support the other language. Moreover, once the externalized The invention improves techniques for internationalizing
resource file is translated, it is unnecessary to redo the trans Software by using mock translation files. A second file of
lation even if the execution code is changed. messages to be outputted by the Software is created from a
In a development process of Such internationalized soft first file of messages. The messages in the first file are written
ware, tests are conducted for various characteristics or 45 in a first language. The creating of the second file comprises
aspects (hereinafter, referred to as “test categories') to see for each message in the first file,
whether the internationalized software operates properly in a) applying specified rules to form a second message by
language environments of different countries. Among them, changing the character length of the second message,
the tests concerning an output to the user include one that b) filling in any blank characters in the second message
checks whether a message or other character string to be 50 with a dummy character,
displayed to the user has been separated from the source code c) inserting characters from the target language into pre
and externalized properly as a resource file. In other words, scribed places in the second message to form a second mes
this is a hard-coded character string detection test that con sage having both characters of the first language and charac
firms that the message or other character string to be dis ters of the target language, and
played to the user is not directly described (i.e., hard-coded) 55 d) copying the second message into the second file,
in the source code. There also is a validation test of a sort and executing the Software using the second file.
result that checks whether a list of character strings is sorted In another embodiment, a second file of messages to be
properly in the order defined in each language. Such as alpha outputted by the software is created from the first file of
betic order. Also conducted is a displayability test of lan messages. The messages in the first file are written in a first
guage-specific characters that checks whether characters spe 60 language. One or more test characters in a target language are
cific to each language are displayed properly without being selected. The creating of the second file comprises for each
garbled, for example. message in the first file, translating all characters in the first
Translation of the externalized resource file takes time. language corresponding to the test characters to the corre
Thus, in the development process, it is not feasible to use a sponding characters in the target language, and changing all
translated, externalized resource file for testing each problem 65 other characters in the message to a dummy visible character,
category described above in each desired language. For this copying the translated message into the second file and
reason, there was conventionally developed a method for executing the Software using the second file.
US 9,015,678 B2
3 4
In view of the foregoing, the invention improves the mock alized software, and to provide a data structure of a font used
translation of the conventional art. The first improvement is for the test. Another object of the present invention is to
that, for each string item in the resource file of the original ensure that hard-coded character strings are detected without
language, different characters of the translation target lan omission in the test of the internationalized software. A fur
guage that would likely cause a problem are added before and ther object of the present invention is to ensure that, when a
after, or only before, the first characters of the character plurality of character strings are sorted, determination as to
strings of the original language in the mock resource file. The whether the sort result is proper can be made irrespective of
second improvement is that marks indicating the beginning presence/absence of knowledge about the translation target
and the end of an assignment portion of a string item are language in the test of the internationalized software. Yet
added before and after the assignment portion in the mock 10 another object of the present invention is to facilitate deter
resource file. With these improvements, on the screen display mination as to whether there is any garbled character in the
of the output of the internationalized software performing test of the internationalized software.
processing by referring to the mock-translated resource file, To achieve the above-described objects, the present inven
different characters of the translation target language are dis tion provides a method for testing internationalized software
played in front of the character Strings of the original lan 15 executed by a computer as follows. Herein, the internation
guage. Accordingly, it has become possible to conduct the alized software refers to software that performs processing by
validation test of the sort result on the display screen of the referring to an externalized resource file and that is executed
internationalized software using the improved mock transla in a plurality of language environments. The method for
tion, which was not possible with the above-described con testing the internationalized software includes the steps of
ventional technologies. Furthermore, with the improved reading data from the externalized resource file written in a
mock translation, different characters of the translation target first language; generating a test resource file written in a
language of an arbitrary length can be added to different first second language from the externalized resource file written in
characters of the character Strings of the original language. the first language by converting characters of the first lan
Thus, in the improved mock translation, it has become pos guage included in the data to characters of the second lan
sible to conduct the displayability test for a greater number of 25 guage by referring to a conversion table having the characters
language-specific characters using a single resource file. Still of the first language and the characters of the second language
further, on the screen display of the internationalized software associated one for one with each other, executing the inter
using the improved mock translation, the marks indicating the nationalized software; and displaying output information out
beginning and the end of the assignment portion are displayed putted from the internationalized software that performs pro
before and after the assignment portion. As a result, the 30 cessing by referring to the test resource file as the externalized
assignment portion has become distinguishable, and accord resource file on a screen by using one of a plurality of fonts
ingly, in the improved mock translation, it has become pos prepared for respective test categories of the internationalized
sible to appropriately conduct the detection of the hard-coded software.
character string(s) for the assignment portion. Herein, character codes included in the output information
The improved testing method described above, however, 35 can be classified into three groups: a first group of a plurality
still has several problems. Firstly, in the improved testing of character codes corresponding to the characters of the first
method of the conventional art, although the assignment por language, which are not Supposed to be included in the output
tion may be identified, there still is a possibility that a hard information; a second group of a plurality of character codes
coded character string may be overlooked. Further, in the corresponding to the characters of the second language
improved testing method, although it may be possible to 40 included in the conversion table, which are supposed to be
confirm that the list of the character Strings is sorted as a result included in the output information; and a third group of a
of Sorting, a tester who does not have any knowledge about plurality of character codes not corresponding to either the
the translation target language cannot determine whether the characters of the first language or the characters of the second
sort result is correct or not. Even a tester having knowledge language included in the conversion table, which are not
about the translation target language will not be able to imme 45 supposed to be included in the output information. Further,
diately determine whether the sort result is correct or not for each of the plurality of fonts employing a prescribed coding
Japanese or other language having a great number of types of scheme uses different association rules when associating
characters. Furthermore, with the improved method, an character shapes to a group of a plurality of character codes
increased number of types of characters of the translation that are test objects in a test of the internationalized software
target language are displayed on the screen, making it impos 50 and a group of the other character codes in the prescribed
sible for the tester to immediately determine whether there is character coding scheme. Such that the character codes as the
any garbled character among the characters displayed on the test objects and the other character codes are distinguishable
SCC. from each other in a display of the output information using
Moreover, in the improved testing method, it is tried to the relevant font.
check for all the test categories on a single display screen of 55 Therefore, according to the present invention, the character
the internationalized software that performs processing by codes as the test objects are displayed in a manner distin
referring to the mock-translated resource file; this results in guishable from the other character codes, which improves
poor visibility of the test objects. If different externalized visibility of the test objects. While the test objects differ for
resource files suitable for the respective contents of the test each test category, according to the present invention, a plu
categories are prepared, however, it will be necessary to 60 rality of fonts are prepared for the respective test categories,
restart the internationalized software the number of times so that it is possible to provide a display screen suitable for the
corresponding to the number of test categories, which hinders test for each test category by only using the corresponding
efficient testing. font, without the need to restart the internationalized soft
In view of the foregoing, an object of the present invention Wa.
is to provide a method, apparatus and program for efficiently 65 Preferably, the step of displaying the output information
testing internationalized software with improved visibility of using one of the plurality of fonts includes the step of dis
the test objects and with no need of restarting the internation playing the output information using one font selected by a
US 9,015,678 B2
5 6
user from the plurality of fonts. Alternatively, the above step codes that are test objects in the test; a plurality of items of
includes the step of displaying the output information by first character shape information associated one for one with
Switching the font being used to one font selected by a user the plurality of first character codes according to a first rule; a
from the plurality of fonts. Further, preferably, the conversion plurality of second character codes that are other character
table has some of the characters of the first language associ codes in the prescribed character coding scheme; and a plu
ated one for one with some of the characters of the second rality of items of second character shape information associ
language that would likely cause a problem in terms of dis ated one for one with the plurality of second character codes
play. according to a second rule.
Further, preferably, the test categories include detection of Here, the plurality of first character codes correspond to
a hard-coded character string. In the font used for the detec 10
one of a plurality of character codes corresponding to the
tion of the hard-coded character string, the first group corre characters of the first language, a plurality of character codes
sponds to the group of a plurality of character codes that are corresponding to the characters of the second language
the test objects, and the character codes of the first group are
each associated with the character shape of the character of included in the conversion table, and a plurality of character
the first language corresponding to the relevant character 15 codes not corresponding to either the characters of the first
code without modification. Preferably, the above font causes language or the characters of the second language included in
each of the other character codes in the prescribed character the conversion table. When the first character code is detected
coding scheme to be associated with a same character shape. from an output of the internationalized software that performs
The same character shape is preferably a less frequently used processing by referring to the test resource file, the first char
symbol or an inconspicuous symbol Such as a hollow square acter shape information corresponding to the relevant first
symbol. character code is retrieved from the font data and used for
Further, preferably, the test categories include validity of a screen display. When the second character code is detected
sort result of character strings according to the order of char from the output, the second character shape information cor
acters defined in the second language. In the font used for the responding to the relevant second character code is retrieved
determination of validity of the sort result, the second group 25 from the font data, which is used for screen display.
corresponds to the group of a plurality of character codes that While the present invention has been explained above as
are the test objects, and the character codes of the second the method for testing the internationalized software, it is also
group are each associated with the character shape indicating possible to understand the present invention as an apparatus,
the order defined for the character of the second language a program, or a storage medium storing the program. Further,
corresponding to the relevant character code. Preferably, the 30
the features explained in conjunction with the method for
above font causes each of the other character codes in the
prescribed character coding scheme to be associated with a testing the internationalized software may be adapted to the
data structure of the font used for the test of the internation
same character shape. The same character shape is preferably alized Software explained as another aspect of the present
a less frequently used symbol or an inconspicuous symbol
Such as a hollow square symbol. 35 invention. Furthermore, the present invention explained as
Further, preferably, the test categories include displayabil the data structure of the font may also be understood as a
ity of characters specific to the second language. In the font recording medium storing the relevant data structure of the
used for the determination of displayability, the third group font.
corresponds to the group of a plurality of character codes that According to the present invention, it is possible to conduct
are the test objects, and the character codes of the third group 40 an efficient test concerning an output to a user of internation
are each associated with a same character shape. The same alized software executed in a language environment different
character shape is preferably a less frequently used symbol or from that of an original language, with improved visibility of
a conspicuous symbol. the test objects and with no need to restart the international
Further, preferably, the test categories include character ized software for each test category. Other advantages will be
string confirmation for confirming the character strings 45 explained in the following description of the embodiments of
included in the externalized resource file written in the first the present invention.
language. In the font used for the character string confirma
tion, the second group corresponds to the group of a plurality BRIEF DESCRIPTION OF THE DRAWINGS
of character codes that are the test objects, and the character
codes of the second group are each associated with the char 50 FIG. 1A shows an example of an externalized resource file
acter shape of the character of the first language that has the of a test object program, FIG. 1B shows an example of a part
character of the second language corresponding to the rel of a source code of the test object program, and FIG. 1C
evant character code as a converted-to character upon genera shows an example of an output Screen of the test object
tion of the test resource file. In the above test category, the first program;
group also corresponds to the group of a plurality of character 55 FIG. 2A shows an example of a mock-translated resource
codes that are the test objects, and the character codes of the file based on a conventional art, and FIG. 2B shows an
first group are each associated with the character shape of the example of an output Screen of the test object program;
character of the first language corresponding to the relevant FIG. 3 shows a configuration example of an apparatus for
character code without modification. creating a test resource file according to an embodiment of the
According to another aspect of the present invention, there 60 present invention and an apparatus for testing a test object
is provided a data structure of a font employing a prescribed program according to the embodiment of the present inven
character coding scheme used in a test of internationalized tion;
software that refers to a test resource file generated by con FIG. 4A shows an example of an externalized resource file
Verting all the characters of a first character included in an of a test object program, FIG. 4B shows an example of a
externalized resource file written in the first language to char 65 conversion table according to an embodiment of the present
acters of a second language one for one based on a conversion invention, and FIG. 4C shows an example of a test resource
table. The data structure includes: a plurality of first character file according to the embodiment of the present invention:
US 9,015,678 B2
7 8
FIGS. 5a and 5b show a flowchart illustrating an example ROM), an optical storage device, a transmission media Such
of a process flow of the apparatus for creating a test resource as those Supporting the Internet or an intranet, or a magnetic
file according to an embodiment of the present invention; storage device. Note that the computer-usable or computer
FIG. 6 shows an example of a display Screen having the readable medium could even be paper or another suitable
execution result of a test object program displayed using a medium upon which the program is printed, as the program
regular font; can be electronically captured, via, for instance, optical scan
FIG. 7A shows an example of a hard-coded character ning of the paper or other medium, then compiled, inter
detection font according to an embodiment of the present preted, or otherwise processed in a Suitable manner, if neces
invention, and FIG. 7B shows an example of a display screen sary, and then stored in a computer memory. In the context of
having the processed result of the test object program dis 10 this document, a computer-usable or computer-readable
played using the hard-coded character detection font; medium may be any medium that can contain, store, commu
FIG. 8A shows an example of a garbled character detection nicate, propagate, or transport the program for use by or in
fontaccording to an embodiment of the present invention, and connection with the instruction execution system, apparatus,
FIG. 8B shows an example of a display screen having the or device. The computer-usable medium may include a
processed result of the test object program displayed using 15 propagated data signal with the computer-usable program
the garbled character detection font; code embodied therewith, either in baseband or as part of a
FIG.9Ashows an example of a reverse font according to an carrier wave. The computer usable program code may be
embodiment of the present invention, and FIG.9B shows an transmitted using any appropriate medium, including but not
example of a display Screen having the processed result of the limited to the Internet, wireline, optical fiber cable, RF, etc.
test object program displayed using the reverse font; Computer program code for carrying out operations of the
FIG. 10A shows an example of a sort font according to an present invention may be written in an object oriented pro
embodiment of the present invention, and FIG. 10B shows an gramming language Such as Java R, Smalltalk, C++ or the
example of a display Screen having the processed result of the like. However, the computer program code for carrying out
test object program displayed using the sort font; operations of the present invention may also be written in
FIG. 11A shows a flowchart illustrating an example of a 25 conventional procedural programming languages, such as the
process flow of the apparatus for testing a test object program “C” programming language or similar programming lan
according to an embodiment of the present invention, and guages. The program code may execute entirely on the user's
FIG. 11B shows a flowchart illustrating an example of a computer, partly on the user's computer, as a stand-alone
process flow for creating a display screen of the processed Software package, partly on the user's computer and partly on
result using a designated font; 30 a remote computer or entirely on the remote computer or
FIG. 12 shows an implementation example of an overall server. In the latter scenario, the remote computer may be
system according to an embodiment of the present invention; connected to the user's computer through a local area network
FIG. 13 shows a flowchart illustrating an example of a (LAN) or a wide area network (WAN), or the connection may
process flow of the entire system shown in FIG. 12; be made to an external computer (for example, through the
FIG. 14 shows an example of a dialog box displayed for 35 Internet using an Internet Service Provider).
selection of a font to be used; and The present invention is described below with reference to
FIG. 15 shows an example of a hardware configuration of flowchart illustrations and/or block diagrams of methods,
the apparatus for creating a test resource file according to an apparatus (systems) and computer program products accord
embodiment of the present invention and the apparatus for ing to embodiments of the invention. It will be understood
testing a test object program according to an embodiment of 40 that each block of the flowchart illustrations and/or block
the present invention. diagrams, and combinations of blocks in the flowchart illus
trations and/or block diagrams, can be implemented by com
DETAILED DESCRIPTION OF THE INVENTION puter program instructions. These computer program instruc
tions may be provided to a processor of a general purpose
As will be appreciated by one skilled in the art, the present 45 computer, special purpose computer, or other programmable
invention may be embodied as a method, system, or computer data processing apparatus to produce a machine, such that the
program product. Accordingly, the present invention may instructions, which execute via the processor of the computer
take the form of an entirely hardware embodiment, an entirely or other programmable data processing apparatus, create
Software embodiment (including firmware, resident Software, means for implementing the functions/acts specified in the
micro-code, etc.) or an embodiment combining Software and 50 flowchart and/or block diagram block or blocks.
hardware aspects that may all generally be referred to herein These computer program instructions may also be stored in
as a “circuit,” “module' or “system.” Furthermore, the a computer-readable memory that can direct a computer or
present invention may take the form of a computer program other programmable data processing apparatus to function in
product on a computer-usable storage medium having com a particular manner, Such that the instructions stored in the
puter-usable program code embodied in the medium. 55 computer-readable memory produce an article of manufac
Any suitable computer usable or computer readable ture including instruction means which implement the func
medium may be utilized. The computer-usable or computer tion/act specified in the flowchart and/or block diagram block
readable medium may be, for example but not limited to, an or blocks.
electronic, magnetic, optical, electromagnetic, infrared, or The computer program instructions may also be loaded
semiconductor System, apparatus, device, or propagation 60 onto a computer or other programmable data processing
medium. More specific examples (a non-exhaustive list) of apparatus to cause a series of operational steps to be per
the computer-readable medium would include the following: formed on the computer or other programmable apparatus to
an electrical connection having one or more wires, a portable produce a computer implemented process such that the
computer diskette, a hard disk, a random access memory instructions which execute on the computer or other program
(RAM), a read-only memory (ROM), an erasable program 65 mable apparatus provide steps for implementing the func
mable read-only memory (EPROM or Flash memory), an tions/acts specified in the flowchart and/or block diagram
optical fiber, a portable compact disc read-only memory (CD block or blocks.
US 9,015,678 B2
10
The flowchart and block diagrams in the Figures illustrate string obtained by assigning the second argument to the vari
the architecture, functionality, and operation of possible able included in the character string of the first argument.
implementations of systems, methods and computer program Specifically, when executing the “showMessage' command,
products according to various embodiments of the present the test object program retrieves the key “MSG01 as the first
invention. In this regard, each block in the flowchart or block 5 argument from the resource file 100, and reads the corre
diagrams may represent a module, segment, or portion of sponding character string value "The status is {0}.” The test
code, which comprises one or more executable instructions object program then assigns “Green', received as the second
for implementing the specified logical function(s). It should argument, to {0} of the read character string value, to even
also be noted that, in Some alternative implementations, the tually display “The status is Green.” on the screen, as shown
functions noted in the block may occur out of the order noted 10 in 115 in FIG.1C. It is noted that {0} included in the character
in the figures. For example, two blocks shown in Succession string assigned to the key MSG01 is an “assignment portion'.
may, in fact, be executed Substantially concurrently, or the and the variable assigned to {0} has its value determined at
blocks may sometimes be executed in the reverse order, the time of execution.
depending upon the functionality involved. It will also be Now, the improved mock translation method and problems
noted that each block of the block diagrams and/or flowchart 15 thereofwill be explained with reference to FIGS. 2A and 2B.
illustration, and combinations of blocks in the block diagrams As described above, in the improved mock translation, dif
and/or flowchart illustration, can be implemented by special ferent characters of a translation target language that would
purpose hardware-based systems that perform the specified likely cause a problem are added before and after the first
functions or acts, or combinations of special purpose hard character of the character string of the original language for
ware and computer instructions. eachitem in the resource file of the original language. Further,
The terminology used herein is for the purpose of describ marks indicating the “beginning” and the “end” are added
ing particular embodiments only and is not intended to be before and after the assignment portion included in the
limiting of the invention. As used herein, the singular forms resource file. The mock-translated resource file 200 shown in
“a”, “an and “the are intended to include the plural forms as FIG. 2A corresponds to the resource file 100 shown in FIG.
well, unless the context clearly indicates otherwise. It will be 25 1A that is mock-translated according to the improved tech
further understood that the terms “comprises” and/or “com nology. Herein, the translation target language is Japanese.
prising, when used in this specification, specify the presence As seen from FIG. 2A, in this example, the characters
of stated features, integers, steps, operations, elements, and/ & G f 99
or components, but do not preclude the presence or addition and
of one or more other features, integers, steps, operations, 30
elements, components, and/or groups thereof. “4”
The corresponding structures, materials, acts, and equiva and the characters
lents of all means or step plus function elements in the claims
below are intended to include any structure, material, or act and
for performing the function in combination with other 35
& G 2: 99
claimed elements as specifically claimed. The description of are selected and added before and after the first characters of
the present invention has been presented for purposes of alphabets “T” and “G”, respectively, as the characters that
illustration and description, but is not intended to be exhaus would likely cause a problem. For the first characters of the
tive or limited to the invention in the form disclosed. Many other items, different Japanese characters are selected and
modifications and variations will be apparent to those of 40
added before and after the different alphabets. The first char
ordinary skill in the art without departing from the scope and
spirit of the invention. The embodiment was chosen and acter of each item is put in “()', facilitating identification of
described in order to best explain the principles of the inven the first character. Further, the characters
tion and the practical application, and to enable others of “Eff. '
ordinary skill in the art to understand the invention for various 45 and
embodiments with various modifications as are suited to the & G $3. 99
particular use contemplated. are added before and after the assignment portion {0}.
Prior to the description of the present invention, an exter FIG. 2B shows a screen 205 that is displayed when the test
nalized resource file of internationalized software, an object program, read for execution of the mock translation,
improved mock translation method and problems thereof will 50
executes the source code shown in FIG. 1B. Focusing on the
be explained with reference to FIGS. 1A, 1B, 1C, 2A, and 2B. character string “Green displayed in the field 210, the char
Hereinafter, the internationalized software is referred to as a acters
“program to be tested’ or “test object program’, and the “BE if ''
externalized resource file is simply referred to as a “resource and
file'. FIG. 1A shows, as an example of the resource file, a 55
resource file 100 of a test object program with English as the & G f:3. 99
original language. As shown in the figures, the resource file are displayed before and after “Green', with no Japanese
includes a plurality of items, each consisting of a key and a characters added before and after the first character “G”, and
character string to be assigned to the key. When the test object it is thus understood that this character string is a hard-coded,
program encounters a key at the time of execution, it searches 60 assigned character string. The first characters of the three
the resource file for the relevant key, and reads the value of the character strings in the list box 215 each have different Japa
character string to be assigned to the key. This operation will nese characters added before and after the same, and it is thus
now be described in more detail using a source code 105 understood that it is possible to carry out a validation test of a
shown in FIG. 1B and an output screen 110 of the test object sort result by executing the Sort command. Furthermore, the
program shown in FIG. 1C. 65 Japanese characters displayed before and after the first char
The command “showMessage()' included in the source acter “R” of the character string "Refresh the Status' dis
code 105 is a command to display on a screen a character played on the button 225 are different from the initially added
US 9,015,678 B2
11 12
Japanese characters, so that it is understood that there is a reference to FIGS. 3, 4A, 4B, 4C, 5A, and 5B. Subsequently,
problem in display of the characters a method of testing a test object program using the mock
. . A 's translated resource file and a plurality of fonts prepared for
and the respective test categories will be described with reference
ck-' to FIGS. 3, 7A, 7B, 8A, 8B,9A,9B, 10A, 10B, 11A, and 11B.
The portion in FIG. 3 delimited by a dotted line is a func
in the relevant portion. tional block diagram of an apparatus 300 for creating a test
However, the testing method utilizing such improved mock resource file according to an embodiment of the present
translation still has several problems as described above. One invention. The apparatus 300 includes: a first storage unit
problem is that, although the assignment portion may be 10 storing an original resource file 310 and a conversion table
identified, the hard-coded character string may be over 320; test resource file generating unit 330; and a second
looked. As for the character string having an assignment storage unit storing a test resource file 340. It is noted that the
portion, not only the original character string having a char first and second storage units may physically be a single
acter string assigned thereto, but also the character string in storage device. Further, while Unicode is employed as a pre
the assignment portion have to be confirmed whether it is a 15 scribed character coding scheme in the present embodiment,
hard-coded character string or not. The confirmation of the the present invention is not restricted thereto, and it is of
hard-coded character string is carried out based on the first course possible to employ any other character coding scheme.
character of the character string as described above. This The “character code” as used herein is a code associated with
means that, when the assignment portion is in the middle of a character, which is called a “code point in Unicode.
the character String, as is the case of the character string in the The original resource file 310 is an original resource file
field 210 of FIG. 2B, the confirmation of the hard-coded referred to by the test object program during execution. FIG.
character string may not be possible for the assignment por 4A shows, as an example of the original resource file 310, a
tion that is not positioned at the beginning of the character resource file 400 in which the original language is English. In
String. the present embodiment, the translation target language is
Another problem is that, even if it can be confirmed that the 25 Japanese. The conversion table 320 is a table in which the
list of the character strings is rearranged as a result of sorting, characters of the original language as the first language and
determination as to whether the sorting is proper is difficult. It the characters of the translation target language as the second
will be difficult for not only the tester who does not have any language are associated with each other one for one. In order
knowledge of the translation target language but also the to enable Such one-to-one mapping, it is required that the
tester who has knowledge thereof to immediately determine 30
range of the character codes of the characters used in the
whether the sorting has been correctly performed or not for a translation target language is greater than the range of the
language having a great number of characters like Japanese. character codes of the characters used in the original lan
Yet another problem is that in the testing method utilizing the guage. For example, English (ASCII code) uses the Smallest
improved mock translation, a large number of types of char range of the character codes, so that it is possible to select
acters of the translation target language are displayed on the 35 Japanese, Chinese, Korean or French as the translation target
screen, hindering immediate determination as to whether language. In contrast, when French is the original language,
there is any garbled character in the displayed characters. For although it may be possible to select Japanese or Chinese as
example, it is not possible to identify the garbled characters the translation target language, it is not possible to select
by seeing the display screen 205 in FIG. 2B alone. English. Preferably, in the conversion table 320, some of the
Furthermore, with the improved testing method, visibility 40 characters of the original language are associated one for one
of the test objects on the display screen is low, since a single with the characters of the translation target language that
display screen of the internationalized software that performs would likely cause a problem in terms of display.
processing by referring to a mock-translated, externalized Here, the characters that would likely cause a problem in
resource file is used to try to confirm the results all at once. On terms of display will be described with reference to Japanese
the other hand, if an externalized resource file suitable for the 45 characters by way of example. Firstly, the Japanese characters
test content is to be prepared for every test category, it will be ege 22
necessary to restart the internationalized software the number
of times corresponding to the number of test categories, hin & G JPA 99