From 7f029a23034280bf93d81aaa495083ef31228729 Mon Sep 17 00:00:00 2001 From: gustavf Date: Mon, 6 Mar 2000 14:52:58 +0000 Subject: [PATCH] A little guide on how to make translations. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@272 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- doc/translating.txt | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/translating.txt diff --git a/doc/translating.txt b/doc/translating.txt new file mode 100644 index 00000000..ef281023 --- /dev/null +++ b/doc/translating.txt @@ -0,0 +1,67 @@ +How to translate SquirrelMail into another language? +==================================================== + +This document does not deal with CVS and how to upload translations to +the repository. + +1. First time translation +------------------------- + +a) You must have gettext installed. If it is not installed you can + download the soources from + . + +b) Find the language code for the language you are going to translate + into. A list of language codes can be found at + . + + Create a directory squirrelmail/locale/language_code/LC_MESSAGES/. + Copy squirrelmail/po/squirrelmail.po into this directory. This is the + file that is going to be translated. + +c) To translate the actual strings fill inn the msgstr after each + msgid with the appropiate translation. There are a few tools which + kan make this job a bit easier at + . + + Convert the translated squirrelmail.po into a binary file by + running the command "msgfmt -o squirrelmail.mo squirrelmail.po" in + the directory where the translated squirrelmail.po is residing. + +d) Add the language name and language code to the array at the top of + squirrelmail/functions/i18n.php. + + +2. Maintaining translations +--------------------------- + +the text strings in the program will change over time. This means that +strings that are already translated is no longer used and new strings +are added. Therefore it is neccessary to maintain the translations. + +a) There should always be an updated template containing all strings + in SquirrelMail in squirrelmail/squirrelmail.po. To merge all new + strings in this file into an existing translation run the command + +msgmerge squirrelmail/locale/language/LC_MESSAGES/squirrelmail.po \ +squirrelmail/po/squirrelmail.po > \ +squirrelmail/locale/language/LC_MESSAGES/squirrelmail.po + + This should keep all strings that are unchanged and comment out all + strings that are no longer in use. You might want to make a copy + before doing this. + +b) Rung msgfmt again to create a new binary file. + + +3. Updating the template +------------------------ + +This script comes from Serek: + +#!/bin/bash +xgettext --keyword=_ -keyword=N_ --default-domain=squirrelmail/po/squirrelmail\ +-C squirrelmail/src/*.php +xgettext --keyword=_ -keyword=N_ --default-domain=squirrelmail/po/squirrelmail\ +-C -j squirrelmail/functions/*.php + -- 2.25.1