Permalink
Browse files

Add more l10n docs

more verbose and explicit links to playdoh docs
  • Loading branch information...
1 parent 1d6b4ad commit b111cf04f6b7d946f1cadd5d9b2da000847ac934 @groovecoder groovecoder committed Aug 17, 2012
Showing with 60 additions and 1 deletion.
  1. +60 −1 l10n.rst
View
@@ -6,7 +6,7 @@ Localization (l10n)
Most web apps at Mozilla are localized. We make use of ``gettext``.
-See :ref:`playdoh:l10n` in Playdoh
+See also :ref:`playdoh:l10n` in Playdoh docs
.. _l10n-svn:
@@ -46,9 +46,68 @@ need to commit them back to SVN::
svn add *
svn commit -m 'Locale update'
+See :ref:`playdoh:l10n` in Playdoh docs for more info on the ``merge`` and
+``extract`` commands
+
.. _Verbatim: http://localize.mozilla.org/
+.. _l10n-new-locale:
+
+Adding new locales (non-django)
+-------------------------------
+
+.. note::
+
+ See :ref:`playdoh:l10n` in Playdoh for django instructions
+
+To add a new locale to an existing project, go to the Verbatim project admin page, e.g., https://localize.mozilla.org/projects/mdn/admin.html
+
+Use the dropdown at the bottom of the list of locales to add the new locale to verbatim
+
+ssh to the verbatim box and add the new locale to svn::
+
+ ssh sm-verbatim01
+ cd /var/lib/pootle/po/<project>
+ svn add <locale>
+ svn ci <locale> -m "Adding <locale>"
+
+.. warning::
+
+ Only commit the new locale directory and do not update the svn working
+ copy.
+
+.. _l10n-new-text-domain:
+
+Adding a new text domain (non-django)
+-------------------------------------
+
+.. note::
+
+ These instructions are only for localizing text outside of django/playdoh projects. See :ref:`playdoh:l10n` in Playdoh for django instructions
+
+Sometimes in a single project you need to use more than one translatable module.
+A text domain is a handle for each module with different .po files. For example,
+MDN uses separate text domains for the MDN website and the `Promote MDN WordPress plugin`_.
+
+You can still use Verbatim to translate these other text domains alongside the
+primary domain.
+
+Generate your .pot file, and then generate a .po file for each locale e.g.,::
+
+ msginit --no-translator -l <locale> -i templates/LC_MESSAGES/promote-mdn.pot \
+ -o <locale>/LC_MESSAGES/promote-mdn.po
+
+Add the .pot file and the .po files to svn e.g.,::
+
+ svn add */LC_MESSAGES/promote-mdn.*
+ svn commit */LC_MESSAGES/promote-mdn.*
+
+Now go to each locale's project directory and click the "Update all from version
+control" button.
+
+.. _`Promote MDN WordPress plugin`: http://wordpress.org/extend/plugins/promote-mdn/
+
Make this better
----------------

0 comments on commit b111cf0

Please sign in to comment.