L10n:Verbatim

From MozillaWiki
Jump to: navigation, search

This document is an internal resource for L10n drivers, helping them manage localization on Verbatim. Verbatim Administration Dashboard allows you to perform most of the tasks. But some operations (e.g. adding new locales to projects) require access to the Verbatim box. Check out the official Pootle docs for working with Version Control Systems. You can only ssh to sm-verbatim01 while connected to MozillaVPN.

Prerequisite

If this is the first time you're using sm-verbatim01, you should link directories you will work in most often to your home directory:

   ln -s /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle/repos repos
   ln -s /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle/po po

Adding a SVN project to Verbatim

  • Use _ instead of - for all folder/locale names.
  • Make sure there is templates folder in the repo.
   sudo su verbatim
   cd repos
   svn co svn+ssh://PROJECT_REPO_URL/locale/
   mv locale PROJECT
   cp PROJECT -R ../po
   Add project in the Verbatim Administration Dashboard.

Adding a GitHub project to Verbatim

  • Use _ instead of - for all folder/locale names.
  • Make sure there is templates folder in the repo.
  • Add moz-verbatim to the list of collaborators to the repo.
   sudo su verbatim
   cd /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle/l10n_github_repos
   git clone git@github.com:USER/PROJECT.git
   cp PROJECT/locale -R ../po/PROJECT
   cd ../repos
   ln -s /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle/l10n_github_repos/PROJECT/locale PROJECT
   Add project in the Verbatim Administration Dashboard.

Adding a locale to a Verbatim project

   Add it through Administrate tab in Verbatim (check "Update against templates" box).
   If Using SVN repo, also:
       SVN commit the new locale folder in the repos/ folder.
       Click Update all from VCS on the locale page in Verbatim.

Updating all locales when merging new strings

   sudo su verbatim
   cd /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle
   POOTLE_SETTINGS=localsettings.py python2.6 manage.py commit_to_vcs --user=USER --project=PROJECTNAME
   [merge new strings]
   POOTLE_SETTINGS=localsettings.py python2.6 manage.py update_from_vcs --project=PROJECTNAME -v 2

Replace PROJECTNAME with project name in the URL and USER with email address of the user that will commit. Other commands like update_against_templates are also supported.

Dump project/locale data to import into Pontoon

   sudo su verbatim
   cd /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle
   POOTLE_SETTINGS=localsettings.py python2.6 manage.py dump_verbatim --locale=LOCALE --project=PROJECT
   POOTLE_SETTINGS=localsettings.py python2.6 manage.py dump_verbatim --locale=LOCALE
   POOTLE_SETTINGS=localsettings.py python2.6 manage.py dump_verbatim --project=PROJECT

The dump_verbatim.py is located in /data/www/localize.mozilla.org/verbatim/pootle_env/Pootle/vendor/src/pootle/pootle/apps/pootle_app/management/commands.

Restarting a server

   sudo su -
   apachectl restart