[Zope-Checkins] CVS: Zope/lib/python/TAL - TALGenerator.py:1.63.4.6
Sidnei da Silva
sidnei at x3ng.com.br
Sun Sep 14 10:59:20 EDT 2003
Update of /cvs-repository/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv29707/lib/python/TAL
Modified Files:
Tag: Zope-2_7-branch
TALGenerator.py
Log Message:
Disable DeprecationWarning on 2.7, as Godefroid discussed with Jim.
=== Zope/lib/python/TAL/TALGenerator.py 1.63.4.5 => 1.63.4.6 ===
--- Zope/lib/python/TAL/TALGenerator.py:1.63.4.5 Wed Aug 20 17:44:01 2003
+++ Zope/lib/python/TAL/TALGenerator.py Sun Sep 14 10:59:15 2003
@@ -790,7 +790,7 @@
self.emitI18nVariable(varname)
# Do not test for "msgid is not None", i.e. we only want to test for
# explicit msgids here. See comment above.
- if msgid is not None:
+ if msgid is not None:
# in case tal:content, i18n:translate and i18n:name in the
# same tag insertTranslation opcode has already been
# emitted
@@ -834,7 +834,7 @@
d = {}
if ';' in i18nattrs:
i18nattrlist = i18nattrs.split(';')
- i18nattrlist = [attr.strip().split()
+ i18nattrlist = [attr.strip().split()
for attr in i18nattrlist if attr.strip()]
for parts in i18nattrlist:
if len(parts) > 2:
@@ -854,31 +854,16 @@
if (not i18nattrlist[1] in staticattrs) and (
not i18nattrlist[1] in repldict):
attr, msgid = i18nattrlist
- addAttribute(d, attr, msgid, position, xml)
+ addAttribute(d, attr, msgid, position, xml)
else:
- import warnings
- warnings.warn(I18N_ATTRIBUTES_WARNING
- % (source_file, str(position), i18nattrs)
- , DeprecationWarning)
msgid = None
for attr in i18nattrlist:
- addAttribute(d, attr, msgid, position, xml)
- else:
- import warnings
- warnings.warn(I18N_ATTRIBUTES_WARNING
- % (source_file, str(position), i18nattrs)
- , DeprecationWarning)
+ addAttribute(d, attr, msgid, position, xml)
+ else:
msgid = None
for attr in i18nattrlist:
- addAttribute(d, attr, msgid, position, xml)
+ addAttribute(d, attr, msgid, position, xml)
return d
-
-I18N_ATTRIBUTES_WARNING = (
- 'Space separated attributes in i18n:attributes'
- ' are deprecated (i18n:attributes="value title"). Please use'
- ' semicolon to separate attributes'
- ' (i18n:attributes="value; title").'
- '\nFile %s at row, column %s\nAttributes %s')
def test():
t = TALGenerator()
More information about the Zope-Checkins
mailing list