[Zope3-checkins] CVS: Zope3/src/zope/app/services/translation -
translationservice.py:1.16
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Mar 2 12:49:27 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/services/translation
In directory cvs.zope.org:/tmp/cvs-serv28333/src/zope/app/services/translation
Modified Files:
translationservice.py
Log Message:
Completed making the language negotiator a utility.
Make sure the translation service is looking for a utility as well.
=== Zope3/src/zope/app/services/translation/translationservice.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/services/translation/translationservice.py:1.15 Fri Feb 20 17:02:32 2004
+++ Zope3/src/zope/app/services/translation/translationservice.py Tue Mar 2 12:49:26 2004
@@ -25,6 +25,7 @@
from zope.app.interfaces.services.translation import ILocalTranslationService
from zope.app.services.servicenames import Translation
from zope.i18n.negotiator import negotiator
+from zope.i18n.interfaces import INegotiator
from zope.i18n.simpletranslationservice import SimpleTranslationService
from zope.interface import implements
from zope.app.container.contained import Contained
@@ -73,7 +74,7 @@
if target_language is None and context is not None:
avail_langs = self.getAvailableLanguages(domain)
# Let's negotiate the language to translate to. :)
- negotiator = zapi.getService(self, 'LanguageNegotiation')
+ negotiator = zapi.getUtility(self, INegotiator)
target_language = negotiator.getLanguage(avail_langs, context)
# Get the translation. Default is the source text itself.
More information about the Zope3-Checkins
mailing list