Changes

Jump to navigation Jump to search
637 bytes removed ,  17:15, 23 September 2011
Polish the text
Line 33: Line 33:  
More information on language administrator duties can be found on [[Translation_Team/Administration_QuickStart|this page]]
 
More information on language administrator duties can be found on [[Translation_Team/Administration_QuickStart|this page]]
    +
== Notes ==
 +
 +
{| 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
 +
|-
 +
|}
    
== Upgrade notes ==
 
== Upgrade notes ==
 +
 
*A backup of the DB and pootle localsettings.py must be done also.
 
*A backup of the DB and pootle localsettings.py must be done also.
 
*Backup of the /var/lib/pootle structure
 
*Backup of the /var/lib/pootle structure
Line 44: Line 70:  
Pootle in Sugar is maintained. (dirakx has step-up to be maint)
 
Pootle in Sugar is maintained. (dirakx has step-up to be maint)
   −
We (godiard / martin_xsa / erikos / dirakx / Bernie / Dogi) are trying to resolve the pending issues because we need working translations.
+
We (godiard / martin_xsa / erikos / dirakx / Bernie / Dogi) <!-- http://ru.wiktionary.org/wiki/%D1%83_%D1%81%D0%B5%D0%BC%D0%B8_%D0%BD%D1%8F%D0%BD%D0%B5%D0%BA_%D0%B4%D0%B8%D1%82%D1%8F_%D0%B1%D0%B5%D0%B7_%D0%B3%D0%BB%D0%B0%D0%B7%D0%B0 :)--> are trying to resolve the pending issues because we need working translations.
    
To date translations are working, we are working in a new VM pootle-devel to test upgrades of the Pootle/Django/Translate-toolkit stack.   
 
To date translations are working, we are working in a new VM pootle-devel to test upgrades of the Pootle/Django/Translate-toolkit stack.   
Line 50: Line 76:  
The last maintainer was Sayamindu Dasgupta and we asked he our doubts, i am putting here this information.
 
The last maintainer was Sayamindu Dasgupta and we asked he our doubts, i am putting here this information.
   −
== Basic info: ==
+
=== Basic info: ===
    
The pootle directory is:  
 
The pootle directory is:  
Line 59: Line 85:  
  /var/lib/pootle/translations
 
  /var/lib/pootle/translations
   −
== Creating branches: ==
+
=== Creating branches: ===
    
* Each branch (eg: glucose-0.92) is a directory in the translations directory
 
* Each branch (eg: glucose-0.92) is a directory in the translations directory
Line 109: Line 135:  
[1] http://git.sugarlabs.org/pootle-helpers/mainline/blobs/master/admin/pootlepopulator.py
 
[1] http://git.sugarlabs.org/pootle-helpers/mainline/blobs/master/admin/pootlepopulator.py
   −
== Adding activities ==  
+
=== Adding activities ===
 
*Do:
 
*Do:
 
''Note:'''''The git url must be writable by Pootle.'''  
 
''Note:'''''The git url must be writable by Pootle.'''  
Line 136: Line 162:  
*Then your activity must be in place to be translated and ''commit to VCS/update from VCS'' links must be activated.
 
*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 ===
    
The git operations must be done by the pootle user:
 
The git operations must be done by the pootle user:
Line 150: Line 176:  
Other important script is pogenerator.py this script re-generates pot in each repo.
 
Other important script is pogenerator.py this script re-generates pot in each repo.
   −
== Resolving conflicts ==  
+
=== 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.
 
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.
Line 159: Line 185:  
  sudo -u pootle git pull -s ours
 
  sudo -u pootle git pull -s ours
   −
 
+
=== Checking that pootle is working ===
== Checking that pootle is working ==
      
* When commiting from pootle interface, repos in git reflect the commit as something similar to:
 
* When commiting from pootle interface, repos in git reflect the commit as something similar to:
Line 173: Line 198:  
  ####### Checking POT for Write (master) ######
 
  ####### Checking POT for Write (master) ######
    +
=== Tips ===
   −
== Notes ==
+
* How to manipulate users:
 
  −
How to manipulate users:
      
  django-admin shell --settings=pootle.settings
 
  django-admin shell --settings=pootle.settings
