README for pacpur's translators =============================== Note: The target locale must be available on your system. See https://wiki.parabola.nu/Locale Add a new translation --------------------- To add a new translation, generate a new .po file from the current code, where is one of the locales given in /usr/share/i18n/locales: $ cd ./pacpur $ bash --dump-po-strings pacpur > pacpur.pot $ msguniq pacpur.pot > po/.po If applicable, use the 'short' locale (de, es, fr, ...) to make it available to all sublocales. Use the regular locale (en_GB, en_AU, ..., zh_CN, zh_TW) when this is not applicable. Open the po/.po file and add or fill in the header entry. This can be done manually with your favorite text editor or automatically with a PO editor. msgid "" msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Language: \n" "X-Source-Language: C\n" Then add your translation in the following 'msgstr' fields. Do not replace the original text in the 'msgid' fields. #: hello:5 msgid "Hello, world!" msgstr "世界你好!" Notes: - Do not use non breaking space characters to avoid problematic display issues. Update a translation -------------------- To update an existing translation, generate the updated pacpur.pot file and merge the existing changes: $ cd ./pacpur $ bash --dump-po-strings pacpur > pacpur.pot $ msguniq pacpur.pot > pacpur.po $ msgmerge --update po/.po pacpur.po Open the po/.po file and check for new or 'fuzzy' strings. Testing your translation ------------------------ To test your translation, compile the source .po file and install it on your system: cd ./pacpur msgfmt -o /usr/share/locale//LC_MESSAGES/pacpur.mo po/.po To launch pacpur with a specific locale: $ LANG= pacpur -S package Sending your translation ------------------------ Translation can be sent through GitHub pull request on https://github.com/rmarquis/pacpur. Beware of pulling the source .po file, not the compiled .po file. Resources --------- http://www.gnu.org/software/gettext/manual/gettext.html