operating_systems:linux:debian:pootle_installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
operating_systems:linux:debian:pootle_installation [2014/09/05 07:25] – czuber | operating_systems:linux:debian:pootle_installation [2014/09/17 15:17] (current) – removed sbolay | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Pootle Installation ====== | ||
- | How to install Pootle 2.5.0-rc1 on Debian. | ||
- | |||
- | ===== Installing Pootle ===== | ||
- | |||
- | Some packages are required in order to build dependencies of Pootle. | ||
- | |||
- | <code bash> | ||
- | sudo aptitude install libxml2-dev | ||
- | sudo aptitude install libxslt-dev | ||
- | </ | ||
- | |||
- | Now, we can let '' | ||
- | |||
- | <code bash> | ||
- | sudo easy_install pootle | ||
- | </ | ||
- | |||
- | We still have to configure Apache to work with Pootle... | ||
- | |||
- | ===== Preparing Apache ===== | ||
- | |||
- | Pootle will be directly loaded by Apache. We need '' | ||
- | |||
- | <code bash> | ||
- | sudo aptitude install libapache2-mod-wsgi | ||
- | </ | ||
- | |||
- | ===== 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.bolay.co: | ||
- | cd my_project-locales/ | ||
- | git remote add prod git@server3.bolay.co: | ||
- | git pull origin master | ||
- | git push prod master |
operating_systems/linux/debian/pootle_installation.1409901941.txt.gz · Last modified: 2014/09/05 07:25 by czuber