Service/translate: Difference between revisions
| Line 130: | Line 130: | ||
=== Adding activities === | === Adding activities === | ||
Before registering new activity on http://translation.sugarlabs.org, make sure that: | |||
* | * New activity is being hosted on http://git.sugarlabs.org; | ||
* The {{Code|pootle}} user was added to the repository with commit access rights; | |||
* You have a proper {{Code|GIT_URL}} to clone repository from, e.g., {{Code|git://git.sugarlabs.org/cartoon-builder/mainline.git}}; that might be found on home page in gitorious, e.g., http://git.sugarlabs.org/cartoon-builder, in ''Clone & push urls'' field with selector ''GIT''; | |||
* You know the proper {{Code|CATEGORY}} name to register the project in, | |||
* There is an unique {{Code|NAME}} of activity, this name will be used as a name of project in Pootle and directory name; | |||
* You know the proper {{Code|BRANCH}} in Git repository to use for translation; by default, it is {{Code|master}}. | |||
To process the registration, login to pootle.sugarlabs.org and enter: | |||
sudo -u pootle python /var/lib/pootle/maintenance/helpers/admin/pootlepopulator.py ''<CATEGORY>'' ''<GIT_URL>'' /var/lib/pootle/checkouts/''<CATEGORY>''/''<NAME>'' [''<BRANCH>''] | |||
After that, for [http://git.sugarlabs.org/pootle-helpers pootle-helper] project in {{Code|potupdater/project_list.ini}}, add the following strings: | |||
[/var/lib/pootle/checkouts/''<CATEGORY>''/''<NAME>''/po/''<.pot-filename>''] | |||
project = ''<NAME>'' | |||
vcs = git | |||
method = bundlebuilder | |||
layout = gnu | |||
Commit new changes, and pull from on pootle VM: | |||
(cd /var/lib/pootle/maintenance/helpers; sudo -u pootle git pull origin master) | |||
Do ''update from templates'' on the ''templates'' project on Pootle's frontend. And wait until daily cron job will populate languages for newly registered project, or run it immediately: | |||
sudo -u pootle python /var/lib/pootle/maintenance/helpers/admin/add_langs.py | |||
Then your activity must be in place to be translated and ''commit to VCS/update from VCS'' links must be activated. | |||
=== Working with git in the pootle server === | === Working with git in the pootle server === | ||