operating_systems:linux:debian:pootle_installation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
operating_systems:linux:debian:pootle_installation [2013/04/12 09:16] – created tret | operating_systems:linux:debian:pootle_installation [2014/09/17 15:16] – [How to do with de prod server ?] sbolay | ||
---|---|---|---|
Line 30: | Line 30: | ||
===== Configuring Apache ===== | ===== Configuring Apache ===== | ||
+ | ... | ||
+ | ... | ||
+ | ... | ||
+ | | ||
+ | ====== Create a git repertory for the locales ====== | ||
+ | |||
+ | === Create the git repertory === | ||
+ | |||
+ | Create a repertory to have the locales | ||
+ | mkdir / | ||
+ | chown -R www-data: | ||
+ | chmod -R 775 / | ||
+ | |||
+ | Create the git repertory | ||
+ | cd /srv/git | ||
+ | git init --bare --shared my_project.git | ||
+ | chown -R git:git my_project.git | ||
+ | |||
+ | Create the post-receieve hook in the git project: | ||
+ | vim my_project.git/ | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | app=' | ||
+ | |||
+ | rm -rf / | ||
+ | git clone / | ||
+ | |||
+ | for dir in / | ||
+ | do | ||
+ | if [[ -d " | ||
+ | then | ||
+ | mkdir " | ||
+ | mv " | ||
+ | msgfmt -o " | ||
+ | mv " | ||
+ | fi | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | Authorize the execution on the post-receive | ||
+ | chmod 775 my_project.git/ | ||
+ | |||
+ | === Create the pootle files === | ||
+ | |||
+ | Create the repertory in the pootle' | ||
+ | cd / | ||
+ | git clone / | ||
+ | cd my_project | ||
+ | mkdir templates, fr_FR, de_DE | ||
+ | |||
+ | Create the *.pot file | ||
+ | cd / | ||
+ | find -name " | ||
+ | | ||
+ | rm temp.txt | ||
+ | | ||
+ | |||
+ | Create the *.po files | ||
+ | cd / | ||
+ | cp templates/ | ||
+ | cp templates/ | ||
+ | cd .. | ||
+ | |||
+ | Authorize to write for www-data | ||
+ | chown -R www-data: | ||
+ | chmod -R 775 my_project | ||
+ | |||
+ | === Configure the site === | ||
+ | |||
+ | Then go on http:// | ||
+ | |||
+ | Login | ||
+ | |||
+ | Administration -> project | ||
+ | |||
+ | Add a project (the project' | ||
+ | |||
+ | Go on Project -> my_project-> | ||
+ | |||
+ | Choose the languages (fr_FR, de_DE, templates) | ||
+ | |||
+ | Now go on each languages and click " | ||
+ | |||
+ | ===== How to use this ? ===== | ||
+ | |||
+ | Go on the site (http:// | ||
+ | |||
+ | Translate what you want | ||
+ | |||
+ | Click on " | ||
+ | |||
+ | Now push : | ||
+ | |||
+ | cd / | ||
+ | git add . | ||
+ | git commit -m " | ||
+ | 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: | ||
+ | cd my_project-locales/ | ||
+ | git remote add prod git@server3.myserver.com: | ||
+ | git pull origin master | ||
+ | git push prod master |