projects
/
photoprint.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Utilisation de la taille du batch par défaut.
[photoprint.git]
/
utils.py
diff --git
a/utils.py
b/utils.py
index
3344d57
..
b3fc3c7
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-11,13
+11,13
@@
"""
Global utilities
"""
Global utilities
-$Id: utils.py 651 2009-02-04 15:38:20Z pin $
-$URL: http://svn.luxia.fr/svn/labo/projects/zope/photoprint/trunk/utils.py $
+
+
"""
from AccessControl import ModuleSecurityInfo
# TODO: trouver une solution…
"""
from AccessControl import ModuleSecurityInfo
# TODO: trouver une solution…
-
#from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationServic
e
+
from zope.i18n import translate as i18ntranslat
e
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.photoprint.utils')
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.photoprint.utils')
@@
-32,8
+32,7
@@
def translate(message, context):
message = message[0]
except (TypeError, IndexError):
pass
message = message[0]
except (TypeError, IndexError):
pass
- return message
- return GTS.translate('photoprint', message, context=context)
+ return i18ntranslate(message, domain='photoprint', context=context.REQUEST)
security.declarePublic('Message')
Message = _ = MessageFactory('photoprint')
security.declarePublic('Message')
Message = _ = MessageFactory('photoprint')