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
f07a7db5
Commit
f07a7db5
authored
Mar 02, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some cleanup
parent
44f1fd05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
lib/python/Products/PageTemplates/Engine.py
lib/python/Products/PageTemplates/Engine.py
+19
-12
No files found.
lib/python/Products/PageTemplates/Engine.py
View file @
f07a7db5
# Common Engine for Zope3-ZPT-in-Zope-2
# Common Engine for Zope3-ZPT-in-Zope-2
from
GlobalTranslationService
import
getGlobalTranslationService
from
zope.tales.tales
import
ExpressionEngine
from
zope.tales.tales
import
ExpressionEngine
from
zope.tales.expressions
import
PathExpr
,
StringExpr
,
NotExpr
,
DeferExpr
,
SubPathExpr
from
zope.tales.expressions
import
PathExpr
,
StringExpr
,
NotExpr
,
DeferExpr
,
SubPathExpr
from
zope.tales.expressions
import
SimpleModuleImporter
,
_marker
from
zope.tales.expressions
import
SimpleModuleImporter
,
_marker
from
zope.tales.pythonexpr
import
PythonExpr
from
zope.tales.pythonexpr
import
PythonExpr
from
zope.tales.tales
import
_valid_name
,
_parse_expr
,
NAME_RE
,
Undefined
from
zope.tales.tales
import
_valid_name
,
_parse_expr
,
NAME_RE
,
Undefined
,
Context
from
zope.i18n
import
translate
GTS
=
getGlobalTranslationService
()
def
BoboTraverseAwareSimpleTraverse
(
object
,
path_items
,
econtext
):
def
BoboTraverseAwareSimpleTraverse
(
object
,
path_items
,
econtext
):
...
@@ -51,21 +55,24 @@ class PathExpr(PathExpr):
...
@@ -51,21 +55,24 @@ class PathExpr(PathExpr):
break
break
add
(
SubPathExpr
(
path
,
traverser
,
engine
).
_eval
)
add
(
SubPathExpr
(
path
,
traverser
,
engine
).
_eval
)
from
zope.tales.tales
import
Context
from
zope.i18n
import
translate
class
Context
(
Context
):
class
Context
(
Context
):
def
translate
(
self
,
msgid
,
domain
=
None
,
mapping
=
None
,
default
=
None
):
def
translate
(
self
,
msgid
,
domain
=
None
,
mapping
=
None
,
default
=
None
):
# fix that
# import pdb
return
msgid
# pdb.set_trace()
# return translate(msgid, domain, mapping,
return
GTS
.
translate
(
msgid
,
domain
,
mapping
,
# context=context, default=default)
context
=
self
.
contexts
[
'context'
],
default
=
default
)
def
translate
(
self
,
domain
,
msgid
,
mapping
=
None
,
context
=
None
,
target_language
=
None
,
default
=
None
):
if
context
is
None
:
context
=
self
.
contexts
.
get
(
'here'
)
return
getGlobalTranslationService
().
translate
(
domain
,
msgid
,
mapping
=
mapping
,
context
=
context
,
default
=
default
,
target_language
=
target_language
)
class
ExpressionEngine
(
ExpressionEngine
):
class
ExpressionEngine
(
ExpressionEngine
):
...
...
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