[Checkins]
SVN: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_
Added i18n calls to the interfaces of the demo objects.
Michael Bernstein
webmaven at cox.net
Sat Jan 20 14:19:14 EST 2007
Log message for revision 72154:
Added i18n calls to the interfaces of the demo objects.
Changed:
U z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_1/interfaces.py
U z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_2/interfaces.py
U z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/interfaces.py
U z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_4/interfaces.py
-=-
Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_1/interfaces.py
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_1/interfaces.py 2007-01-20 19:01:42 UTC (rev 72153)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_1/interfaces.py 2007-01-20 19:19:13 UTC (rev 72154)
@@ -2,14 +2,16 @@
from z3c.zalchemy.interfaces import ISQLAlchemyObjectContained, ISQLAlchemyContainer
from zope.app.container.constraints import contains, containers
+from z3c.zalchemy.i18n import _
+
# Define an interface for an RDBMS-persistent content class
class IHelloWorldMessage(ISQLAlchemyObjectContained):
"""Information about a hello world message"""
who = zope.schema.TextLine(
- title=u'Who',
- description=u'Name of the person sending the message',
+ title=_(u'Who'),
+ description=_(u'Name of the person sending the message'),
required=True)
# Define an interface for a container of RDBMS-persistent IHelloWorld objects
Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_2/interfaces.py
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_2/interfaces.py 2007-01-20 19:01:42 UTC (rev 72153)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_2/interfaces.py 2007-01-20 19:19:13 UTC (rev 72154)
@@ -2,13 +2,15 @@
from z3c.zalchemy.interfaces import ISQLAlchemyObjectContained, ISQLAlchemyContainer
from zope.app.container.constraints import contains, containers
+from z3c.zalchemy.i18n import _
+
# Interface defining the Zope schema for RDBMS-persistent Messages
class IHelloWorldMessage2(ISQLAlchemyObjectContained):
"""Information about a hello world message"""
who = zope.schema.TextLine(
- title=u'Who',
- description=u'Name of the person sending the message',
+ title=_(u'Who'),
+ description=_(u'Name of the person sending the message'),
required=True)
# Interface of a container for RDBMS-persistent messages
Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/interfaces.py
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/interfaces.py 2007-01-20 19:01:42 UTC (rev 72153)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/interfaces.py 2007-01-20 19:19:13 UTC (rev 72154)
@@ -3,6 +3,8 @@
from zope.app.container.constraints import contains, containers
from zope.interface import Interface, Attribute
+from z3c.zalchemy.i18n import _
+
# Interface defining the Zope schema of message objects
class IHelloWorldMessage3(ISQLAlchemyObjectContained):
"""Information about a hello world message"""
@@ -10,8 +12,8 @@
id = Attribute("The ID of the Message")
who = zope.schema.TextLine(
- title=u'Who',
- description=u'Name of the person getting the message',
+ title=_(u'Who'),
+ description=_(u'Name of the person getting the message'),
required=True)
#interface defining the schema of the container for message objects
Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_4/interfaces.py
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_4/interfaces.py 2007-01-20 19:01:42 UTC (rev 72153)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_4/interfaces.py 2007-01-20 19:19:13 UTC (rev 72154)
@@ -3,17 +3,21 @@
from zope.app.container.constraints import contains, containers
from zope.interface import Interface, Attribute
+from z3c.zalchemy.i18n import _
+
+# Define a message fragment, which is contained in a message
class IHelloWorldFragment(ISQLAlchemyObjectContained):
"""Information about a hello world message"""
message_id = Attribute("The ID of the parent message")
what = zope.schema.TextLine(
- title=u'What',
- description=u'Type of message',
+ title=_(u'What'),
+ description=_(u'fragment of a message'),
required=True)
-
-
+
+# Define a message object, which contains fragments, and
+# is contained in a MessageContainer
class IHelloWorldMessage4(ISQLAlchemyContainer,ISQLAlchemyObjectContained):
"""Information about a hello world message"""
@@ -22,12 +26,12 @@
fragments = Attribute("The contained Message fragments")
who = zope.schema.TextLine(
- title=u'Who',
- description=u'Name of the person getting the message',
+ title=_(u'Who'),
+ description=_(u'Name of the person getting the message'),
required=True)
contains(IHelloWorldFragment)
-
+# Define a container for Messages
class IMessageContainer4(ISQLAlchemyContainer):
"""A container for hello world message mbjects"""
contains(IHelloWorldMessage4)
More information about the Checkins
mailing list