You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



 

Mozilla Localization Project FAQ

newsgroup discussion / mailing list
Mozilla Localization Project Staff

MLP [Localization Project home] | [Localization docs] | [Frequently Asked Questions]

Introduction

This document should cover all the information doesn't fit in the other MLP pages, in a question and answer format.

Ideally these are the problems localizers most often stumble into; the questions asked again and again from the newcomers of the l10n newsgroup. Having the answers sorted here should save some pain and time for everyone in future.

The contents of this document (as, and more than the other MLP pages), is always open to the comments and critics of the mozilla.org localization newsgroup.

Contents

Localization

 L.01 The comments in the dtd / properties files says I can't translate the Command Keys and some terms of the interface. What would happen if I'm going to change them?
 L.02 Which parts of the localizable strings needs to be left untouched for the program to run properly?

Troubleshooting

 T.01 Why some localized dialogs (e.g. Preferences) doesn't resize to let the text fit in the window?
 T.02 After installing my .XPI language package, the installation window returns a cryptic number. What's happened?
 T.03 How can I monitor the installation of my XPI language package?
 T.04 Opening one particular window, some red on yellow messages appear, talking something about an XML Parser error. How can I fix this?
 T.05 I've edited the dtd and properties files, but once installed all but the Latin letters (A-Z, a-z), appears as garbled text. What I did wrong?

Tools

 O.01 Mozilla Translator 5.x: When I open the Chrome View window I can see the files listed on the left, but no imported / translated strings. What's wrong?
 O.02 Mozilla Translator 5.x: Exporting a JAR or an XPI package returns an error. How can I get out of this situation?

General

 G.01 Where are placed .XUL, .JS, .CSS, .DTD, .properties, .RDF, .CSS, .XBL (etc!) files used by the user interface?
 G.02 What are those .JAR files? How can I manage their contents?


Localization

L.01: The comments in the dtd / properties files says I can't translate the Command Keys and some terms of the interface. What would happen if I'm going to change them?
You're free to change whatever makes sense for your culture (and for the users!), as long you're able to recognize what the program needs to find for its internal use. Translating every term sometimes doesn't makes a good service to the mean user, letting every computer related term in English couldn't help beginners either. It's matter of sense of balance.
So the question become..

L.02: Which parts of the localizable strings needs to be left untouched for the program to run properly?
Learn to read every comment left by developers in the dtd and properties files. They might say something not covered in this FAQ, or doesn't easily fall in a rough categorization.
As each language uses a different sentence ordering. Strings which need to be completed with runtime information contain placeholders. The localizer can put placeholders in any position inside the string, as long the program is able to find them at runtime and replace them with the relevant information. You clearly need to type them in your localized string exactly as they appear in the original strings. Some common appearance of these placeholders are: &entityname; (an XML entity named "entityname", sometimes called inside another entity definition), %S, $1%S, %lu .. (C style placeholders).
Always with an eye to the localization comments, don't get fooled by parameters accessible to the localizers, in the form of localizable strings. These special strings contains values the interface uses to modify its appearance and functionality. You'll of course need to put a relevant value (a number, true, false..) instead of translating the text, if you wish the program doesn't loose some functionality.

Troubleshooting

T.01: Why some localized dialogs (e.g. Preferences) doesn't resize to let the text fit in the window?
Many dialog windows take their height and width size from localizable strings. You need to change the numbers in those strings until the dialogs can contain the localized text.
Remember: sizes should always fit even on low resolution display (at least 640x480 pixels), used by people with small monitors or sight impaired people.
Often these numbers are followed by the em or px units. The former is the mean width of one character, the latter the display pixel unit.

T.02: After installing my .XPI language package, the installation window returns a cryptic number. What's happened?
The XPI Install error codes are defined in the nsInstall.h header file.

T.03: How can I monitor the installation of my XPI language package?
Mozilla logs each XPI installation in the install.log file. You can find this file either in the Mozilla binaries folder, or in the user profile folder (see the Release Notes page for your Mozilla version to see the default folder location for each OS).
Beside listing every new component registered, and the path of these installed resources, this file log the output of each logComment() call in the install script.

T.04: Opening one particular window, some red on yellow messages appear, talking something about an XML Parser error. How can I fix this?
The likely causes to this problem are: you didn't provided an entity definition the XML Parser is searching for, or the XML Parser stumbled in an illegal character.
Start trying to find out the guilty DTD file. The XML Parser usually signal the XML (or XUL) file where the error occurred, and the position inside this file (row and column). Opening the XUL file (search inside the compressed .jar inside the chrome/ folder) you can see which DTD files are loaded.
Sometimes the XML Parser also indicates the entity name, so you can quickly track the problematic string, by searching it in all your localized files. If you can't find the entity with the relevant name, the problem is likely you didn't have such string in your localized files. You need to import all the new strings might be introduced with new releases.
Also remember not all the characters are legal in XML strings.

T.05: I've edited the dtd and properties files, but once installed all but the Latin letters (A-Z, a-z), appears as garbled text. What I did wrong?
You didn't used the right character encoding for the DTD or properties files, probably modifying them using a simple text editor. You need to provide .DTD files encoded in UTF-8 encoding and .properties files in the Escaped Unicode encoding.

Tools

O.01: Mozilla Translator 5.x: When I open the Chrome View window I can see the files listed on the left, but no imported / translated strings. What's wrong?
Mozilla Translator needs for its normal operation the presence of a cache/ folder, inside the folder in which the application has been started.
So you should check: the folder exist, otherwise create one with the name "cache", then restart MT; you're starting MT from the folder containing cache/, it's easy to verify this is the case if the Glossary.zip file are loaded / saved from the same folder; you —and hence the MT application— have enough rights to read and write in this cache/ folder (e.g. try to delete each file in it).

O.02: Mozilla Translator 5.x: Exporting a JAR or an XPI package returns an error. How can I get out of this situation?
Try to empty the cache/ folder where MT is run from all the files in it, and the operative system default temporary files location (e.g. in MS Windows take a look in the %WINDIR%\Temp folder ) from any *.tmp file. Then restart MT and try again.

General

G.01: Where are placed .XUL, .JS, .CSS, .DTD, .properties, .RDF, .CSS, .XBL (etc!) files used by the user interface?
G.02: What are those .JAR files? How can I manage their contents?
JAR files are compressed archives containing registered user interface resource files. They are collected inside a folder named chrome/, inside the folder containing the application executables. On multiuser environments JARs can be installed into a chrome/ folder inside the user profile directory (see the Release Notes page for your Mozilla version to see the default folder location for each OS).
You can see / extract their contents with a conventional PKzip compatible tool.