X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=po%2FREADME.Translations;h=3b7abd44f62f4a6f48298486f7e13318ca12ba32;hp=be8cb785e6519d0a890a3b740b88a016efb06950;hb=fb6992776bc7f34be2118b095367a9d52657e9e1;hpb=2573fe442275287321d828d88a5fb8d743952388 diff --git a/po/README.Translations b/po/README.Translations index be8cb785..3b7abd44 100644 --- a/po/README.Translations +++ b/po/README.Translations @@ -1,5 +1,5 @@ -In order to create or update a translatable file, run the following command -in the directory i18n/: +In order to create or update a translatable file, run the following +command in the directory po/: ./update.sh xx @@ -8,20 +8,39 @@ if needed, may be suffixed by a country code according to ISO 3166). Quassel will automatically load these translation files based on the system locale. Examples for valid codes: de, en_US -You can open translation files with poedit for example and add/edit translated strings. +You can open translation files with poedit for example and add/edit +translated strings. -The *.po files can and should be kept in sync with the source code by running -update.sh regularly (existing translations won't be removed). +The *.po files can and should be kept in sync with the source code by +running update.sh regularly (existing translations won't be removed). -NOTE: Remember to remove X-Virgin-Header line if you want to preserve your header. +NOTE: Remember to remove X-Virgin-Header line if you want to preserve +your header. -Qt itself does not use the *.po files, but a compact binary format (*.qm). -These files will automatically be generated at build time. By default, all -languages will be built. To select languages, add -DLINGUAS="" -to your cmake call, where is a space-separated list of language -codes as explained above. +Qt itself does not use the *.po files, but a compact binary format +(*.qm). These files will automatically be generated at build time. By +default, all languages will be built. To select languages, use +environment variable LINGUAS to specify superset of languages you want +to build in. As you can see in example there we will build only Czech +German and French translations. -NOTE: You'll need lconvert installed with your Qt in order to generate - translation files. Some distributions don't package that tool; - in that case you won't get translations. +EXAMPLE: +$ export LINGUAS="cs de fr" +$ cmake /path/to/source +NOTE: You'll need lupdate, lconvert, lrelease installed with your Qt in + order to generate translation files. Some distributions don't + package that tool; in that case you won't get translations. + + +Regenerating the .pot file can be done at least two ways. ``Translate +Toolkit'' seems to provide better results, so the first one is +preferred. + +With TT: +lupdate ../src -ts quassel.ts && ts2po -P --duplicates=msgctxt -i \ + quassel.ts -o quassel.pot && rm quassel.ts + +With only Qt tools: +lupdate ../src -ts quassel.ts && lconvert -i quassel.ts -o quassel.po \ + && msguniq -o quassel.pot quassel.po && rm quassel.ts quassel.po