]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
make INSTALL.txt file valid rST
authorChristian Weiske <cweiske@cweiske.de>
Thu, 26 May 2011 19:21:37 +0000 (21:21 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 26 May 2011 19:21:37 +0000 (21:21 +0200)
doc/developers/translation.rst

index 776b5d74ac466fb2cd74a0a946c7f9463c4280e8..f014be2f1cfb548da655eda8338040358d48c19a 100644 (file)
@@ -1,40 +1,47 @@
+===========================
 Translating SemanticScuttle
 ===========================
 
 SemanticScuttle uses gnu gettext for translation. It does not
 rely on the php extension but ships with a pure php implementation,
-php-gettext[1].
+php-gettext_.
 
 Using gettext from within the code is really easy:
-Enclose the string you want to translate in a "T_" function call.
+Enclose the string you want to translate in a "``T_``" function call.
+
+For example, to translate::
+
+  echo "Vote for";
 
-For example, to translate
-> echo "Vote for";
 just write
-> echo T_("Vote for");
 
+  echo T_("Vote for");
+
+.. _php-gettext: https://launchpad.net/php-gettext/
 
 Translation basics
-------------------
+==================
 
 We keep one base translation file, data/locales/messages.po.
 This file is auto-generated via xgettext from all our php source files.
 In case you added a new string to the code that needs translation,
-update the base translation file by running
-> php scripts/update-translation-base.php
+update the base translation file by running ::
+
+  $ php scripts/update-translation-base.php
 
-After that has been done, the changes to the base messages.po file
+After that has been done, the changes to the base ``messages.po`` file
 need to be merged into the single language translation files,
-for example data/locales/de_DE/LC_MESSAGES/messages.po.
+for example ``data/locales/de_DE/LC_MESSAGES/messages.po``.
 
-Updating them from the master file is as easy as running
-> php scripts/update-translation.php de_DE
+Updating them from the master file is as easy as running::
 
-When the translation is ready, the .po file needs to be compiled
-in a machine-readable .mo file. Use
-> php scripts/compile-translation.php de_DE
-to achieve that.
+  $ php scripts/update-translation.php de_DE
+
+When the translation is ready, the ``.po`` file needs to be compiled
+in a machine-readable ``.mo`` file. Use ::
 
+  $ php scripts/compile-translation.php de_DE
+
+to achieve that.
 
 
-[1] https://launchpad.net/php-gettext/
\ No newline at end of file