X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4aa1406671c5d6abded83e3713b423ac4d40b7c9..cc27bb07169564cc43262821651f992271ea0eb8:/samples/internat/readme.txt diff --git a/samples/internat/readme.txt b/samples/internat/readme.txt index 9005d890d6..ca4465244c 100644 --- a/samples/internat/readme.txt +++ b/samples/internat/readme.txt @@ -19,7 +19,7 @@ A. Your system doesn't have the translation in the language you use, sorry. Q. Why the message when I enter '9' is not translated? A. This is on purpose: the corresponding string wasn't enclosed in _() macro and so didn't get into the message catalog when it was created using xgettext. - + Q. Why the message when I enter '17' is only partly translated? A. This will only work under some versions of Linux, don't worry if the second half of the sentence is not translated. @@ -33,10 +33,10 @@ A. Please write them - see the next question. French is chosen by default the language name if only 1 argument is given). Q. How to do translations to other language? -A. First of all, you will need the GNU gettext tools (see the next question). +A. First of all, you will need the GNU gettext tools (see the next questions). After you've probably installed them, type the following (example is for Unix and you should do exactly the same under Windows). - + # all translations forgiven language should be in a separate directory. # Please use the standard abbreviation for the language names! mkdir @@ -45,9 +45,9 @@ A. First of all, you will need the GNU gettext tools (see the next question). # generate the .po file for the program itself # see `xgettext --help' for options, "-C" is important! xgettext -C -n -k_ -kwxPLURAL:1,2 -kwxTRANSLATE -o internat.po ../internat.cpp - - # .po file for wxWidgets might be generated in the same way. An already - # generated wxstd.pot as well as translations for some languages can be + + # .po file for wxWidgets might be generated in the same way. An already + # generated wxstd.pot as well as translations for some languages can be # found in the locale directory. cp ../../locale/.po ./wxstd.pot - or - @@ -64,7 +64,24 @@ A. First of all, you will need the GNU gettext tools (see the next question). # run the sample to test it cd .. - ./internat + ./internat + +Q. How to do update the translation of 'internat' sample for a language? +A. First of all, you will need the GNU gettext tools (see the next question). + After you've probably installed them, type the following (example is for Unix + and you should do exactly the same under Windows). + + # enter the directory of an already-existing translations which needs to be updated + cd + + # the -j flag tells xgettext to merge and not simply overwrite the output file + xgettext -j -C -n -k_ -kwxPLURAL:1,2 -kwxTRANSLATE -o internat.po ../internat.cpp + + # now edit the files and do translate the new strings (this isn't done by gettext) + vi internat.po + + # update the message catalog: + msgfmt -o internat.mo internat.po Q. How to get the gettext tools? A. For Unix, you should be able to get the source distribution of any GNU mirror