projects
/
photoprint.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bddfc31
)
désactivation de la localisation, en attendant de trouvel une solution.
author
Benoît Pin
<benoit.pin@gmail.com>
Mon, 25 Oct 2010 22:10:56 +0000
(
00:10
+0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Mon, 25 Oct 2010 22:10:56 +0000
(
00:10
+0200)
utils.py
patch
|
blob
|
history
diff --git
a/utils.py
b/utils.py
index
9f4fb8a
..
3344d57
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-16,7
+16,8
@@
$URL: http://svn.luxia.fr/svn/labo/projects/zope/photoprint/trunk/utils.py $
"""
from AccessControl import ModuleSecurityInfo
"""
from AccessControl import ModuleSecurityInfo
-from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
+# TODO: trouver une solution…
+#from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.photoprint.utils')
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.photoprint.utils')
@@
-25,12
+26,13
@@
security.declarePublic('translate')
def translate(message, context):
""" Translate i18n message.
"""
def translate(message, context):
""" Translate i18n message.
"""
- GTS = getGlobalTranslationService()
+
#
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 message
return GTS.translate('photoprint', message, context=context)
security.declarePublic('Message')
return GTS.translate('photoprint', message, context=context)
security.declarePublic('Message')