User Tools

Site Tools


operating_systems:linux:debian:pootle_installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
operating_systems:linux:debian:pootle_installation [2014/03/21 08:47] czuberoperating_systems:linux:debian:pootle_installation [2014/09/17 15:16] – [How to do with de prod server ?] sbolay
Line 34: Line 34:
   ...   ...
      
-====== Create a git repertory ======+====== Create a git repertory for the locales ======
  
 === Create the git repertory === === Create the git repertory ===
Line 56: Line 56:
  
 rm -rf /srv/http/locales/"$app" rm -rf /srv/http/locales/"$app"
- 
 git clone /srv/git/"$app"-locales.git /srv/http/locales/"$app" git clone /srv/git/"$app"-locales.git /srv/http/locales/"$app"
  
Line 64: Line 63:
         then         then
                 mkdir "$dir/LC_MESSAGES"                 mkdir "$dir/LC_MESSAGES"
- 
                 mv "$dir/$app.po" "$dir/LC_MESSAGES/$app.po"                 mv "$dir/$app.po" "$dir/LC_MESSAGES/$app.po"
- 
  msgfmt -o "$dir/LC_MESSAGES/$app.mo" "$dir/LC_MESSAGES/$app.po"  msgfmt -o "$dir/LC_MESSAGES/$app.mo" "$dir/LC_MESSAGES/$app.po"
- 
                 mv "$dir" "$dir.UTF-8"                 mv "$dir" "$dir.UTF-8"
         fi         fi
Line 90: Line 86:
    xgettext -f temp.txt -o /opt/translate.bolay.co/pootle/po/templates/my_project.pot    xgettext -f temp.txt -o /opt/translate.bolay.co/pootle/po/templates/my_project.pot
    rm temp.txt    rm temp.txt
 +   msgmerge -U def.po ref.pot
  
 Create the *.po files Create the *.po files
Line 104: Line 101:
  
 Then go on http://translate.bolay.co Then go on http://translate.bolay.co
 +
 Login Login
 +
 Administration -> project Administration -> project
 +
 Add a project (the project's name must be the same as the repertory) Add a project (the project's name must be the same as the repertory)
  
-Go on Project->my_project->Administrer+Go on Project -> my_project->Administrer 
 Choose the languages (fr_FR, de_DE, templates) Choose the languages (fr_FR, de_DE, templates)
  
Line 116: Line 117:
  
 Go on the site (http://translate.bolay.co) and login Go on the site (http://translate.bolay.co) and login
 +
 Translate what you want Translate what you want
  
 +Click on "Mettre à jour d'après les fichiers modèles"
 +
 +Now push :
 +
 +   cd /opt/translate.bolay.co/pootle/po/my_project
 +   git add .
 +   git commit -m "my_message"
 +   git push origin master
 +And the testing site is translated ! :-D
 +
 +===== How to do with de prod server ? =====
 +
 +On your mac :
 +   git clone git@server1.myserver.com:my_project-locales.git my_project-locales
 +   cd my_project-locales/
 +   git remote add prod git@server3.myserver.com:my_project-locales.git
 +   git pull origin master
 +   git push prod master