projects
/
Portfolio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b14b0bd
)
Résolu : problème de localisation avec zope-2.12.
author
Benoît Pin
<benoit.pin@gmail.com>
Tue, 26 Oct 2010 14:20:06 +0000
(16:20 +0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Tue, 26 Oct 2010 14:20:06 +0000
(16:20 +0200)
utils.py
patch
|
blob
|
history
diff --git
a/utils.py
b/utils.py
index
26ed830
..
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')
@@
-31,5
+31,4
@@
def translate(message, context):
message = message[0]
except (TypeError, IndexError):
pass
message = message[0]
except (TypeError, IndexError):
pass
- return message
- return GTS.translate('portfolio', message, context=context)
+ return i18ntranslate(message, domain='photoprint', context=context.REQUEST)