Commit a4625442 authored by Godefroid Chapelle's avatar Godefroid Chapelle

-tests do not show any DeprecationWarnings anymore

-fix for 1 attribute only
parent c3c12bfc
...@@ -725,7 +725,6 @@ class TALGenerator: ...@@ -725,7 +725,6 @@ class TALGenerator:
replace = todo.get("replace") replace = todo.get("replace")
condition = todo.get("condition") condition = todo.get("condition")
onError = todo.get("onError") onError = todo.get("onError")
define = todo.get("define")
repldict = todo.get("repldict", {}) repldict = todo.get("repldict", {})
scope = todo.get("scope") scope = todo.get("scope")
optTag = todo.get("optional tag") optTag = todo.get("optional tag")
...@@ -849,7 +848,9 @@ def _parseI18nAttributes(i18nattrs, attrlist, repldict, position, ...@@ -849,7 +848,9 @@ def _parseI18nAttributes(i18nattrs, attrlist, repldict, position,
addAttribute(d, attr, msgid, position, xml) addAttribute(d, attr, msgid, position, xml)
else: else:
i18nattrlist = i18nattrs.split() 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] staticattrs = [attr[0] for attr in attrlist if len(attr) == 2]
if (not i18nattrlist[1] in staticattrs) and ( if (not i18nattrlist[1] in staticattrs) and (
not i18nattrlist[1] in repldict): not i18nattrlist[1] in repldict):
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
i18n:attributes="name message-id;"> i18n:attributes="name message-id;">
<input name="Delete" title="titletext" <input name="Delete" title="titletext"
i18n:attributes="name title"> i18n:attributes="name; title">
<input name="Delete" tal:attributes="title string:titletaltext" <input name="Delete" tal:attributes="title string:titletaltext"
i18n:attributes="name title"> i18n:attributes="name; title">
<input name="Delete" tal:attributes="title string:titletaltext" <input name="Delete" tal:attributes="title string:titletaltext"
i18n:attributes="name message-id"> i18n:attributes="name message-id">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment