Difference between revisions of "Translation tooling"

From Creative Commons
Jump to: navigation, search
(Described how to push the source file up to Transifex)
(Extracting translations)
Line 3: Line 3:
 
== Extracting translations ==
 
== Extracting translations ==
  
# First, get a cc.i18n checkout and do the usual thing. Buildout, virtualenv... whatever.
+
Instead of providing a master.po file, the same information is pulled automagically from cc.engine's templates, in the content of the trans tags.
# Run ./runcheckouts.sh && ./extract.sh
+
 
# Commit english .po
+
# Make modifications to cc.engine templates, commit, push, etc.
 +
# In cc.i18n (using either buildout or virtualenv) run ./runcheckout.sh && ./extract.sh
 +
# git add cc/i18n/po/en/cc_org.po
 +
# git commit -m "Extracting new strings for translation"
 +
# git push origin master
  
 
...done!
 
...done!

Revision as of 22:47, 30 January 2012

This currently describes the translation tooling as exists in the i18noverhaul branches. Hopefully in a couple of weeks this will be the case for the normal next/master branches!

Extracting translations

Instead of providing a master.po file, the same information is pulled automagically from cc.engine's templates, in the content of the trans tags.

  1. Make modifications to cc.engine templates, commit, push, etc.
  2. In cc.i18n (using either buildout or virtualenv) run ./runcheckout.sh && ./extract.sh
  3. git add cc/i18n/po/en/cc_org.po
  4. git commit -m "Extracting new strings for translation"
  5. git push origin master

...done!

Push source file up to transifex

  1. ssh a7.creativecommons.org
  2. sudo su cronuser
  3. cd /home/cronuser/transifex.net_i18n_checkout/
  4. git pull
  5. tx push -s

That last command will push the source file (english .po file you committed) up to transifex.