Jump to: navigation, search


3,022 bytes added, 21:47, 17 September 2018
no edit summary
== Hosted on ==
== Administrative contact ==
* translate AT sugarlabs DOT org
== Sysadmins ==
For non-emergency calls, preferably send email to the administrative contact.
* [[User:SayaminduDasguptaSebastian|Sayamindu DasguptaSebastian Silva]] has system admin and Pootle admin privs.assumed maintainership tasks* [[User:Cjl|Chris Leonard]] has Pootle administrator privs, and heads the localization efforts.* [[User:Bernie|Bernardo Bernie Innocenti]] has system admin and Pootle administrator privs, but takes care only of OS-level administration.* [[User:தங்கமணி_அருண்SayaminduDasgupta|தங்கமணி_அருண்(Thangamani Arun)Sayamindu Dasgupta]] has system is the former admin and Pootle administrator privs.* [[User:RafaelOrtiz | Rafael Ortiz]] He still has system admin an emeritus sysadmin account and Pootle admin privshe can be very helpful if contacted by email.
== Language Administrators ==
More information on language administrator duties can be found on [[Translation_Team/Administration_QuickStart|this page]]
== Notes ==
How to manipulate users:{| class="wikitable"|-!scope="row" | Home|{{Code|/var/lib/pootle}}|-!scope="row" | Daemon|{{Code|/etc/init.d/apache2}}<br>{{Code|/etc/init.d/pootle}}|-!scope="row" | Logs|{{Code|/var/log/apache2}}|-!scope="row" | Config|{{Code|/etc/apache2/sites-enabled/000-default}}<br>{{Code|/etc/cron.d/pootle}}<br>|-!scope="row" | Ports|{{Code|80}} HTTP server|-|}
django-admin shell --settings=pootle.settings >>> from django.contrib.auth.models import User >>> u = User.objects.get(usernameUpgrade notes ='bernie') >>> u.is_superuser = True >>>
*A backup of the DB and pootle must be done also.
*Backup of the /var/lib/pootle structure
*New versions of Django and Translate toolkit must be installed first
*Restore localsettings and DB backup
Various scripts documented here:== Mantainance Notes ==
http://gitPootle in Sugar is has step-helpersup to be maint)
Scheduled jobs :== Migrated to Pootle 2.5.0 ==
pootle@pootleNotes on the process were recorded here:~$ cat /etc/cron.d/pootle MAILTO="" MAILTO="" # m h dom mon dow user command 30 00 * * * pootle /usr/bin/python /var/lib/pootle/maintenance/helpers/potupdater/ [[Service/var/lib/pootle/maintenance/helpers/potupdater/project_list.ini #00 00 * * * pootle git --git-dir=/var/lib/pootle/checkouts/etoys/.git pull 45 00 * * * pootle python /var/lib/pootle/langpackgen/src/LangPackGen/ /var/lib/pootle/langpackgen/data/langpackgen_84.ini /var/lib/pootle/public_html/packs/0.84 40 00 * * * pootle python /var/lib/pootle/langpackgen/src/LangPackGen/ /var/lib/pootle/langpackgen/data/langpackgen_82.ini /var/lib/pootle/public_html/packs/0.82 50 00 * * * pootle /var/lib/pootle/maintenance/helpers/potupdater/check_unmerged_translations.s h 55 00 * * * pootle /var/lib/pootle/maintenance/helpers/potupdatertranslate/check_bad_ownershipPootle2.sh5]]
== Files ==
''Refresh stats'', needed when the database Important files and directories in the checked out modules get out of sync:root directory, {{Code|/var/lib/pootle}}.
/usr/lib/python-django/bin/django-admin{{Code|'''checkouts'''}}<br>Sources are checked out in this directory and being used to keep final {{Code|.py refresh_stats --settings=pootlepot}} and {{Code|.settingspo}} files. The hierarchy is:
Important directories in checkouts/var''pootle-project''/lib''pootle-po-filename-without-po-suffix''/pootle:''sources''
{{Code|'''checkoutstranslations''': modules are checked out in }}<br>Pootle uses this directory. pulls from git and svn so we have updated as a sources, then it generates a new .pot file from them. Translated strings get reflected in the .po of files in each module, and when the language maintainer clicks the Commit to VCS linktranslate, get pushed back it contains symlinks to files from the upstream module{{Code|checkouts}} directory.The hierarchy is:
translations/''pootle-project'dbs'/'': internal db used by Pootle, no need lang''/''symlinks-to mess directly with it.-po-files''
{{Code|'''maintenance''': contains }}<br>Contains some sugar-specific scripts to help maintain our Pootle instance, they are managed in
{{Code|'''pomaintenance/helpers/potupdater/project_list.ini''': }}<br>This is an Ini file that contains xapian indexes configuration for all used sources repositories. Each section describes one sources repository, where section name is full path, in form of {{Code|/var/lib/pootle/checkouts/''pootle-project''/''pootle-filename''/''some-path-within-sources''/''pot-file''}}, to the search feature{{Code|.pot}} file, and contains following options:
'''translations'''* {{Code|project}} required, meaning-less project name;* {{Code|vcs}} required, the type of VCS for; supported values are: more Pootle internal data{{Code|git}};* {{Code|method}} required, the method how to generate {{Code|.pot}} files from sources; supported values are: {{Code|bundlebuilder}} for activities, {{Code|intltool}} for intltool based projects;* {{Code|layout}} required, ?;* {{Code|ignore-files}} optional, the semicolon separated list of file paths that are relative to the sources root; if {{Code|method}} is {{Code|bundlebuilder}} this value will be used to ignore while producing {{Code|.pot files}};
== Upgrade notes Tools ==
* {{Code|potupdater/}} pulls from git and svn so we have updated sources, then it generates a new .pot file from them. Translated strings get reflected in the .po files in each module, and when the language maintainer clicks the Commit to VCS link, get pushed back to the upstream module.
* {{Code|admin/}} checkout sources.
* {{Code|misc/pootle.cron}} all daily basis routines.
* ''...''
== Mantainance Notes Tips ==
=== Create new Pootle in Sugar is ''actually'' unmaintained.project ===
We (godiard / martin_xsa / erikos / dirakx) are trying to resolve the pending issues because we need working translations but need a real maintainer.* Create new project in Pootle admin menu, ''admin->projects'';* Add all needed langs;* Checkout all sources using command:
The last maintainer was Sayamindu Dasgupta and we asked he our doubts, sudo -u pootle -i am putting here this informationpython maintenance/helpers/admin/ ''pootle-project'' ''git-clone-url'' ''pootle-filename-wo-po-suffix'' ''git-branch''
== Basic infoExample: ==
The To checkout the sugar in the branch sucrose-0.94 (in pootle directory isin the project glucose94) we sshould do: /var/lib/pootle
The translations live in cd /var/lib/pootle/ sudo -u pootle -i python maintenance/helpers/admin/ glucose94 sugar/mainline.git sugar sucrose-0.94
* Add new sections to the [[#Files|project_list.ini]] file to describe new {{Code|.pot}} locations;* Run {{Code|misc/var/libpootle.cron}} script from {{Code|pootle}} user to generate all sufficient files;* Click ''rescan the project files'' in ''Templates->Project->Files'' to reveal newly created {{Code|.pot}} files;* Click ''Update from templates'' for all languages in newly created project to peek up {{Code|.po}} files symlinked by {{Code|misc/pootle/translations.cron}} script.
=== Adding activities ===
TestingBefore registering new activity on, make sure that:
2!root@pootle:/var/lib/pootle/maintenance/helpers/admin# sudo -u pootle python ./ honey git* New activity is being hosted on fototoon; *The {{Code|pootle}} user was added to the repository with commit access rights;******* Cloning git://You have a proper {{Code|GIT_URL}} to clone repository from with commit permissions, e.g., {{Code| to /var/lib/pootle/checkouts/honey/fototoon ********* Running git clone git}}; that might be found on home page in Gitorious, e.g., /var/lib/pootle/checkouts/honey/fototoon Initialized empty Git repository cartoon-builder, in /var/lib/pootle/checkouts/honey/fototoon/.git/''Clone & push urls'' field with selector ''SSH''; ******** Switching You know the proper {{Code|CATEGORY}} name to branch master ********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; Running git checkout --track -b master origin/master Running git pull Already up-to-date. ********* You know the proper {{Code|BRANCH}} in Git operation completed, moving repository to next stage ******** ********* Searching use for POT file ********* ********* Found POT file FotoToon.pot ********* ********* Starting to symlink files ********* Linking /var/lib/pootle/checkouts/honey/fototoon/po/es.po to /var/lib/pootle/translations/honey/es/fototoon.po Linking /var/lib/pootle/checkouts/honey/fototoon/po/fr.po to /var/lib/pootle/translations/honey/fr/fototoon.po Linking /var/lib/pootle/checkouts/honey/fototoon/po/FotoToontranslation; by default, it is {{Code|master}}.pot to /var/lib/pootle/translations/honey/templates/fototoon.pot ********* Done Symlinking *********
== Creating branchesTo process the registration, login to and enter: ==
* Each branch (eg: glucose sudo -0.90) is a directory in the translations directoryEach project is a subdirectory inside this directory (eg: glucose-0u pootle python /var/lib/pootle/maintenance/helpers/admin/pootlepopulator.90/sugar)These are actually symlinks to directories py ''<CATEGORY>'' ''<GIT_URL>'' /var/lib/pootle/checkouts/''<CATEGORY>''/''<NAME>'' [''<BRANCH>'']
* There's a script called pootlepopulator.pyAfter that, for [1] It is invoked category GIT_URL checkout_directory [branch]So, assuming the directory http:/var/ pootle-helper] project in {{Code|potupdater/translations/sucrose-0project_list.90 existsini}},you can issue a commandadd the following strings: sucrose-0.90 git:[/var/lib/pootle/checkouts/''<CATEGORY>''/''<NAME>''/gitpo/sugar sugar sucrose''<.pot-0.90filename>''] project = ''<NAME>'' vcs = git method = bundlebuilder layout = gnu
The script can be found in maintainance/helpers directory in /var/lib/Commit new changes, and pull from on pootleVM:
* Once this is done, you need to create project in Pootle admin - goto '''admin->projects''' and createa project called Sucrose 0.90 with thecode sucrose (cd /var/lib/pootle/maintenance/helpers; sudo -0.90 (same as the directory nameu pootle git pull origin master)
* Do ''update from templates'Restart'on the '' templates'' project on Pootle and Apache if the new 's frontend. And wait until daily cron job will populate languages for newly registered project does not show up after this..., or run it immediately:
* '''Add''' the new projects to sudo -u pootle python /var/lib/pootle/maintenance/helpers/potupdateradmin/project_listadd_langs.inipy
-sdg-Then your activity must be in place to be translated and ''commit to VCS/update from VCS'' links must be activated.
[1] === Working in with git in the pootle server ===
The git operations must be done by the pootle user:
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/ Other important script is this script re-generates pot in each repo. === Resolving conflicts ===
If the maintainer did a commit with a file in the po directory we will have a conflict, and Pootle can not do a pull.
sudo -u pootle git pull -s ours
=== Checking that pootle is working ===
* When commiting from pootle interface, repos in git reflect the commit as something similar to:
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).
== Pootle scripts* (in cronjob), it's also giving mails with info like: == Already up-to-date. or ####### Checking POT for Write (master) ######
http://git=== Etoys update ===
== Restarting Pootle ==Go to Etoys translation directory (that is svn checkout from upstream project):
su - pootle cd ~/etctranslations/initetoys_new Since there is no need in changing .dpot files on Pootle level, revert local changes if they present:  svn revert templates/apache2 restart*.pot Fetch new update from the upstream:  service svn up templates === Tips === * How to manipulate users:  django-admin shell --settings=pootle start.settings >>> from django.contrib.auth.models import User >>> u = User.objects.get(username='bernie') >>> u.is_superuser = True >>> * Refresh stats, needed when the database and the checked out modules get out of sync:  sudo -u pootle django-admin refresh_stats --settings=pootle.settings * If you have a commit error file because of only read git url, please rm the old '''/var/lib/pootle/checkouts/''' files related with that activity or project and re run pootlepopulator. * Also if there are errors related with git add, is likely that some lang.po files are not versionated on pootle server, please run '''git add .''' inside the activity or project. * When there are '''commit to cvs/update to cvs''' links missing in activities or projects please check git url in .git/config , this URL must be writable by pootle.
== References ==
* /usr/lib/python2.6/dist-packages/translate/storage/versioncontrol/ (Translate)

Navigation menu