[Zope3-checkins] CVS: Zope3/src/zope/schema - errornames.py:1.7
interfaces.py:1.42
Jim Fulton
jim at zope.com
Fri Mar 19 07:00:39 EST 2004
Update of /cvs-repository/Zope3/src/zope/schema
In directory cvs.zope.org:/tmp/cvs-serv3162/src/zope/schema
Modified Files:
errornames.py interfaces.py
Log Message:
Factored message ids into a separate package. At a low level, this
resolves a circular dependency problem between zope.schema and
zope.i18n. It means that zope.schema doesn't depend on zope.i18n.
This leaves open the question of whether message ids are fundamental
enough that zope.schema (and thus, someday, zope.interface should
depend on them.
=== Zope3/src/zope/schema/errornames.py 1.6 => 1.7 ===
--- Zope3/src/zope/schema/errornames.py:1.6 Mon Nov 24 12:02:29 2003
+++ Zope3/src/zope/schema/errornames.py Fri Mar 19 07:00:08 2004
@@ -20,12 +20,10 @@
as the strings are only defined in one place. Otherwise, this module
serves no real function.
"""
-try:
- from zope.i18n import MessageIDFactory
- _ = MessageIDFactory("zope")
-except ImportError:
- import gettext
- gettext.install(domain='zope')
+
+from zope.i18nmessageid import MessageIDFactory
+_ = MessageIDFactory("zope")
+
WrongType = _(u'Wrong type')
=== Zope3/src/zope/schema/interfaces.py 1.41 => 1.42 ===
--- Zope3/src/zope/schema/interfaces.py:1.41 Fri Mar 5 17:09:31 2004
+++ Zope3/src/zope/schema/interfaces.py Fri Mar 19 07:00:08 2004
@@ -20,12 +20,8 @@
from zope.schema._bootstrapfields import Field, Text, TextLine, Bool, Int
from zope.schema._bootstrapfields import Container, Iterable
-try:
- from zope.i18n import MessageIDFactory
- _ = MessageIDFactory("zope")
-except ImportError:
- import gettext
- gettext.install(domain='zope')
+from zope.i18nmessageid import MessageIDFactory
+_ = MessageIDFactory("zope")
# Import from _bootstrapinterfaces only because other packages will expect
# to find these interfaces here.
More information about the Zope3-Checkins
mailing list