summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Forcada Codinachs <gforcada@gnome.org>2015-09-02 00:36:03 +0200
committerGil Forcada <gforcada@gnome.org>2015-09-02 23:11:48 +0200
commit7d864acf71a362c2d8ccf70142537f1b2b29f7aa (patch)
treee3e87fefbddf495f90cf211ed48f5be6fd5fe75a
parent917323aa6d320ac2a305c6824e5d8a410bb1bed9 (diff)
downloadzope-tal-7d864acf71a362c2d8ccf70142537f1b2b29f7aa.tar.gz
Allow i18n:ignore and i18n:ignore-attributes
They are used by i18ndude to mark strings or attributes on a template that should not be translatable.
-rw-r--r--src/zope/tal/taldefs.py2
-rw-r--r--src/zope/tal/tests/input/test38.html8
-rw-r--r--src/zope/tal/tests/output/test38.html6
3 files changed, 16 insertions, 0 deletions
diff --git a/src/zope/tal/taldefs.py b/src/zope/tal/taldefs.py
index 0715055..a4aaf61 100644
--- a/src/zope/tal/taldefs.py
+++ b/src/zope/tal/taldefs.py
@@ -61,6 +61,8 @@ KNOWN_I18N_ATTRIBUTES = frozenset([
"attributes",
"data",
"name",
+ "ignore",
+ "ignore-attributes",
])
class TALError(Exception):
diff --git a/src/zope/tal/tests/input/test38.html b/src/zope/tal/tests/input/test38.html
new file mode 100644
index 0000000..4bc3d1e
--- /dev/null
+++ b/src/zope/tal/tests/input/test38.html
@@ -0,0 +1,8 @@
+<span xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <i18n:block ignore="">Test</i18n:block>
+ <a href="http://www.python.org"
+ title="Python"
+ i18n:ignore-attributes="title">
+ Python is a programming language.
+ </a>
+</span>
diff --git a/src/zope/tal/tests/output/test38.html b/src/zope/tal/tests/output/test38.html
new file mode 100644
index 0000000..8efb617
--- /dev/null
+++ b/src/zope/tal/tests/output/test38.html
@@ -0,0 +1,6 @@
+<span>
+ Test
+ <a href="http://www.python.org" title="Python">
+ Python is a programming language.
+ </a>
+</span>