1.1 --- a/docs/wiki/Developing Fri Nov 06 00:00:55 2015 +0100
1.2 +++ b/docs/wiki/Developing Fri Nov 06 00:16:35 2015 +0100
1.3 @@ -155,3 +155,49 @@
1.4 particularly as each user's data should remain isolated from that of
1.5 other users, and thus the volumes of data should remain relatively small
1.6 if managed well enough.
1.7 +
1.8 +== Localisation ==
1.9 +
1.10 +The traditional [[https://www.gnu.org/s/gettext|gettext]] mechanisms for
1.11 +translating labels, messages and other user-readable strings are employed
1.12 +in the imip-agent code. Some tools have been provided to maintain this
1.13 +localisation.
1.14 +
1.15 +To extract "messages" from the code, run the `tools/i18n_messages.sh`
1.16 +script:
1.17 +
1.18 +{{{
1.19 +tools/i18n_messages.sh
1.20 +}}}
1.21 +
1.22 +This produces a file called `imip-agent.pot` in the current directory,
1.23 +and it also attempts to merge any new messages into the existing message
1.24 +translations found in the `messages` directory. Such translation files
1.25 +have the following form:
1.26 +
1.27 +{{{
1.28 +messages/xx_XX.imip-agent.po
1.29 +}}}
1.30 +
1.31 +Here, `xx` is usually an [[WikiPedia:ISO_639-1|ISO 639-1]] language code,
1.32 +whereas `XX` is usually an [[WikiPedia:ISO_3166-1|ISO 3166-1]] country code.
1.33 +
1.34 +Translators should inspect and edit their files in the `messages`
1.35 +directory and then use the `tools/i18n_format.sh` script to generate the
1.36 +translations that the software will use:
1.37 +
1.38 +{{{
1.39 +tools/i18n_format.sh
1.40 +}}}
1.41 +
1.42 +This installs the "compiled" translations into the `locale` directory in
1.43 +a location of the following form:
1.44 +
1.45 +{{{
1.46 +locale/xx_XX/LC_MESSAGES/imip-agent.mo
1.47 +}}}
1.48 +
1.49 +The `tools/install.sh` script will copy the `locale` directory into the
1.50 +installation location unless the `--no-locale-dir` option is given. This is
1.51 +provided to allow any centrally-installed translations to take precedence
1.52 +over any locally-available translations.