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
8f709e6f
Commit
8f709e6f
authored
May 08, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor clean up and reminder to get rid of GTS asap.
parent
2ee02601
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lib/python/Products/PageTemplates/GlobalTranslationService.py
...python/Products/PageTemplates/GlobalTranslationService.py
+4
-3
No files found.
lib/python/Products/PageTemplates/GlobalTranslationService.py
View file @
8f709e6f
...
@@ -15,12 +15,11 @@
...
@@ -15,12 +15,11 @@
$Id$
$Id$
"""
"""
import
re
import
re
import
Products.Five.i18n
import
Products.Five.i18n
from
DocumentTemplate.DT_Util
import
ustr
from
DocumentTemplate.DT_Util
import
ustr
from
TAL.TALD
efs
import
NAME_RE
from
zope.tal.tald
efs
import
NAME_RE
class
DummyTranslationService
:
class
DummyTranslationService
:
"""Translation service that doesn't know anything about translation."""
"""Translation service that doesn't know anything about translation."""
...
@@ -30,13 +29,15 @@ class DummyTranslationService:
...
@@ -30,13 +29,15 @@ class DummyTranslationService:
return
ustr
(
mapping
[
m
.
group
(
m
.
lastindex
)])
return
ustr
(
mapping
[
m
.
group
(
m
.
lastindex
)])
cre
=
re
.
compile
(
r'\
$(?:(%s)|
\{(%s)\
})
' % (NAME_RE, NAME_RE))
cre
=
re
.
compile
(
r'\
$(?:(%s)|
\{(%s)\
})
' % (NAME_RE, NAME_RE))
return cre.sub(repl, default or msgid)
return cre.sub(repl, default or msgid)
# XXX Not all of Zope2.I18n.ITranslationService is implemented.
#
#
# As of Five 1.1, we'
re
by
default
using
Zope
3
Message
Catalogs
for
# As of Five 1.1, we'
re
by
default
using
Zope
3
Message
Catalogs
for
# translation, but we allow fallback translation services such as PTS
# translation, but we allow fallback translation services such as PTS
# and Localizer
# and Localizer
#
#
# TODO We should really deprecate Zope2-style translation service and
# only support Zope3-style i18n in the future.
#
Products
.
Five
.
i18n
.
_fallback_translation_service
=
DummyTranslationService
()
Products
.
Five
.
i18n
.
_fallback_translation_service
=
DummyTranslationService
()
fiveTranslationService
=
Products
.
Five
.
i18n
.
FiveTranslationService
()
fiveTranslationService
=
Products
.
Five
.
i18n
.
FiveTranslationService
()
...
...
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