From sidnei at x3ng.com.br Sun Sep 14 10:59:21 2003
From: sidnei at x3ng.com.br (Sidnei da Silva)
Date: Sun Aug 10 17:05:19 2008
Subject: [ZPT-CVS] CVS: Zope/lib/python/TAL - TALGenerator.py:1.63.4.6
Message-ID: <200309141459.h8EExLR29811@cvs.baymountain.com>
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()
From gotcha at swing.be Fri Sep 19 10:08:12 2003
From: gotcha at swing.be (Godefroid Chapelle)
Date: Sun Aug 10 17:05:19 2008
Subject: [ZPT-CVS] CVS: Zope/lib/python/TAL/tests/input - test19.html:1.4
Message-ID: <200309191408.h8JE8CM08230@cvs.baymountain.com>
Update of /cvs-repository/Zope/lib/python/TAL/tests/input
In directory cvs.zope.org:/tmp/cvs-serv7898/tests/input
Modified Files:
test19.html
Log Message:
-tests do not show any DeprecationWarnings anymore
-fix for 1 attribute only
=== Zope/lib/python/TAL/tests/input/test19.html 1.3 => 1.4 ===
--- Zope/lib/python/TAL/tests/input/test19.html:1.3 Fri Jul 25 14:54:39 2003
+++ Zope/lib/python/TAL/tests/input/test19.html Fri Sep 19 10:08:10 2003
@@ -12,10 +12,10 @@
i18n:attributes="name message-id;">
+ i18n:attributes="name; title">
+ i18n:attributes="name; title">
From gotcha at swing.be Fri Sep 19 10:08:41 2003
From: gotcha at swing.be (Godefroid Chapelle)
Date: Sun Aug 10 17:05:19 2008
Subject: [ZPT-CVS] CVS: Zope/lib/python/TAL - TALGenerator.py:1.70
Message-ID: <200309191408.h8JE8fR08237@cvs.baymountain.com>
Update of /cvs-repository/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv7898
Modified Files:
TALGenerator.py
Log Message:
-tests do not show any DeprecationWarnings anymore
-fix for 1 attribute only
=== Zope/lib/python/TAL/TALGenerator.py 1.69 => 1.70 ===
--- Zope/lib/python/TAL/TALGenerator.py:1.69 Wed Aug 20 17:43:40 2003
+++ Zope/lib/python/TAL/TALGenerator.py Fri Sep 19 10:08:09 2003
@@ -725,7 +725,6 @@
replace = todo.get("replace")
condition = todo.get("condition")
onError = todo.get("onError")
- define = todo.get("define")
repldict = todo.get("repldict", {})
scope = todo.get("scope")
optTag = todo.get("optional tag")
@@ -849,7 +848,9 @@
addAttribute(d, attr, msgid, position, xml)
else:
i18nattrlist = i18nattrs.split()
- if len(i18nattrlist) == 2:
+ if len(i18nattrlist) == 1:
+ addAttribute(d, i18nattrlist[0], None, position, xml)
+ elif len(i18nattrlist) == 2:
staticattrs = [attr[0] for attr in attrlist if len(attr) == 2]
if (not i18nattrlist[1] in staticattrs) and (
not i18nattrlist[1] in repldict):