comparison babel/messages/catalog.py @ 356:ed20c467d223

Moved PYTHON_FORMAT back to catalog.
author aronacher
date Tue, 17 Jun 2008 20:07:08 +0000
parents 249aab27c4b3
children 9acf6b5baa22
comparison
equal deleted inserted replaced
355:2b74cff3c612 356:ed20c467d223
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
Copyright (C) 2012-2017 Edgewall Software