[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/ Use immutable i18n messages in favour of deprecated MessageIDs

Philipp von Weitershausen philikon at philikon.de
Tue Apr 4 02:14:06 EDT 2006


Log message for revision 66359:
  Use immutable i18n messages in favour of deprecated MessageIDs
  

Changed:
  U   Zope3/branches/jim-adapter/src/bugtracker/__init__.py
  U   Zope3/branches/jim-adapter/src/bugtracker/vocabulary.py
  U   Zope3/branches/jim-adapter/src/zope/app/form/browser/widgets.txt

-=-
Modified: Zope3/branches/jim-adapter/src/bugtracker/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/__init__.py	2006-04-03 23:00:46 UTC (rev 66358)
+++ Zope3/branches/jim-adapter/src/bugtracker/__init__.py	2006-04-04 06:14:04 UTC (rev 66359)
@@ -15,5 +15,5 @@
 
 $Id: __init__.py,v 1.2 2003/08/12 18:55:07 srichter Exp $
 """
-from zope.i18n import MessageIDFactory
-TrackerMessageID = MessageIDFactory('bugtracker')
+from zope.i18nmessageid import MessageFactory
+TrackerMessageID = MessageFactory('bugtracker')

Modified: Zope3/branches/jim-adapter/src/bugtracker/vocabulary.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/vocabulary.py	2006-04-03 23:00:46 UTC (rev 66358)
+++ Zope3/branches/jim-adapter/src/bugtracker/vocabulary.py	2006-04-04 06:14:04 UTC (rev 66359)
@@ -98,8 +98,8 @@
 
     def delete(self, value):
         if value == self.default.value:
-            error_msg = _("Cannot delete default value '${value}'.")
-            error_msg.mapping = {'value': value}
+            error_msg = _("Cannot delete default value '${value}'.",
+                          mapping = {'value': value})
             raise ValueError(error_msg)
         del self.annotations[self.key][value]
 
@@ -122,8 +122,7 @@
             value = value.value
         if value not in self:
             error_msg = _("The value '${value}' was not found in the "
-                          "vocabulary")
-            error_msg.mapping = {'value': value}
+                          "vocabulary", mapping={'value': value})
             raise ValueError(error_msg)
         self.annotations[self.key+'/default'] = value
 

Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/widgets.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/widgets.txt	2006-04-03 23:00:46 UTC (rev 66358)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/widgets.txt	2006-04-04 06:14:04 UTC (rev 66359)
@@ -47,9 +47,9 @@
     from zope.interface import Interface
     from zope.schema import Object, Tuple, TextLine
     from zope.schema.interfaces import ITextLine
-    from zope.i18n import MessageIDFactory
+    from zope.i18nmessageid import MessageFactory
 
-    _ = MessageIDFactory("poll")
+    _ = MessageFactory("poll")
 
     class IPollOption(Interface):
         label = TextLine(title=u'Label', min_length=1)



More information about the Zope3-Checkins mailing list