summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Theune <ct@gocept.com>2010-10-26 13:54:41 +0000
committerChristian Theune <ct@gocept.com>2010-10-26 13:54:41 +0000
commit501e4a22872dbb3ec2b53be2aaa6be06049452ea (patch)
tree1571dfcce1c31b95ac474c27b44acfb530d4fb78
parenta5064f6e02cf128e7c3fcd7f85a1e7dcc3c89496 (diff)
downloadzope-i18n-501e4a22872dbb3ec2b53be2aaa6be06049452ea.tar.gz
Fix #611746: NAME_RE should be identical to the one in zope.tal
-rw-r--r--CHANGES.txt2
-rw-r--r--src/zope/i18n/__init__.py2
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}))