#1049: i18n_filter can't translate text with python expressions
----------------------------------+-----------------------------------------
Reporter: ulysses | Owner: Chris Arndt
Type: defect | Status: closed
Priority: normal | Milestone: 1.1
Component: TurboGears | Version: 0.9a6
Severity: normal | Resolution: wontfix
Keywords: i18n i18n_filter kid |
----------------------------------+-----------------------------------------
Changes (by chrisz):
* status: assigned => closed
* resolution: => wontfix
* severity: major => normal
Comment:
As of 2009-02-15 (already since r3558, TG 1.0.3.3), the issue doesn't
exist any more in this form since text containing such Python expressions
is not even collected and does not appear in the .pot file anyway.
More precisely, TG has two different ways of collecting strings, namely
through the toolbox and through tg-admin i18n. In the former case, the
strings are collected with toolbox.admin18n.pygettext, where text
containing such expressions is excluded by checking with the
`__contains_inline_python` method. In the latter case, the strings are
collected with command.i18n, and here in `scan_kid_files` text with inline
expressions is filtered out and a "Mixed content" warning is printed.
The situation is similar with Genshi, though here in the latter case the
method `scan_genshi_files` is used which does not skip completely over
text with expressions, but keeps the non-expression parts.
So what really needs to be done is the following: Merge the two different
ways of collecting strings (which both are flawed in different ways) to
one way that is implemented correctly. Only then we should solve the issue
of translating text with such expressions correctly.
If anybody cares to get this fixed in TG 1.x, please open a new ticket for
the 1.x milestone requesting proper string collection first. In TG 2.0,
string extraction is delegated to Babel anyway, so for me it does not seem
worth wile to spend much time with this any more.
--
Ticket URL: <http://trac.turbogears.org/ticket/1049#comment:7>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---