Mercurial > babel > old > babel-test
comparison babel/messages/catalog.py @ 354:1355e4014496
Moved PYTHON_FORMAT back to catalog.
author | aronacher |
---|---|
date | Tue, 17 Jun 2008 20:07:08 +0000 |
parents | 20d10066a42a |
children | e989a5f2fdff |
comparison
equal
deleted
inserted
replaced
353:991f435715e1 | 354:1355e4014496 |
---|---|
26 | 26 |
27 from babel import __version__ as VERSION | 27 from babel import __version__ as VERSION |
28 from babel.core import Locale | 28 from babel.core import Locale |
29 from babel.dates import format_datetime | 29 from babel.dates import format_datetime |
30 from babel.messages.plurals import PLURALS | 30 from babel.messages.plurals import PLURALS |
31 from babel.util import odict, distinct, LOCALTZ, UTC, FixedOffsetTimezone, \ | 31 from babel.util import odict, distinct, LOCALTZ, UTC, FixedOffsetTimezone |
32 PYTHON_FORMAT | |
33 | 32 |
34 __all__ = ['Message', 'Catalog', 'TranslationError'] | 33 __all__ = ['Message', 'Catalog', 'TranslationError'] |
35 __docformat__ = 'restructuredtext en' | 34 __docformat__ = 'restructuredtext en' |
35 | |
36 | |
37 PYTHON_FORMAT = re.compile(r'''(?x) | |
38 \% | |
39 (?:\(([\w]*)\))? | |
40 ( | |
41 [-#0\ +]?(?:\*|[\d]+)? | |
42 (?:\.(?:\*|[\d]+))? | |
43 [hlL]? | |
44 ) | |
45 ([diouxXeEfFgGcrs%]) | |
46 ''') | |
36 | 47 |
37 | 48 |
38 class Message(object): | 49 class Message(object): |
39 """Representation of a single message in a catalog.""" | 50 """Representation of a single message in a catalog.""" |
40 | 51 |