[Checkins] SVN: z3c.pt/trunk/z3c/pt/translation. Tags that carry
the TAL-namespace as a prefix should have the tag omitted by
default.
Malthe Borch
mborch at gmail.com
Sun Mar 2 09:45:24 EST 2008
Log message for revision 84406:
Tags that carry the TAL-namespace as a prefix should have the tag omitted by default.
Changed:
U z3c.pt/trunk/z3c/pt/translation.py
U z3c.pt/trunk/z3c/pt/translation.txt
-=-
Modified: z3c.pt/trunk/z3c/pt/translation.py
===================================================================
--- z3c.pt/trunk/z3c/pt/translation.py 2008-03-02 14:15:55 UTC (rev 84405)
+++ z3c.pt/trunk/z3c/pt/translation.py 2008-03-02 14:45:23 UTC (rev 84406)
@@ -31,11 +31,13 @@
"""
interpolation_regex = re.compile(r'([^\\]\$|^\$){(?P<expression>.*)}')
-def attribute(ns, factory):
+def attribute(ns, factory, default=None):
def get(self):
value = self.attrib.get(ns)
if value is not None:
return factory(value)
+ elif default is not None:
+ return default
def set(self, value):
self.attrib[ns] = value
@@ -390,7 +392,7 @@
repeat = attribute("repeat", expressions.definition)
attributes = attribute("attributes", expressions.value)
content = attribute("content", expressions.value)
- omit = attribute("omit-tag", expressions.value)
+ omit = attribute("omit-tag", expressions.value, u"")
def _static_attributes(self):
attributes = {}
Modified: z3c.pt/trunk/z3c/pt/translation.txt
===================================================================
--- z3c.pt/trunk/z3c/pt/translation.txt 2008-03-02 14:15:55 UTC (rev 84405)
+++ z3c.pt/trunk/z3c/pt/translation.txt 2008-03-02 14:45:23 UTC (rev 84406)
@@ -80,7 +80,7 @@
</li>
</ul>
Hello World!
- <div>Hello World!</div>
+ Hello World!
<img alt="'Hello World!'" />
0
1
More information about the Checkins
mailing list