README.TRANSLATION 3.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
(1) Prerequisites

Make sure that GNU gv has been installed if you want to test the translation.
In this case also make sure you have turned on international mode for GNU gv
(see README.I18N for details).

Otherwise compiling GNU gv and taking the generated file
"src/gv-update-userconfig" will be enough.
Also make sure that perl 5.8 or newer is working.



(2) File names of the translation file

The file has to be named "$LOCLAE.dat", where $LOCALE may be e. g. "de_AT.utf8"
for the austrian locale. See appendix "(B) Naming locales" for details.

If you do not have a translation file, start with an empty one, that is, 
create one with "touch $LOCALE.dat".




(3) Getting the file to translate / Updating it

simply run "gv-update-userconfig -i $LOCALE.dat"

This command will add all strings that are not in the translation file to the
end of that file.



(4) Translating the strings

After (3) you will find in your $LOCALE.dat many lines like the followings:

GV*copyright.Label:                     Copyright
GV*miscmenuLabel.label:                 Misc Menu Entries
GV*optionsgv.Label:                     gv Options ...
GV*mark.Label:                          Mark
GV*dismiss.Label:                       Dismiss

Just overwrite the right hand side with your translation.



Important: Do not change the "GV.version" resource which may look like the
following:

GV.version:             gv 3.6.7.90


(5) Testing your translation (optional)

Create a symlink "~/.gv-$LOCALE" to the rranslation file $LOCALE.dat unless you have already done so.

Just run gv, your symlink "~/.gv-$LOCALE" will ensure that your translation is
used instead of GNU gv's own strings.



(6) Submitting the translated files

See my job discription on http://sv.gnu.org/projects/gv for details.

I'll check if they are syntactically correct and copy them to "src/nls" in the
67
distribution tarball of GNU gv and update the src/nls/LANGUAGES file.
68 69 70 71 72 73 74 75 76 77 78









(A) What to do of more locales share the same translation strings?

79
src/nls/LANGUAGES can contain aliases for languages.
80
Assume "de_CH.utf8" uses the same translation strings as "de_AT.utf8".
81 82
"echo 'de_AT.utf8 -> de_CH.utf8' >> LANGUAGES" tells GNU gv to use the
strings from the locale "de_AT.utf8" for the locale "de_CH.utf8".
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111




(B) Naming locales

A locale is named "language[_territory][.codeset][@modifier]".

If the complete locale does not match to one of the translations, the modifier
is removed. If this still does not match, the territory is removed.


IMPORTANT NOTE:
If international mode is turned off, the locale is prefixed with "noint:", e. g.
"noint:en_US". So locales are named "noint:language[_territory]".

Note that multibyte characters are not available in non-international mode.
For that reason it is wise not to use the translation from the international mode
for the non-international mode and codeset and modifier are not used to identify a
translation.
It's ok not to provide a translation for the non-international mode. But you can
provide one if you think that this is a good idea.





TODO: Which charset to use in non-international mode?  7-bit-ASCII might be a
good choice.