aboutsummaryrefslogtreecommitdiffstats
path: root/doc/TRANSLATE.md
blob: 639423f475a256571e607842f58562e3de3a54e8 (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
39
40
41
42
43
44
45
46
47
The software translations are implemented using GNU gettext, and the
resource files are managed in Transifex.

The Transifex project is at
https://www.transifex.net/projects/p/alaveteli/; you'll probably want
an account there (ask on the mailing list).

# Summary

1. Make some changes to the software with `_('translatable strings')`
2. Temporarily move any theme containing translations out of the way (there's a bug in gettext_i18n_rails that can't cope with translation chains)
3. Run `./script/generate_pot.sh`
4. This should just cause the file at `locale/app.pot` to change.  Commit and push
5. Move your theme back in place
6. Send a message to the alaveteli-dev mailing list warning them that you're going to upload this file to transifex
7. Wait a day or so to make sure they've uploaded any of their outstanding translations and have a copy of any old ones
8. Update the `app.pot` resource in Transifex
9. When new translations are available, run `tx pull -a` and commit the results to the repository

# Detail

## Finding new translatable strings

To update the POT file with strings from the software source, run
`rake gettext:find` from the Alaveteli software.  This will also
update all the PO files for all the languages, which you don't
actually want, because these are all handled in Transifex; so you'll
want to revert these files again using git.

The script at `./script/generate_pot.sh` does these steps for you.

When you've changed the POT file, and committed it, you should warn
people on the mailing list before logging into Transifex and pressing
the button to import it into that system.  Otherwise, translators
might lose some of their old but useful translations.

## Pulling translations from Transifex
  
To update the local translation files using the Transifex command-line client, first install it:

    # easy_install transifex-client
  
Then you can run the following from the root of your Alaveteli install:

    tx pull -a
    
Finally, commit these translations to github as usual.