A tool is provided to support translation of resource strings on an installed product, i.e. subsequent to development of the product, wherein a resource string is text that is displayed to the user and translated in association with execution of an installed product. Resource strings may be identified before or after translation of the installed product, as prescribed by a selection of rules associated with assignment of tags to identified resources. In one embodiment, a resource string and a string are synonymous, and are hereinafter referred to as translatable objects or objects. The tool supports modifying objects in a file designated for translation. The designated translatable objects may be in the form of text or images. A set of rules are followed to attach tags to select translatable objects. Each tag or set of tags are associated with a source and identify the source of the translated or translatable object. Following assignment of the tags to identified objects, a user may test the designated file(s) for translation accuracy. Testing of the file displays the identified objects with the tags attached, wherein the tags indicate the origin of the identified object. Accordingly, in the event of an error associated with translation of the object, the source of the translatable object is ascertainable through identification of the attached tag.
Following step (106), the user-designated rules of the verification tool are executed to initiate verification of translatable objects on the installed application. The verification process entails attaching tags to designated translatable objects in a select directory.
If the response in step (206) is positive, the contents of the compressed and/or archived file are extracted to a temporary location (208). The following steps for the compressed and/or archived file are performed using the temporary location designated at step (208) in place of the install directory or another directory ascertained at step (204). Each file in the temporary location is scanned (210) and each file from the temporary location is processed starting at step (202) to identify translatable objects in the file(s) that had been previously compressed. Following completion of the assignment of tags to translatable object(s), as explained in detail at steps (228)-(240), the instructions return to step (214) wherein the contents from the temporary location are compressed and/or archived into a file (214). Thereafter, the original file is replaced with the new compressed file (216).
Following a negative response in step (206), it is determined if the file being tested is a compiled resource with the source code provided (218). A positive response in step (218) will result in a subsequent determination of whether the compiled resource file has source code (220). If the file has compiled source code, the resource file is decompiled to obtain the source code file(s) (222). Following step (222) or in case of a positive response in step (220), the source code file is handled like a non-compiled file (224), as described below in more detail beginning at step (228). As described below at steps (228)-(240) the non-compiled resource is parsed and appropriate tags are added to translatable objects. Following the completion of step (234) for instructions that originated at step (224), the process returns to step (226) so that the source code file(s) is then compiled to replace the original compiled resource file and the source file is deleted (226), thereby producing a new compiled file which replaces the original one. Accordingly, each compiled resource file is decompiled so that the files may be scanned to determine the source of the file for verification testing.
Following a negative response in step (218), or as noted above, following step (224), it is determined if the file is a non-compiled resource (228). A positive response in step (228) will result in a parsing of the file being tested to identify each translatable object (230). A set of prescribed rules are used to add and or attach a tag to each translatable object (232) that is identified at step (230). A tag is also known as an identifier which may be in the form of a string or symbol that is attached to an identified object, wherein the string or symbol is different than the identified object and denotes the origin of the identified object that has been or will be subject to translation. Attachment or addition of a tag to an object is to associated a unique identifying string with the object that clearly delineates the object from the tag. Different rules may include how to attach a tag to an identified object, and this would affect how a user of the tool may identify attachment of tags to identified objects. As shown at step (104), a user of the tool provides a set of rules for attachment of tags to identified objects. For example, in one embodiment, there may be a selection of rules available and these rules are presented to the user through an interface. The user would then select one or more rules from the interface selection. Rules can be set to attach tags before or after translation of the resource strings. In one embodiment, the interface may provide a custom rule process that enables the user to uniquely define the attachment of the tag(s) to identified objects. In one embodiment, the tag may be pre-attached or post-attached to the identified translatable object(s). If a specific tag is generated and attached to an identified translatable object, the tag and object information are added to an index file (234). In one embodiment, the index file is only generated with respect to generation of specific tags so that the unique tags may be properly identified. Accordingly, based upon a set of prescribed rules, tags are added to each identified translatable object and at the same time are collated into an index.
However, if the response in step (228) is negative, it is further determined whether the file in question is an image resource file (236). A positive response in step (236) will result in generating tags for the file based upon a set of prescribed rules (238). A rendering of the tag is added to one or more image files as designated by the rules (240). The tag for the image and the image file name are added to the index file. In one embodiment, not all the information may be included in the index file, such as information that is extraneous to the prescribed rules. Accordingly, based upon a set of prescribed rules, tags are added to each image.
The above described process outlines how to identify non-compiled and image resource files and how to apply tags to specific translatable objects and/or images based upon a set of prescribed rules. There are two general categories of tags, generic and specific. A generic tag may be applied to multiple translatable object categories. In one embodiment, a generic tag can be used for all translatable objects in a file or component. A specific tag has a one tag to one object ratio, i.e. there is a unique tag for each object. In one embodiment, a specific tag may take the form of a generic tag with a pre-attached or post-attached integer. Whether the tag is specific or generic, the tags may come in various formats. In one embodiment, the tags may be pre-attached or post-attached to the original translatable object. Similarly, tags can be added to or separated from an assigned translatable object using spaces, colons, hyphens, parenthesis, underscore, a symbol, or a combination of any of the above. Regardless of the tag format or category, each tag assigned to a resource file or image identifies the origin of the associated translatable object and/or image. Once the translatable objects and/or images have been modified, the associated application can be tested for translation verification under normal operating conditions. The test results will identify any translatable objects that are not properly translated, and the associated tag provides data indicating the origin of the translatable object.
The invention can take the form of a hardware embodiment, a software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the invention is implemented in software, which includes, but is not limited to firmware, resident software, microcode, etc.
Furthermore, the invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, random access memory (RAM), read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk read only memory (CD-ROM), compact disk B read/write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
In one embodiment, the verification tool includes an assignment manager provided in software or hardware. The assignment manager is responsible for prescribing a set of rule to identify translatable objects and to assign tags to identified objects of a resource file. With respect to the software implementation, the assignment manager may include, but is not limited to, firmware, resident software, microcode, etc. The software implementation can take the form of a computer program product accessible from a computer-useable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system.
In one embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc. The invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
Embodiments within the scope of the present invention also include articles of manufacture comprising program storage means having encoded therein program code. Such program storage means can be any available media which can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such program storage means can include RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired program code means and which can be accessed by a general purpose or special purpose computer. Combinations of the above should also be included in the scope of the program storage means.
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, random access memory (RAM), read-only memory (ROM), a rigid magnetic disk, and an optical disk. Current examples of optical disks include compact disk B read only (CD-ROM), compact disk B read/write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.
Network adapters may also be coupled with the system to enable the data processing system to become coupled with other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, wireless and Ethernet adapters are just a few of the currently available types of network adapters.
The translation verification tool efficiently identifies the source of a translatable object in an application. Rules may be invoked to identify specific categories of translatable objects in an application and to attach tags to the objects. The tags are associated with the source of the translatable objects. During verification testing of the application, the source of a translatable object that is shown to contain an error would be identifiable through the attached tag without affecting the integrity or execution of the application.
It will be appreciated that, although specific embodiments of the invention have been described herein for purposes of illustration, various modifications may be made without departing from the spirit and scope of the invention. In particular, for applications with multiple components working together the verification process can be complex. Tags can be attached to all translatable objects, i.e. any item that needs to be translated, except for the objects in the components to be tested. This provides an indicator to the tester that all tagged translatable objects can be ignored and testing of the application only needs to process untagged objects. In another form, the user of the verification tool can tag all components in an application and use this version of the application as a reference when testing the application on an alternate machine. Similarly, beyond testing for proper translation, the tool may be invoked to test translation context, such as for font size and display. Accordingly, the scope of protection of this invention is limited only by the following claims and their equivalents.