]>
Commit | Line | Data |
---|---|---|
47a4cb89 MT |
1 | #!/usr/bin/python |
2 | ||
3 | """ | |
4 | The translation process of all strings is done in here. | |
5 | """ | |
6 | ||
7 | import gettext | |
8 | ||
9 | """ | |
10 | A function that returnes the same string. | |
11 | """ | |
12 | N_ = lambda x: x | |
13 | ||
14 | ||
15 | """ | |
16 | A function that returnes the translation of a string if available. | |
17 | ||
18 | The language is taken from the system environment. | |
19 | """ | |
20 | # Enable this to have translation in the development environment. | |
21 | # gettext.bindtextdomain("pakfire", "build/mo") | |
22 | ||
23 | _ = lambda x: gettext.ldgettext("pakfire", x) | |
24 |