[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/component/interfaces/registration.py Made registration status translatable.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Apr 1 23:41:12 EST 2005


Log message for revision 29832:
  Made registration status translatable.
  
  

Changed:
  U   Zope3/trunk/src/zope/app/component/interfaces/registration.py

-=-
Modified: Zope3/trunk/src/zope/app/component/interfaces/registration.py
===================================================================
--- Zope3/trunk/src/zope/app/component/interfaces/registration.py	2005-04-02 04:18:50 UTC (rev 29831)
+++ Zope3/trunk/src/zope/app/component/interfaces/registration.py	2005-04-02 04:41:11 UTC (rev 29832)
@@ -17,7 +17,7 @@
 """
 import zope.component.interfaces
 from zope.interface import Interface, Attribute, implements
-from zope.schema import Field, Choice
+from zope.schema import Field, Choice, vocabulary
 from zope.schema.interfaces import IField
 
 from zope.app.annotation.interfaces import IAttributeAnnotatable
@@ -59,7 +59,9 @@
 
     status = Choice(
         title=_("Registration status"),
-        values=(InactiveStatus, ActiveStatus),
+        vocabulary=vocabulary.SimpleVocabulary(
+            (vocabulary.SimpleTerm(InactiveStatus, title=InactiveStatus),
+             vocabulary.SimpleTerm(ActiveStatus, title=ActiveStatus))),
         default=ActiveStatus
         )
 



More information about the Zope3-Checkins mailing list