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:51] – [Create a git repertory] 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 111: Line 108:
 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)
- 
  
 Now go on each languages and click "Réexaminer les fichiers du projet" Now go on each languages and click "Réexaminer les fichiers du projet"
Line 122: 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" Click on "Mettre à jour d'après les fichiers modèles"
 +
 Now push : Now push :
 +
    cd /opt/translate.bolay.co/pootle/po/my_project    cd /opt/translate.bolay.co/pootle/po/my_project
    git add .    git add .
    git commit -m "my_message"    git commit -m "my_message"
    git push origin master    git push origin master
-And the site is translated ! :-D+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