Difference between revisions of "Service/translate"
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Obsolete | Replaced by [[ Service/Weblate]]}} | ||
+ | |||
== Hostnames == | == Hostnames == | ||
* http://translate.sugarlabs.org/ | * http://translate.sugarlabs.org/ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Hosted on == | == Hosted on == | ||
− | [[Machine | + | [[Machine/pootle]] |
== Administrative contact == | == Administrative contact == | ||
Line 20: | Line 17: | ||
For non-emergency calls, preferably send email to the administrative contact. | For non-emergency calls, preferably send email to the administrative contact. | ||
− | * [[User: | + | * [[User:Sebastian|Sebastian Silva]] has assumed maintainership tasks |
− | * [[User: | + | * [[User:Cjl|Chris Leonard]] has Pootle administrator privs, and heads the localization efforts. |
* [[User:Bernie|Bernie Innocenti]] has system admin and Pootle administrator privs, but takes care only of OS-level administration. | * [[User:Bernie|Bernie Innocenti]] has system admin and Pootle administrator privs, but takes care only of OS-level administration. | ||
* [[User:SayaminduDasgupta|Sayamindu Dasgupta]] is the former admin. He still has an emeritus sysadmin account and he can be very helpful if contacted by email. | * [[User:SayaminduDasgupta|Sayamindu Dasgupta]] is the former admin. He still has an emeritus sysadmin account and he can be very helpful if contacted by email. | ||
Line 50: | Line 47: | ||
{{Code|/etc/apache2/sites-enabled/000-default}}<br> | {{Code|/etc/apache2/sites-enabled/000-default}}<br> | ||
{{Code|/etc/cron.d/pootle}}<br> | {{Code|/etc/cron.d/pootle}}<br> | ||
+ | {{Code|/var/www/pootle/sugarlabs/pootle.conf}}<br> | ||
|- | |- | ||
!scope="row" | Ports | !scope="row" | Ports | ||
Line 66: | Line 64: | ||
== Mantainance Notes == | == Mantainance Notes == | ||
− | Pootle in Sugar is maintained. ( | + | Pootle in Sugar is maintained. (icarito has step-up to be maint) |
− | |||
− | |||
− | + | == Migrated to Pootle 2.5.0 == | |
− | + | Notes on the process were recorded here: [[Service/translate/Pootle2.5]] | |
== Files == | == Files == | ||
Line 116: | Line 112: | ||
sudo -u pootle -i python maintenance/helpers/admin/pootlepopulator.py ''pootle-project'' ''git-clone-url'' ''pootle-filename-wo-po-suffix'' ''git-branch'' | sudo -u pootle -i python maintenance/helpers/admin/pootlepopulator.py ''pootle-project'' ''git-clone-url'' ''pootle-filename-wo-po-suffix'' ''git-branch'' | ||
+ | |||
+ | Example: | ||
+ | |||
+ | To checkout the sugar in the branch sucrose-0.94 (in pootle is in the project glucose94) we sshould do: | ||
+ | |||
+ | cd /var/lib/pootle/ | ||
+ | sudo -u pootle -i python maintenance/helpers/admin/pootlepopulator.py glucose94 gitorious@git.sugarlabs.org:sugar/mainline.git sugar sucrose-0.94 | ||
* Add new sections to the [[#Files|project_list.ini]] file to describe new {{Code|.pot}} locations; | * Add new sections to the [[#Files|project_list.ini]] file to describe new {{Code|.pot}} locations; | ||
Line 123: | Line 126: | ||
=== Adding activities === | === Adding activities === | ||
− | |||
− | |||
− | + | Before registering new activity on http://translate.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 with commit permissions, e.g., {{Code|gitorious@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 ''SSH''; | ||
+ | * 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 translate.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 === | ||
Line 184: | Line 193: | ||
Already up-to-date. or | Already up-to-date. or | ||
####### Checking POT for Write (master) ###### | ####### Checking POT for Write (master) ###### | ||
+ | |||
+ | === Etoys .pot update === | ||
+ | |||
+ | Go to Etoys translation directory (that is svn checkout from upstream project): | ||
+ | |||
+ | su - pootle | ||
+ | cd ~/translations/etoys_new | ||
+ | |||
+ | Since there is no need in changing .pot files on Pootle level, revert local changes if they present: | ||
+ | |||
+ | svn revert templates/*.pot | ||
+ | |||
+ | Fetch new update from the upstream: | ||
+ | |||
+ | svn up templates | ||
=== Tips === | === Tips === |
Latest revision as of 12:30, 4 April 2024
HostnamesHosted onAdministrative contact
SysadminsFor non-emergency calls, preferably send email to the administrative contact.
Language AdministratorsLanguage administrators are typically native speakers of a given language that take on responsibility (granted by a Pootle administrator after a request to the Localization list) for reviewing and committing PO files for a given language. Contacting language administrators is generally done by posting to the Localization list. More information on language administrator duties can be found on this page Notes
Upgrade notes
Mantainance NotesPootle in Sugar is maintained. (icarito has step-up to be maint) Migrated to Pootle 2.5.0Notes on the process were recorded here: Service/translate/Pootle2.5 FilesImportant files and directories in the root directory,
checkouts/pootle-project/pootle-po-filename-without-po-suffix/sources
translations/pootle-project/lang/symlinks-to-po-files
Tools
TipsCreate new Pootle project
sudo -u pootle -i python maintenance/helpers/admin/pootlepopulator.py pootle-project git-clone-url pootle-filename-wo-po-suffix git-branch Example: To checkout the sugar in the branch sucrose-0.94 (in pootle is in the project glucose94) we sshould do: cd /var/lib/pootle/ sudo -u pootle -i python maintenance/helpers/admin/pootlepopulator.py glucose94 gitorious@git.sugarlabs.org:sugar/mainline.git sugar sucrose-0.94
Adding activitiesBefore registering new activity on http://translate.sugarlabs.org, make sure that:
To process the registration, login to translate.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 pootle-helper project in [/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 serverThe git operations must be done by the pootle user: sudo -u pootle git log sudo -u pootle git push origin sucrose-0.82 This script tell you when you can update different clones of activities, when new strings are added via gettext in each repo. /var/lib/pootle/maintenance/helpers/potupdater/check_unmerged_translations.sh Other important script is pogenerator.py this script re-generates pot in each repo. Resolving conflictsIf the maintainer did a commit with a file in the po directory we will have a conflict, and Pootle can not do a pull. Pootle build the pot file from the sources, if we compare and the translations are updated in pootle we can do a pull preserving the info in pootle: sudo -u pootle git pull -s ours Checking that pootle is working
pootle pushed 3fd0cf7b to taportfolio/mainline:master on March 04, 2011 01:32 Commit from Sugar Labs: Translation System by user cjl.: 2 of 25 messages translated (0 fuzzy).
Already up-to-date. or ####### Checking POT for Write (master) ###### Etoys .pot updateGo to Etoys translation directory (that is svn checkout from upstream project): su - pootle cd ~/translations/etoys_new Since there is no need in changing .pot files on Pootle level, revert local changes if they present: svn revert templates/*.pot Fetch new update from the upstream: svn up templates Tips
django-admin shell --settings=pootle.settings >>> from django.contrib.auth.models import User >>> u = User.objects.get(username='bernie') >>> u.is_superuser = True >>> u.save()
sudo -u pootle django-admin refresh_stats --settings=pootle.settings
References
|