diff options
-rw-r--r-- | CHANGES.rst | 3 | ||||
-rw-r--r-- | src/zope/tal/taldefs.py | 2 | ||||
-rw-r--r-- | src/zope/tal/tests/input/test38.html | 8 | ||||
-rw-r--r-- | src/zope/tal/tests/output/test38.html | 6 |
4 files changed, 18 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index cb86c9f..ad2284c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changes 4.1.2 (unreleased) ------------------ -- TBD +- Accept and ignore ``i18n:ignore`` and ``i18n:ignore-attributes`` attributes. + For compatibility with other tools (such as ``i18ndude``). 4.1.1 (2015-06-05) ------------------ 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> |