Skip to content

Commit

Permalink
Merge pull request #4 from gforcada/gforcada-patch-1
Browse files Browse the repository at this point in the history
Add 'ignore' and 'ignore-attributes' to list of i18n valid attributes
  • Loading branch information
mgedmin committed Sep 3, 2015
2 parents 917323a + c196b80 commit 3e48d6c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------
Expand Down
2 changes: 2 additions & 0 deletions src/zope/tal/taldefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
"attributes",
"data",
"name",
"ignore",
"ignore-attributes",
])

class TALError(Exception):
Expand Down
8 changes: 8 additions & 0 deletions src/zope/tal/tests/input/test38.html
Original file line number Diff line number Diff line change
@@ -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>
6 changes: 6 additions & 0 deletions src/zope/tal/tests/output/test38.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<span>
Test
<a href="http://www.python.org" title="Python">
Python is a programming language.
</a>
</span>

0 comments on commit 3e48d6c

Please sign in to comment.