Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
74 lines (55 sloc) 2.259 kb
README for pacaur's translators
===============================
Note: The target locale must be available on your system.
See https://wiki.archlinux.org/index.php/Locale
Add a new translation
---------------------
To add a new translation, generate a new <locale>.po file from the current code,
where <locale> is one of the locales given in /usr/share/i18n/locales:
$ cd ./pacaur
$ bash --dump-po-strings pacaur > pacaur.pot
$ msguniq pacaur.pot > po/<locale>.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/<locale>.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: <locale>\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 pacaur.pot file and merge
the existing changes:
$ cd ./pacaur
$ bash --dump-po-strings pacaur > pacaur.pot
$ msguniq pacaur.pot > pacaur.po
$ msgmerge --update po/<locale>.po pacaur.po
Open the po/<locale>.po file and check for new or 'fuzzy' strings.
Testing your translation
------------------------
To test your translation, compile the source <locale>.po file and install it on
your system:
cd ./pacaur
msgfmt -o /usr/share/locale/<locale>/LC_MESSAGES/pacaur.mo po/<locale>.po
To launch pacaur with a specific locale:
$ LANG=<locale> pacaur -S package
Sending your translation
------------------------
Translation can be sent through GitHub pull request on https://github.com/Spyhawk/pacaur.
Beware of pulling the source <locale>.po file, not the compiled <locale>.po file.
Resources
---------
http://www.gnu.org/software/gettext/manual/gettext.html
Jump to Line
Something went wrong with that request. Please try again.