Mercurial > babel > old > mirror
diff babel/messages/catalog.py @ 227:f358dd40a960
Applied patch by Ramiro Morales for more extensive detection of Python string formatting specifiers. Closes #57.
author | cmlenz |
---|---|
date | Fri, 20 Jul 2007 12:52:40 +0000 |
parents | bd8b1301b27e |
children | 629357c88d59 |
line wrap: on
line diff
--- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -33,7 +33,7 @@ __all__ = ['Message', 'Catalog', 'TranslationError'] __docformat__ = 'restructuredtext en' -PYTHON_FORMAT = re.compile(r'\%(\([\w]+\))?[diouxXeEfFgGcrs]') +PYTHON_FORMAT = re.compile(r'\%(\([\w]+\))?([-#0\ +])?(\*|[\d]+)?(\.(\*|[\d]+))?([hlL])?[diouxXeEfFgGcrs]') class Message(object):