diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-08 22:08:04 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-08 22:08:04 -0400 |
commit | bcc12b176fc19070aa16940ff4840830bc2ecd59 (patch) | |
tree | d106ea6a95d4fa20d8ccfce16d797df4ba425d9b /po/HACKING | |
parent | afc6093ea5b87d2d4c870cef7ef66548d3d576ba (diff) |
Makefile: add support for compiling and installing localizations
This means that the new `po/files.generate` target can be used to build the
`.pot` files without doing anything else; we can stop requiring translators
to install ruby-ronn. It also means that we can put the `.pot` files in
the source tarball, to make it even easier for translators.
Unfortunately, it does add the extra step of having to create another
symlink when adding a new locale.
Diffstat (limited to 'po/HACKING')
-rw-r--r-- | po/HACKING | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -2,23 +2,24 @@ Translations for programs are provided in files with the `.po` suffix. These are created by copying PO-template (`.pot`) files, and filling in the missing "msgstr" values. -To add a translation, you'll first (1) need to create the `.pot` -files, and then (2) copy them and (3) fill them in. +To add a translation, you'll first (1) need to create the `.pot` files +if you don't already have them, and then (2) copy them and (3) fill +them in. # 1. Create `.pot` files + If you are working from a release source tarball, you can skip this + step (the `.pot` files are included in the tarball); if you are + working from git, read on. + libretools' .pot files are not tracked in git; they are created by - running `make` (you'll need a checkout of both devtools-par and - libretools to run `make` if building from git). In addition to the - usual (`base-devel`) depenencies when running `make`, you'll need - the `ruby-ronn` package as well. + running `make`. You'll need a checkout of both "devtools-par" and + "libretools" to run `make` if building from git. - $ sudo pacman -S --needed base-devel ruby-ronn - ... $ git clone https://git.parabola.nu/packages/devtools-par.git/ $ git clone https://git.parabola.nu/packages/libretools.git/ $ cd libretools - $ make + $ make po/files.generate ... $ cd po/ $ ls @@ -33,10 +34,12 @@ files, and then (2) copy them and (3) fill them in. Create a folder under `po/` with the two-letter language code[^1] you want to add. Then, copy the `.pot` files to that folder, - changing the file extension to `.po`; for example: + changing the file extension to `.po`. Finally, link the `subdir.mk` + file to be the Makefile for that directory. For example: $ mkdir es $ for file in *.pot; do cp $file es/${file%t}; done + $ ln -s ../subdir.mk es/Makefile [^1]: See the langauge code table here: <http://www.lingoes.net/en/translator/langcode.htm> |