We already mentioned that the characters "#" and "~" have a special meaning, a few others to look at are:
The "&" character in one of the examples above is used to mark the letter which in combination with Alt will execute the command; i.e. Alt+S for "Show &Status Bar". Therefore you need to pay attention while choosing a letter in the translation (or check later in context) that the same letter isn't marked twice within one menu.
Special characters such as quotes must be "escaped" (i.e. preceded) with a backslash, if you want to use them as part of the text:
#: cardmaps.cpp:105 #, c-format msgid "kpat: PANIC, cannot load card pixmap \"%1\"\n" msgstr "KPat: schwerer Fehler, kann Kartenbild \"%1\" nicht laden\n" |
Unescaped quotes will be interpreted by the programs which read the file as the end of the "msgstr". The test routine msgfmt --statistics, described below, would terminate at this point with an error.
One problem which languages with longer than average words (German, for example, is notorious here) sometimes encounter is dialog boxes which are too small, cutting off or cramming together translated text. This is one of the things that can only be determined for sure by checking the translations in the compiled program. The obvious, but always temporary, solution is to "keep it short." You would basically do this if there were no more time to pursue the proper solution, namely contacting the author of the program so that he/she can adjust the geometry of the offending boxes. In any case, an e-mail describing the problem should be sent to the author.
A problem which sometimes occurs is when English text appears in the program interface even though the PO file has been completely translated, and the text in question can't even be found there.
One way this can happen is when the text comes from "somewhere else" (usually from kdelibs which can be found throughout the KDE interface). Another possibility though, is if that particular text hasn't been made "i18n conform" by the author. -- What?
Any strings which should be seen by the user are supposed to be passed to the C function const char* i18n(const char*). This ensures that the properly localized version of a string is shown (assuming there is a translation), thus it's only possible to translate texts which have been prepared in this manner. In cases where the untranslated text can't be found in the PO file the author probably forgot to do this. If you want to know for sure, you need to look in the source to the program; for example, you can find out the filename and line number by using grep "text in question" *.cpp in the source code folder.
If you discover such a case, please file a bug or write the author of the program. Don't just leave the problem unmentioned.