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

Class phppo2pypo

source code

Instance Methods [hide private]
 
convertstore(self, inputstore)
Converts a given .po file (PHP Format) to a Python format .po file, the difference being how variable substitutions work.
source code
 
convertunit(self, unit) source code
 
convertstrings(self, input) source code
Method Details [hide private]

convertstore(self, inputstore)

source code 
Converts a given .po file (PHP Format) to a Python format .po file, the difference being
how variable substitutions work.  PHP uses a %1$s format, and Python uses
a {0} format (zero indexed).  This method will convert, e.g.:
    I have %2$s apples and %1$s oranges
        to
    I have {1} apples and {0} oranges
This method ignores strings with %s as both languages will recognize that.