[Zope3-checkins] SVN: Zope3/trunk/ undeprecate automatic
translation of message ids
Gary Poster
gary at zope.com
Sun Apr 30 22:48:46 EDT 2006
Log message for revision 67777:
undeprecate automatic translation of message ids
Changed:
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/src/zope/tal/talinterpreter.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2006-05-01 02:23:59 UTC (rev 67776)
+++ Zope3/trunk/doc/CHANGES.txt 2006-05-01 02:48:45 UTC (rev 67777)
@@ -56,6 +56,11 @@
Restructuring
+ - Undeprecated automatic translation of message ids. This is now
+ ok again, both for convenience and to support rendering values
+ which may sometimes be Messages and sometimes be non-translatable
+ strings.
+
- Deprecated several ZCML directives as described in
http://dev.zope.org/Zope3/ReducingTheAmountOfZCMLDirectives:
Modified: Zope3/trunk/src/zope/tal/talinterpreter.py
===================================================================
--- Zope3/trunk/src/zope/tal/talinterpreter.py 2006-05-01 02:23:59 UTC (rev 67776)
+++ Zope3/trunk/src/zope/tal/talinterpreter.py 2006-05-01 02:48:45 UTC (rev 67777)
@@ -624,24 +624,9 @@
return
if isinstance(text, I18nMessageTypes):
# Translate this now.
- # BBB: Deprecated. Will be removed in 3.3
- self._i18n_deprecate()
text = self.translate(text)
self._writeText(text)
- def _i18n_deprecate(self):
- if self.sourceFile is None:
- source = "<unknown>"
- else:
- source = self.sourceFile
- lineno = self.position[0]
- if lineno is not None:
- source += " (line %s)" % lineno
- warnings.warn('%s: Automatic translation of message id\'s is'
- ' deprecated and will be removed in 3.3.'
- ' Use explicit i18n:translate="" instead.'
- % source, DeprecationWarning, 2)
-
def do_insertI18nText_tal(self, stuff):
# TODO: Code duplication is BAD, we need to fix it later
text = self.engine.evaluateText(stuff[0])
@@ -686,8 +671,6 @@
# evaluate() does not do any I18n, so we do it here.
if isinstance(value, I18nMessageTypes):
# Translate this now.
- # BBB: Deprecated. Will be removed in 3.3
- self._i18n_deprecate()
value = self.translate(value)
if not structure:
More information about the Zope3-Checkins
mailing list