[Zope3-checkins] CVS: Zope3/src/zope/app/services/translation - configure.zcml:1.1.2.2 gettextexportfilter.py:1.1.2.2 gettextimportfilter.py:1.1.2.2 messagecatalog.py:1.1.2.2 translationservice.py:1.1.2.2

Jim Fulton jim@zope.com
Tue, 24 Dec 2002 07:51:50 -0500


Update of /cvs-repository/Zope3/src/zope/app/services/translation
In directory cvs.zope.org:/tmp/cvs-serv1158/src/zope/app/services/translation

Modified Files:
      Tag: NameGeddon-branch
	configure.zcml gettextexportfilter.py gettextimportfilter.py 
	messagecatalog.py translationservice.py 
Log Message:
Searched for and changed over 1200 references to Zope.something.

Most of these were either comments, doc strings, or permission ids.

Many were imports or ids in zcml.  (much zcml fixup is still needed.



=== Zope3/src/zope/app/services/translation/configure.zcml 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/translation/configure.zcml:1.1.2.1	Mon Dec 23 14:32:25 2002
+++ Zope3/src/zope/app/services/translation/configure.zcml	Tue Dec 24 07:51:19 2002
@@ -6,10 +6,10 @@
 
 <!-- Register the Translation Service as a content object -->
 <content class="zope.app.services.translation.translationservice.TranslationService">
-   <factory id="TranslationService" permission="Zope.ManageServices" />
-   <require permission="Zope.Public"
+   <factory id="TranslationService" permission="zope.ManageServices" />
+   <require permission="zope.Public"
        interface="zope.interfaces.i18n.ITranslationService" />
-   <require permission="Zope.ManageServices"
+   <require permission="zope.ManageServices"
        interface="zope.app.interfaces.container.IContainer" />
    <implements interface="zope.app.interfaces.annotation.IAttributeAnnotatable" />
 </content>
@@ -20,10 +20,10 @@
 <!-- Setup Message Catalogs -->
 <content class="zope.app.services.translation.messagecatalog.MessageCatalog">
 
-  <require permission="Zope.View" 
+  <require permission="zope.View" 
       interface="zope.interfaces.i18n.IReadMessageCatalog" />
 
-  <require permission="Zope.ManageServices"
+  <require permission="zope.ManageServices"
       attributes="setMessage getMessageIds" />
   <implements interface="zope.app.interfaces.annotation.IAttributeAnnotatable" />
       interface="zope.interfaces.i18n.IWriteMessageCatalog" />


=== Zope3/src/zope/app/services/translation/gettextexportfilter.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/translation/gettextexportfilter.py:1.1.2.1	Mon Dec 23 14:32:25 2002
+++ Zope3/src/zope/app/services/translation/gettextexportfilter.py	Tue Dec 24 07:51:19 2002
@@ -31,12 +31,8 @@
     def __init__(self, service):
         self.service = service
 
-    ############################################################
-    # Implementation methods for interface
-    # Zope.I18n.IMessageExportFilter.IMessageExportFilter
-
     def exportMessages(self, domains, languages):
-        'See Zope.I18n.IMessageExportFilter.IMessageExportFilter'
+        'See IMessageExportFilter'
 
         if isinstance(domains, StringTypes):
             domain = domains


=== Zope3/src/zope/app/services/translation/gettextimportfilter.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/translation/gettextimportfilter.py:1.1.2.1	Mon Dec 23 14:32:25 2002
+++ Zope3/src/zope/app/services/translation/gettextimportfilter.py	Tue Dec 24 07:51:19 2002
@@ -31,12 +31,8 @@
     def __init__(self, service):
         self.service = service
 
-    ############################################################
-    # Implementation methods for interface
-    # Zope.I18n.IMessageImportFilter.IMessageImportFilter
-
     def importMessages(self, domains, languages, file):
-        'See Zope.I18n.IMessageImportFilter.IMessageImportFilter'
+        'See IMessageImportFilter'
 
         if isinstance(domains, StringTypes):
             domain = domains


=== Zope3/src/zope/app/services/translation/messagecatalog.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/translation/messagecatalog.py:1.1.2.1	Mon Dec 23 14:32:25 2002
+++ Zope3/src/zope/app/services/translation/messagecatalog.py	Tue Dec 24 07:51:19 2002
@@ -37,20 +37,12 @@
         self._domain = domain
         self._messages = OOBTree()
     
-
-    ############################################################
-    # Implementation methods for interface
-    # Zope.I18n.IMessageCatalog.IMessageCatalog
-
-    ######################################
-    # from: Zope.I18n.IMessageCatalog.IReadMessageCatalog
-
     def getMessage(self, id):
-        'See Zope.I18n.IMessageCatalog.IReadMessageCatalog'
+        'See IReadMessageCatalog'
         return removeAllProxies(self._messages[id][0])
 
     def queryMessage(self, id, default=None):
-        'See Zope.I18n.IMessageCatalog.IReadMessageCatalog'
+        'See IReadMessageCatalog'
         result = removeAllProxies(self._messages.get(id))
         if result is not None:
             result = result[0]
@@ -59,22 +51,19 @@
         return result
 
     def getLanguage(self):
-        'See Zope.I18n.IMessageCatalog.IReadMessageCatalog'
+        'See IReadMessageCatalog'
         return self._language
         
     def getDomain(self):
-        'See Zope.I18n.IMessageCatalog.IReadMessageCatalog'
+        'See IReadMessageCatalog'
         return self._domain
 
     def getIdentifier(self):
-        'See Zope.I18n.IMessageCatalog.IReadMessageCatalog'
+        'See IReadMessageCatalog'
         return (self._language, self._domain)
-        
-    ######################################
-    # from: Zope.I18n.IMessageCatalog.IWriteMessageCatalog
 
     def getFullMessage(self, msgid):
-        'See Zope.I18n.IMessageCatalog.IWriteMessageCatalog'
+        'See IWriteMessageCatalog'
         message = removeAllProxies(self._messages[msgid])
         return {'domain'   : self._domain,
                 'language' : self._language,
@@ -83,21 +72,21 @@
                 'mod_time' : message[1]}
 
     def setMessage(self, msgid, message, mod_time=None):
-        'See Zope.I18n.IMessageCatalog.IWriteMessageCatalog'
+        'See IWriteMessageCatalog'
         if mod_time is None:
             mod_time = int(time.time())
         self._messages[msgid] = (message, mod_time)
         
     def deleteMessage(self, msgid):
-        'See Zope.I18n.IMessageCatalog.IWriteMessageCatalog'
+        'See IWriteMessageCatalog'
         del self._messages[msgid]
 
     def getMessageIds(self):
-        'See Zope.I18n.IMessageCatalog.IWriteMessageCatalog'
+        'See IWriteMessageCatalog'
         return list(self._messages.keys())
 
     def getMessages(self):
-        'See Zope.I18n.IMessageCatalog.IWriteMessageCatalog'
+        'See IWriteMessageCatalog'
         messages = []
         for message in self._messages.items():
             messages.append({'domain'   : self._domain,
@@ -107,16 +96,6 @@
                              'mod_time' : message[1][1]})
         return messages
 
-    #
-    ############################################################
-
-    ############################################################
-    # Implementation methods for interface
-    # Zope/ComponentArchitecture/IFactory.py
-
     def getInterfaces(self):
-        'See Zope.ComponentArchitecture.IFactory.IFactory'
+        'See IFactory'
         return self.__implements__
-        
-    #
-    ############################################################


=== Zope3/src/zope/app/services/translation/translationservice.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/translation/translationservice.py:1.1.2.1	Mon Dec 23 14:32:25 2002
+++ Zope3/src/zope/app/services/translation/translationservice.py	Tue Dec 24 07:51:19 2002
@@ -60,35 +60,20 @@
         self._catalogs[(language, domain)].remove(catalog_name)
 
 
-    ############################################################
-    # Implementation methods for interface
-    # Zope.App.OFS.Container.IContainer.IWriteContainer
-
     def setObject(self, name, object):
-        'See Zope.App.OFS.Container.IContainer.IWriteContainer'
+        'See IWriteContainer'
         super(TranslationService, self).setObject(name, object)
         self._registerMessageCatalog(object.getLanguage(), object.getDomain(),
                                      name)
         return name
 
     def __delitem__(self, name):
-        'See Zope.App.OFS.Container.IContainer.IWriteContainer'
+        'See IWriteContainer'
         object = self[name]
         super(TranslationService, self).__delitem__(name)
         self._unregisterMessageCatalog(object.getLanguage(),
                                        object.getDomain(), name)
 
-    # end Zope.App.OFS.Container.IContainer.IWriteContainer
-    ############################################################
-
-
-    ############################################################
-    # Implementation methods for interface
-    # Zope.I18n.ITranslationService.ITranslationService
-
-    ######################################
-    # from: Zope.I18n.ITranslationService.IReadTranslationService
-
     def translate(self, domain, msgid, mapping=None, context=None,  
                   target_language=None):
         """See interface ITranslationService"""
@@ -124,13 +109,9 @@
 
         # Now we need to do the interpolation
         return self.interpolate(text, mapping)
-
-
-    ######################################
-    # from: Zope.I18n.ITranslationService.IWriteTranslationService
     
     def getMessageIdsOfDomain(self, domain, filter='%'):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         filter = filter.replace('%', '.*')
         filter_re = re.compile(filter)
         
@@ -145,7 +126,7 @@
 
 
     def getMessagesOfDomain(self, domain):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         messages = []
         languages = self.getAvailableLanguages(domain)
         for language in languages:
@@ -155,7 +136,7 @@
 
 
     def getMessage(self, msgid, domain, language):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         for name in self._catalogs.get((language, domain), []):
             try:
                 return self[name].getFullMessage(msgid)
@@ -164,7 +145,7 @@
         return None
 
     def getAllLanguages(self):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         languages = {}
         for key in self._catalogs.keys():
             languages[key[0]] = None
@@ -172,7 +153,7 @@
 
 
     def getAllDomains(self):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         domains = {}
         for key in self._catalogs.keys():
             domains[key[1]] = None
@@ -180,7 +161,7 @@
 
 
     def getAvailableLanguages(self, domain):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         identifiers = self._catalogs.keys()
         identifiers = filter(lambda x, d=domain: x[1] == d, identifiers)
         languages = map(lambda x: x[0], identifiers)
@@ -188,7 +169,7 @@
 
 
     def getAvailableDomains(self, language):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         identifiers = self._catalogs.keys()
         identifiers = filter(lambda x, l=language: x[0] == l, identifiers)
         domains = map(lambda x: x[1], identifiers)
@@ -196,7 +177,7 @@
         
 
     def addMessage(self, domain, msgid, msg, language, mod_time=None):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         if not self._catalogs.has_key((language, domain)):
             if language not in self.getAllLanguages():
                 self.addLanguage(language)
@@ -209,21 +190,21 @@
 
 
     def updateMessage(self, domain, msgid, msg, language, mod_time=None):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         catalog_name = self._catalogs[(language, domain)][0]
         catalog = self[catalog_name]
         catalog.setMessage(msgid, msg, mod_time)
 
 
     def deleteMessage(self, domain, msgid, language):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         catalog_name = self._catalogs[(language, domain)][0]
         catalog = self[catalog_name]
         catalog.deleteMessage(msgid)
 
 
     def addLanguage(self, language):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         domains = self.getAllDomains()
         if not domains:
             domains = [self.default_domain]
@@ -234,7 +215,7 @@
 
 
     def addDomain(self, domain):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         languages = self.getAllLanguages()
         if not languages:
             languages = ['en']
@@ -245,7 +226,7 @@
 
 
     def deleteLanguage(self, language):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         domains = self.getAvailableDomains(language)
         for domain in domains:
             # Delete all catalogs from the data storage
@@ -256,7 +237,7 @@
             del self._catalogs[(language, domain)]
 
     def deleteDomain(self, domain):
-        'See Zope.I18n.ITranslationService.IWriteTranslationService'
+        'See IWriteTranslationService'
         languages = self.getAvailableLanguages(domain)
         for language in languages:
             # Delete all catalogs from the data storage
@@ -266,12 +247,8 @@
             # Now delete the specifc catalog registry for this lang/domain
             del self._catalogs[(language, domain)]
 
-
-    ######################################
-    # from: Zope.I18n.ITranslationService.ISyncTranslationService
-
     def getMessagesMapping(self, domains, languages, foreign_messages):
-        'See Zope.I18n.ITranslationService.ISyncTranslationService'
+        'See ISyncTranslationService'
         mapping = {}
         # Get all relevant local messages
         local_messages = []
@@ -294,7 +271,7 @@
 
 
     def synchronize(self, messages_mapping):
-        'See Zope.I18n.ITranslationService.ISyncTranslationService'
+        'See ISyncTranslationService'
 
         for value in messages_mapping.values():
             fmsg = value[0]