10637.3.1
by Guilherme Salgado
Use the default python version instead of a hard-coded version |
1 |
#!/usr/bin/python -S
|
8687.15.22
by Karl Fogel
Add the copyright header block to the remaining .py files. |
2 |
#
|
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
5 |
||
7570.3.11
by Jeroen Vermeulen
Lint fixes. |
6 |
# pylint: disable-msg=W0403
|
7570.3.2
by Jeroen Vermeulen
Put script into a usable state. |
7 |
|
8 |
"""Run gettext consistency checks on messages in the database.
|
|
9 |
||
10 |
Incoming translations are always run through gettext to check for
|
|
11 |
errors, mainly with conversion specifiers in format strings. But under
|
|
7570.3.4
by Jeroen Vermeulen
Got test setup working. |
12 |
certain circumstances (e.g. bug 317578) it's possible to have messages
|
13 |
in the database that would fail that check in their present form. Or a
|
|
7570.3.2
by Jeroen Vermeulen
Put script into a usable state. |
14 |
check may be added in later versions of gettext.
|
15 |
||
16 |
This script checks messages against gettext again. Ones that fail are
|
|
17 |
disabled; if there is an imported alternative that does pass, it is
|
|
18 |
enabled instead.
|
|
19 |
"""
|
|
20 |
||
21 |
__metaclass__ = type |
|
22 |
||
23 |
import _pythonpath |
|
7570.3.4
by Jeroen Vermeulen
Got test setup working. |
24 |
|
8751.1.2
by Danilo Šegan
Update configure.zcml and interface calls. |
25 |
from lp.translations.scripts.gettext_check_messages import ( |
14612.2.7
by William Grant
scripts |
26 |
GettextCheckMessages, |
27 |
)
|
|
7570.3.2
by Jeroen Vermeulen
Put script into a usable state. |
28 |
|
29 |
||
30 |
if __name__ == '__main__': |
|
31 |
GettextCheckMessages('gettext-check-messages').lock_and_run() |