Line 184: Line 208:  
  >>> u.save()
 
  >>> u.save()
    +
* Refresh stats, needed when the database and the checked out modules get out of sync:
   −
Various scripts documented here:
+
sudo -u pootle django-admin refresh_stats --settings=pootle.settings
   −
http://git.sugarlabs.org/projects/pootle-helpers
+
* 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.
   −
Scheduled jobs :
+
* 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.
   −
pootle@pootle:~$ cat /etc/cron.d/pootle
+
* 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.
MAILTO="godiard@sugarlabs.org"
  −
MAILTO="rafael@sugarlabs.org"
  −
# m h  dom mon dow user command
  −
30 00 * * * pootle /usr/bin/python      /var/lib/pootle/maintenance/helpers/potupdater/pogenerator.py  /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/pack_generator.py  /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/pack_generator.py  /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/potupdater/check_bad_ownership.sh
      +
== Files ==
   −
''Refresh stats'', needed when the database and the checked out modules get out of sync:
+
Important files and directories in {{Code|/var/lib/pootle}}.
 
  −
/usr/lib/python-django/bin/django-admin.py refresh_stats --settings=pootle.settings
  −
 
  −
Important directories in /var/lib/pootle:
  −
 
  −
'''checkouts''': modules are checked out in this directory. pogenerator.py 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.
  −
 
  −
'''dbs''': internal db used by Pootle, no need to mess directly with it.
  −
 
  −
'''maintenance''': contains some sugar-specific scripts to help maintain our Pootle instance, they are managed in http://git.sugarlabs.org/projects/pootle-helpers
  −
 
  −
'''po''': contains xapian indexes for the search feature.
  −
 
  −
'''translations''': more Pootle internal data
      +
{{Code|'''checkouts'''}}<br>
 +
Modules are checked out in this directory. pogenerator.py 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.
   −
=== Pootle scripts: ===
+
{{Code|'''dbs'''}}<br>
 +
Iternal db used by Pootle, no need to mess directly with it.
   −
*http://git.sugarlabs.org/pootle-helpers/mainline/trees/master/potupdater
+
{{Code|'''maintenance'''}}<br>
*/usr/lib/python2.6/dist-packages/translate/storage/versioncontrol/git.py (Translate)
+
Contains some sugar-specific scripts to help maintain our Pootle instance, they are managed in http://git.sugarlabs.org/projects/pootle-helpers.
   −
=== Tips: ===
+
{{Code|'''po'''}}<br>
 +
Contains xapian indexes for the search feature.
   −
* If you have a commit error file because of only read git url, please rm the
+
{{Code|'''translations'''}}<br>
old '''/var/lib/pootle/checkouts/''' files related with that activity or project
+
More Pootle internal data.
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.
+
{{Code|'''maintenance/helpers/potupdater/project_list.ini'''}}<br>
 
+
This is an Ini file that contains configuration for all used sources repositories. Each section describes one sources repository, where section name is full path to the directory with sources, and contains following options:
* 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.
  −
 
  −
== Restarting Pootle and apache ==
  −
 
  −
/etc/init.d/apache2 restart
  −
service pootle start or /etc/init.d/pootle restart
  −
 
  −
== Files ==
  −
 
  −
===== project_list.ini =====
  −
 
  −
The {{Code|/var/lib/pootle/maintenance/helpers/potupdater/project_list.ini}} is an Ini file that contains configuration for all used sources repositories. Each section describes one sources repository, where section name is full path to the directory with sources, and contains following options:
      
* {{Code|project}} required, meaning-less project name;
 
* {{Code|project}} required, meaning-less project name;
Line 255: Line 249:     
* http://translate.sourceforge.net/wiki/pootle/installation
 
* http://translate.sourceforge.net/wiki/pootle/installation
   
* http://lists.laptop.org/listinfo/localization
 
* http://lists.laptop.org/listinfo/localization
 +
* http://git.sugarlabs.org/pootle-helpers
 +
* /usr/lib/python2.6/dist-packages/translate/storage/versioncontrol/git.py (Translate)
    
[[Category:Service|translate]]
 
[[Category:Service|translate]]

Navigation menu