diff options
author | Christian Theune <ct@gocept.com> | 2010-10-26 13:54:41 +0000 |
---|---|---|
committer | Christian Theune <ct@gocept.com> | 2010-10-26 13:54:41 +0000 |
commit | 501e4a22872dbb3ec2b53be2aaa6be06049452ea (patch) | |
tree | 1571dfcce1c31b95ac474c27b44acfb530d4fb78 | |
parent | a5064f6e02cf128e7c3fcd7f85a1e7dcc3c89496 (diff) | |
download | zope-i18n-501e4a22872dbb3ec2b53be2aaa6be06049452ea.tar.gz |
Fix #611746: NAME_RE should be identical to the one in zope.tal
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rw-r--r-- | src/zope/i18n/__init__.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index bb60131..2e56f39 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES - Include meta.zcml files in our own zcml configuration as needed, added a test for our configure.zcml. +- Update zope.i18n.NAME_RE to be identical to zope.tal as required by the + comment next to it. Fixes #611746. 3.7.4 (2010-07-08) ------------------ diff --git a/src/zope/i18n/__init__.py b/src/zope/i18n/__init__.py index 2ddfca8..7c3cc49 100644 --- a/src/zope/i18n/__init__.py +++ b/src/zope/i18n/__init__.py @@ -26,7 +26,7 @@ from zope.i18n.interfaces import IFallbackTranslationDomainFactory # Set up regular expressions for finding interpolation variables in text. # NAME_RE must exactly match the expression of the same name in the # zope.tal.taldefs module: -NAME_RE = r"[a-zA-Z][-a-zA-Z0-9_]*" +NAME_RE = r"[a-zA-Z_][-a-zA-Z0-9_]*" _interp_regex = re.compile(r'(?<!\$)(\$(?:(%(n)s)|{(%(n)s)}))' % ({'n': NAME_RE})) |