projects
/
Portfolio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Passage de la taille du batch de photos de 20 à 50, avec 5 d'orphelins.
[Portfolio.git]
/
utils.py
diff --git
a/utils.py
b/utils.py
index
4ee5520
..
56ceb30
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-12,7
+12,7
@@
"""
from AccessControl import ModuleSecurityInfo
"""
from AccessControl import ModuleSecurityInfo
-from
Products.PageTemplates.GlobalTranslationService import getGlobalTranslationServic
e
+from
zope.i18n import translate as i18ntranslat
e
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.Portfolio.utils')
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.Portfolio.utils')
@@
-24,10
+24,11
@@
security.declarePublic('translate')
def translate(message, context):
""" Translate i18n message.
"""
def translate(message, context):
""" Translate i18n message.
"""
- GTS = getGlobalTranslationService()
+ # TODO: touver une solution.
+ # GTS = getGlobalTranslationService()
if isinstance(message, Exception):
try:
message = message[0]
except (TypeError, IndexError):
pass
if isinstance(message, Exception):
try:
message = message[0]
except (TypeError, IndexError):
pass
- return
GTS.translate('portfolio', message, context=context
)
+ return
i18ntranslate(message, domain='photoprint', context=context.REQUEST
)