Changes

964 bytes added ,  10:07, 1 April 2011
m
doc of branching procedure
Line 54: Line 54:     
  /var/lib/pootle/translations
 
  /var/lib/pootle/translations
  −
== Adding activities ==
  −
*Do:
  −
''Note:'''''The git url must be writable by Pootle.'''
  −
  −
2!root@pootle:/var/lib/pootle/maintenance/helpers/admin# sudo -u pootle python ./pootlepopulator.py  honey git://git.sugarlabs.org/fototoon/mainline.git fototoon
  −
******** Cloning git://git.sugarlabs.org/fototoon/mainline.git to /var/lib/pootle/checkouts/honey/fototoon *********
  −
Running git clone git://git.sugarlabs.org/fototoon/mainline.git /var/lib/pootle/checkouts/honey/fototoon
  −
Initialized empty Git repository in /var/lib/pootle/checkouts/honey/fototoon/.git/
  −
******** Switching to branch master *********
  −
Running  git checkout --track -b master origin/master
  −
Running git pull
  −
Already up-to-date.
  −
********* Git operation completed, moving to next stage ********
  −
********* Searching 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/FotoToon.pot to /var/lib/pootle/translations/honey/templates/fototoon.pot
  −
********* Done Symlinking *********
  −
  −
*Then run the '''add_langs.py''' script in order to have all the lang.po in place.
  −
  −
*Then your activity must be in place to be translated and ''commit to VCS/update from VCS'' links must be activated.
      
== Creating branches: ==
 
== Creating branches: ==
Line 91: Line 66:  
you can issue these commands:
 
you can issue these commands:
   −
  pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar/mainline.git  sugar sucrose-0.92  
+
  sudo -u pootle python pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar/mainline.git  sugar sucrose-0.92
  pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar/mainline.git  sugar-base sucrose-0.92
+
  sudo -u pootle python pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar-base/mainline.git  sugar-base sucrose-0.92
  pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar/mainline.git  sugar-toolkit sucrose-0.92  
+
  sudo -u pootle python pootlepopulator.py glucose92 gitorious@git.sugarlabs.org:sugar-toolkit/mainline.git  sugar-toolkit sucrose-0.92
    +
pootlepopulator script can be found in maintainance/helpers directory in /var/lib/pootle
    +
As these projects doesn't have pots we most copy them from  master
 +
 +
cp /var/lib/pootle/checkouts/glucose/sugar/po/sugar.pot /var/lib/pootle/checkouts/glucose92/sugar/po/
 +
cp /var/lib/pootle/checkouts/glucose/sugar-base/po/sugar-base.pot /var/lib/pootle/checkouts/glucose92/sugar-base/po/
 +
cp /var/lib/pootle/checkouts/glucose/sugar-toolkit/po/sugar-toolkit.pot /var/lib/pootle/checkouts/glucose92/sugar-toolkit/po/
    +
Pootlepopulator cannot create symlinks (what add_langs does for activities)
 +
then gonzalo had to modify it to only create symlinks and not cloning thus we finnaly run. 
   −
The script can be found in maintainance/helpers directory in /var/lib/pootle
+
sudo -u pootle python  create_translation_links.py glucose92  sugar sucrose-0.92
 +
sudo -u pootle python  create_translation_links.py glucose92  sugar-base sucrose-0.92
 +
sudo -u pootle python  create_translation_links.py glucose92  sugar-toolkit sucrose-0.92
    
* Once this is done, you need to create project in Pootle admin - go
 
* Once this is done, you need to create project in Pootle admin - go
to '''admin->projects''' and createa project called Sucrose 0.90 with the
+
to '''admin->projects''' and create a project called Sucrose 0.90 with the
 
code sucrose-0.90 (same as the directory name)
 
code sucrose-0.90 (same as the directory name)
   Line 114: Line 99:  
for DIR in `ls ../glucose`; do cp ../glucose/$DIR*.po ./$DIR;  
 
for DIR in `ls ../glucose`; do cp ../glucose/$DIR*.po ./$DIR;  
    +
* Your branch is created.
    
[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 ==
 +
*Do:
 +
''Note:'''''The git url must be writable by Pootle.'''
 +
 +
2!root@pootle:/var/lib/pootle/maintenance/helpers/admin# sudo -u pootle python ./pootlepopulator.py  honey git://git.sugarlabs.org/fototoon/mainline.git fototoon
 +
******** Cloning git://git.sugarlabs.org/fototoon/mainline.git to /var/lib/pootle/checkouts/honey/fototoon *********
 +
Running git clone git://git.sugarlabs.org/fototoon/mainline.git /var/lib/pootle/checkouts/honey/fototoon
 +
Initialized empty Git repository in /var/lib/pootle/checkouts/honey/fototoon/.git/
 +
******** Switching to branch master *********
 +
Running  git checkout --track -b master origin/master
 +
Running git pull
 +
Already up-to-date.
 +
********* Git operation completed, moving to next stage ********
 +
********* Searching 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/FotoToon.pot to /var/lib/pootle/translations/honey/templates/fototoon.pot
 +
********* Done Symlinking *********
 +
 +
*Then run the '''add_langs.py''' script in order to have all the lang.po in place.
 +
 +
*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 ==