GEOS SDK TechDocs
|
|
5 Translating Text
|
5.2 Translating With ResEdit
Choose Other from the File menu; in the submenu that appears, choose Export Document. In the dialog that appears, choose a file location and name for the ASCII Translation File (ATF).
If you have already gone through the translation process once, and only wish the ASCII Translation File to contain entries for those chunks which have been translated, select the Export only changed chunks box.
Press the OK button.
You may now edit the ASCII file to translate strings.
The important lines of the file are of the form:
[keyword ] data
There should always be one space between the keyword and the data. The following keywords appear in the header:
The ASCII Translation File then lists all resources in the geode, by means of [resource ] lines and [endrsrc ] lines. Do not change the text of these lines. If, examining a resource, you realize it contains no chunk entries you wish to change, you may delete it to make it easier to find the resources you do wish to change. To do so, delete the [resource ] line, the [endrsrc ] line, and all lines in between.
Within each resource, there may be one or more chunks containing localizable strings. For each such chunk, there will be five lines:
[chunk ] chunkname
[original ] {original text}
[localize ] {instructions} max, min, type
[translate ] {translated text}
[mnemonic ] mnemonic [shortcut ] mods,shortcut
You will leave most of these fields alone, translating only the translated text , mnemonic , mods , and shortcut fields.
@localize
keyword in the source code files.
localize
keyword.
@localize
keyword. [translate ] {moustache: :-{{)}
[shortcut] PC,s
If, for some reason, the question mark were to be a shortcut, it would be represented by
[shortcut ] ,?
Only monikers may have shortcuts. The lack of shortcut is represented by
[shortcut] ,
Be careful when representing the lack of a shortcut: the carriage return or line feed at the end of the line must occur immediately following the comma. If there is an intervening space, ResEdit will think you want to use the space bar as a shortcut key.
If you will not need to translate a chunk, you may delete its entry to make it easier to find the chunks you do wish to translate. Delete the [chunk ] line and the [shortcut ] line and all lines in between.
To convert your ASCII Translation File into a regular Translation File, use ResEdit to import the file: either press the Import button in the dialog that appears when ResEdit starts up, or choose New/Open from the File menu, and then choose Import in the dialog that appears. In the dialog that appears, show ResEdit the location of both the ASCII Translation File and the Localization (.vm) File.
Press the OK button.
If your original-language geode has changed since the ASCII Translation File was created, ResEdit may present a warning dialog box at this point. Assuming the geode hasn't changed too much, it's probably safe to use the ASCII Translation File anyway. If you're hesitant, you can abort the import. You might then want to export another ASCII Translation File from the newer version of the geode.
GEOS SDK TechDocs
|
|
5 Translating Text
|
5.2 Translating With ResEdit