Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/README
blob: 63c1cc6b1ea7410c809fbf4c7577d58c72eb70e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
=== How it works ===

The advantage of Pootle is that it can understand symlinks. We use this feature 
to have a layout according to (sub)project and versions.
For example, for the core Sugar libs and UI (called Glucose), we have the 
symlinks in the form of:

/var/lib/pootle/checkouts/glucose84/sugar/po/es.po
	-> /var/lib/pootle/translations/glucose84/es/sugar.po

The number 84 signifies version Glucose 0.84 and the latest leading edge odd 
numbered version is tracked in a numberless form (eg: glucose or fructose).

=== Automating this ===

This project has a set of scripts to automate the creation of symlinks for a 
given project. 

==== admin/pootlepopulator.py ====

This script checks out a project from Git into /var/lib/pootle/checkouts/..., and 
then creates the appropiate symlinks in /var/lib/pootle/translations/...

  Usage: pootlepopulator.py category GIT_URL checkout_directory git_branch
  Eg: pootlepopulator.py glucose git://dev.laptop.org/git/sugar sugar master


==== admin/add_langs.py ====

The pootlepopulator.py script has a minor problem. Once a project is visible, and 
a new language is added to it from the web based interface, the new PO file gets 
created in /var/lib/pootle/translations/... where it should ideally be a symlink.
To counter this, admin/add_langs.py has to be run after a new language has been 
added.
This script runs without any arguments and crawls through the subdirectories of 
/var/lib/pootle/translations/... When it finds a non-symlink PO file, it moves it 
to the right location, git adds it and makes the correct symlink.