Translating Night Vision
Night Vision has been designed to be readily translatable into other
languages without the author's assistance. (At least those that use a
single byte character set. Languages that use a double byte character set
may have some issues.)
The following files or groups of files are translatable:
- nvj.htm - The documentation file
- nvj.loc - The location file
- nvj.stn - The star name file
- nvj.ds - The deep sky object file
- Text.properties - Text used in the windows (other than help)
- Help files - Text and graphics used in the help windows
To translate these files requires some knowledge of html (which is the
markup language used for web documents), familiarity with a command-line
window (issuing commands, making directories, ...), and the Java Archive
Tool (jar) which is contained in the Java2 Software Development Kit (SDK).
Some limited programming experience is highly recommended, otherwise the
following instructions will probably not make much sense.
The basic procedure is as follows:
- Create a clean directory and place a copy of the Night Vision
jar file, nvj.jar, and the documentation file, nvj.htm, in it.
- Extract the files to be translated via the following commands:
jar xvf nvj.jar nvj/nvj.loc
jar xvf nvj.jar nvj/nvj.stn
jar xvf nvj.jar nvj/nvj.ds
jar xvf nvj.jar nvj/Text.properties
jar xvf nvj.jar nvj/help/
- Translate nvj.htm and the files in the nvj and nvj/help
subdirectories. Special care must be taken when altering Text.properties.
This file contains numerous "key=value" pairs, where each "value" is a
piece of text used within the Night Vision windows. It is very important
that the "key" text is not altered, otherwise Night Vision will likely
crash when this text is accessed.
To aid translation, nvj.htm and the help files in the nvj/help
subdirectory are viewable with a standard web browser.
The names of the help files, and the links within those files
should not be changed, otherwise Night Vision will be unable to locate
the desired help page. Adding new files and links is OK.
- After the files are translated, merge the altered files into
nvj.jar by issuing the following command within the directory
that the original extraction took place:
jar uvf nvj.jar nvj
- Test the translated Night Vision with the following command:
java -jar nvj.jar
Changes can be easily made by re-editting the extracted files and then
merging the files back into nvj.jar.