Package translate :: Package tools :: Module poswap
[hide private]
[frames] | no frames]

Module poswap

source code

Builds a new translation file with the target of the input language as source language.

Ensure that the two po files correspond 100% to the same pot file before using this.

To translate Kurdish (ku) through French:

   po2swap -i fr/ -t ku -o fr-ku

To convert the fr-ku files back to en-ku:

   po2swap --reverse -i fr/ -t fr-ku -o en-ku

See: http://translate.sourceforge.net/wiki/toolkit/poswap for further examples and usage instructions

Functions [hide private]
 
swapdir(store)
Swap the source and target of each unit.
source code
 
convertpo(inputpofile, outputpotfile, template, reverse=False)
reads in inputpofile, removes the header, writes to outputpotfile.
source code
 
main(argv=None) source code

Imports: po, convert