[Zope-Checkins] CVS: Zope3/lib/python/Zope/TAL - TALDefs.py:1.29
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 12 Jun 2002 10:02:08 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv18595
Modified Files:
TALDefs.py
Log Message:
Marge from the fdrake-tal-i18n-branch:
Update the bytecode version number since I18N support adds opcodes.
Add new definitions used by TALGenerator and TALInterpreter.
=== Zope3/lib/python/Zope/TAL/TALDefs.py 1.28 => 1.29 ===
from types import ListType, TupleType
-TAL_VERSION = "1.3.2"
+TAL_VERSION = "1.4"
XML_NS = "http://www.w3.org/XML/1998/namespace" # URI for XML namespace
XMLNS_NS = "http://www.w3.org/2000/xmlns/" # URI for XML NS declarations
ZOPE_TAL_NS = "http://xml.zope.org/namespaces/tal"
ZOPE_METAL_NS = "http://xml.zope.org/namespaces/metal"
+ZOPE_I18N_NS = "http://xml.zope.org/namespaces/i18n"
NAME_RE = "[a-zA-Z_][a-zA-Z0-9_]*"
@@ -46,6 +47,16 @@
"tal tag",
]
+KNOWN_I18N_ATTRIBUTES = [
+ "translate",
+ "domain",
+ "target",
+ "source",
+ "attributes",
+ "data",
+ "name",
+ ]
+
class TALError(Exception):
def __init__(self, msg, position=(None, None)):
@@ -66,6 +77,9 @@
pass
class TALESError(TALError):
+ pass
+
+class I18NError(TALError):
pass