зеркало из https://github.com/mozilla/mozillians.git
Update docs for mozillians.org l10n.
This commit is contained in:
Родитель
e24fde761d
Коммит
1823755223
|
@ -10,29 +10,25 @@ The message files used for translation are not in the same repository as
|
|||
the code, so if you are going to work on internationalization of
|
||||
Mozillians, you'll need to do a little more installation work.
|
||||
|
||||
#. Install a subversion client
|
||||
#. Install `git` client
|
||||
|
||||
#. Check out the messages files under `locale` like this::
|
||||
#. Clone the messages files repository under `locale` like this::
|
||||
|
||||
svn co http://svn.mozilla.org/projects/l10n-misc/trunk/mozillians/locales locale
|
||||
git clone https://github.com/mozilla-l10n/mozillians-l10n.git locale
|
||||
|
||||
.. note::
|
||||
|
||||
The directory in subversion is named ``locales`` but it has to be checked
|
||||
out to a local directory named ``locale``.
|
||||
|
||||
.. note::
|
||||
|
||||
If you plan to commit string merges make sure that you use the https URL::
|
||||
|
||||
svn co https://svn.mozilla.org/projects/l10n-misc/trunk/mozillians/locales locale
|
||||
The directory in the git repository is named ``locales`` but it has to
|
||||
be checked out to a local directory named ``locale``.
|
||||
|
||||
Working on internationalization
|
||||
-------------------------------
|
||||
Having checked out the message files, you should be able to use the following
|
||||
instructions for Mozillians.org internationalization.
|
||||
|
||||
Having checked out the message files, you should be able to use the
|
||||
`instructions from Playdoh <http://playdoh.readthedocs.org/en/latest/userguide/l10n.html>`_
|
||||
for Mozillians.org as well.
|
||||
* For strings in python code we are using
|
||||
`django's l10n functionality <https://docs.djangoproject.com/en/1.8/topics/i18n/translation/#standard-translation>`_.
|
||||
* For strings in jinja2 templates we are using `Puente <https://puente.readthedocs.io/>`_.
|
||||
|
||||
|
||||
Managing Strings
|
||||
|
@ -45,47 +41,34 @@ Managing Strings
|
|||
to mozillians.org.
|
||||
|
||||
|
||||
.. _update-verbatim:
|
||||
.. _update-pontoon:
|
||||
|
||||
Update Verbatim
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Update Pontoon
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
When we commit new strings or we alter already existing strings in our
|
||||
codebase we need to perform a string merge to update
|
||||
Verbatim. `Verbatim
|
||||
<https://localize.mozilla.org/projects/mozillians>`_ is the
|
||||
codebase we need to perform a string merge to update Pontoon.
|
||||
`Pontoon <https://pontoon.mozilla.org/projects/mozillians/>`_ is the
|
||||
tool localizers use to translate mozillians.org strings.
|
||||
|
||||
Steps to follow to perform a string merge:
|
||||
|
||||
#. Inform `mathjazz <https://mozillians.org/en-US/u/mathjazz/>`_ on
|
||||
IRC in channel `#l10n` that you're about to do a string merge. If
|
||||
mathjazz is not available try to find `pascalc
|
||||
<https://mozillians.org/en-US/u/pascalc/>`_.
|
||||
|
||||
.. warning::
|
||||
|
||||
Before updating SVN with new strings we need to make sure that
|
||||
the changes made in Verbatim are committed to SVN. The #l10n
|
||||
team will take care of that. It's important that we ping them
|
||||
*before* we commit anything to SVN.
|
||||
|
||||
When you get the green light from #l10n move to step 2.
|
||||
|
||||
#. Update your local svn repository::
|
||||
#. Update your local git repository::
|
||||
|
||||
cd locale
|
||||
svn up
|
||||
git checkout master
|
||||
git pull origin master
|
||||
|
||||
#. String extract and merge::
|
||||
|
||||
./manage.py extract -c
|
||||
./manage.py merge -c
|
||||
./manage.py extract
|
||||
./manage.py merge
|
||||
|
||||
#. Check the diff to make sure things look normal::
|
||||
|
||||
cd locale
|
||||
svn diff
|
||||
git status
|
||||
git diff
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -95,12 +78,13 @@ Steps to follow to perform a string merge:
|
|||
|
||||
#. Lint translations. See :ref:`linting-translations`.
|
||||
|
||||
#. Commit to SVN::
|
||||
#. Commit to git repository::
|
||||
|
||||
svn ci -m "Mozillians string merge"
|
||||
git commit -a -m "Mozillians string merge"
|
||||
|
||||
#. Inform #l10n what you committed new changes and they will update
|
||||
Verbatim.
|
||||
#. Push changes to *master* branch::
|
||||
|
||||
git push origin master
|
||||
|
||||
#. Optionally update production. See :ref:`updating-production-translations`.
|
||||
|
||||
|
@ -172,9 +156,9 @@ Updating Production Translations
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Production server https://mozillians.org checks out translations from
|
||||
the *production* tag instead of trunk.
|
||||
the *production* branch instead of *master*.
|
||||
|
||||
#. Make sure that the translations in *trunk* have no errors. See :ref:`linting-translations`
|
||||
#. Make sure that the translations in *master* have no errors. See :ref:`linting-translations`
|
||||
|
||||
.. warning::
|
||||
|
||||
|
@ -183,22 +167,27 @@ the *production* tag instead of trunk.
|
|||
a 500 error will be returned to users. It is really important
|
||||
that translations copied to production are correct.
|
||||
|
||||
#. Checkout production repository if you don't have it already::
|
||||
#. Checkout production branch if you don't have it already::
|
||||
|
||||
svn co https://svn.mozilla.org/projects/l10n-misc/tags/production/mozillians/locales
|
||||
cd locale
|
||||
git fetch origin
|
||||
git checkout production
|
||||
|
||||
#. Merge current *trunk* into *production*::
|
||||
#. Merge current *master* into *production*::
|
||||
|
||||
svn merge https://svn.mozilla.org/projects/l10n-misc/trunk/mozillians/locales
|
||||
git merge master
|
||||
|
||||
#. Verify that everything looks good::
|
||||
|
||||
svn diff
|
||||
svn status
|
||||
svn info
|
||||
git status
|
||||
git diff
|
||||
|
||||
#. Commit merge to production tag::
|
||||
#. Commit merge to production branch::
|
||||
|
||||
svn ci -m "Update mozillians production strings."
|
||||
git commit -a -m "Update mozillians production strings."
|
||||
|
||||
#. Push new strings to production branch::
|
||||
|
||||
git push origin production
|
||||
|
||||
#. Production will get the new translations on next push.
|
||||
|
|
Загрузка…
Ссылка в новой задаче