[Zope-Checkins] CVS: Zope3/lib/python/Zope/TAL - TALInterpreter.py:1.76 TranslationContext.py:1.3
Fred L. Drake, Jr.
fdrake@acm.org
Mon, 17 Jun 2002 15:27:13 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv6755
Modified Files:
TALInterpreter.py TranslationContext.py
Log Message:
Push the handling for the default domain into the translation context.
=== Zope3/lib/python/Zope/TAL/TALInterpreter.py 1.75 => 1.76 ===
self.i18nStack = []
self.i18nInterpolate = i18nInterpolate
- self.i18nContext = TranslationContext(domain="default")
+ self.i18nContext = TranslationContext()
def saveState(self):
return (self.position, self.col, self.stream,
=== Zope3/lib/python/Zope/TAL/TranslationContext.py 1.2 => 1.3 ===
"""
+DEFAULT_DOMAIN = "default"
+
class TranslationContext:
"""Information about the I18N settings of a TAL processor."""
@@ -30,6 +32,8 @@
target = parent.target
if not source:
source = parent.source
+ elif domain is None:
+ domain = DEFAULT_DOMAIN
self.parent = parent
self.domain = domain