Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
39105ee6
Commit
39105ee6
authored
Jul 28, 2007
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not attempt to acquire REQUEST from the context, when we already got a request as the context.
parent
72b16754
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/python/Products/Five/i18n.py
lib/python/Products/Five/i18n.py
+5
-1
No files found.
lib/python/Products/Five/i18n.py
View file @
39105ee6
...
...
@@ -23,6 +23,7 @@ from zope.i18n.interfaces import IUserPreferredLanguages
from
zope.i18n.negotiator
import
normalize_lang
from
zope.component
import
queryUtility
from
zope.i18nmessageid
import
Message
from
zope.publisher.interfaces.browser
import
IBrowserRequest
class
FiveTranslationService
:
...
...
@@ -60,7 +61,10 @@ class FiveTranslationService:
# in Zope3, context is adapted to IUserPreferredLanguages,
# which means context should be the request in this case.
# Do not attempt to acquire REQUEST from the context, when we already
# got a request as the context
if
context
is
not
None
:
if
not
IBrowserRequest
.
providedBy
(
context
):
context
=
aq_acquire
(
context
,
'REQUEST'
,
None
)
return
util
.
translate
(
msgid
,
mapping
=
mapping
,
context
=
context
,
target_language
=
target_language
,
default
=
default
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment