i18.run_template_filter doesnt work?

1 view
Skip to first unread message

Ksenia Marasanova

unread,
Aug 21, 2006, 4:52:06 AM8/21/06
to turbogea...@googlegroups.com
Hi,

I have a problem with i18 template filter. It seems not to be working.
Assigning translated string to a variable in the same template does
work:

<?python
x = _('sometext')
?>
<div>${x}</div>

renders correct translation,
but:

<div>sometext</div>

does not :(

I had the same problem few months ago and solved it by installing
latest kid plugin [1]. Now I think have the latest version of
everything but it doesnt help. Any ideas? I am a bit in a hurry
because this website must be updated with the new translation real
soon :/.

The project was created with TG 0.8, and updated later for 1.0
branche. Maybe something in the project directory is preventing filter
from working properly?

Thanks for any hints.
Ksenia.


$tg-admin info

TurboGears Complete Version Information

TurboGears requires:

* TurboGears 0.9a9dev-r1781
* nose 0.9.0
* configobj 4.3.2
* RuleDispatch 0.5a0.dev-r2115
* setuptools 0.7a1dev-r46389
* FormEncode 0.5.1
* cElementTree 1.0.5-20051216
* PasteScript 0.9.7
* elementtree 1.2.6
* simplejson 1.3
* SQLObject 0.7.1dev-r1860
* CherryPy 2.2.1
* TurboKid 0.9.8
* TurboCheetah 0.9.5
* TurboJson 0.9.9
* PyProtocols 1.0a0dev-r2082
* Cheetah 2.0rc6
* PasteDeploy 0.4
* Paste 0.4.1
* FormEncode 0.5.1
* kid 0.9.3
* Cheetah 2.0rc6
* elementtree 1.2.6

Identity Providers

* sqlobject (TurboGears 0.9a9dev-r1781)
* sqlalchemy (TurboGears 0.9a9dev-r1781)

tg-admin Commands

* info (TurboGears 0.9a9dev-r1781)
* shell (TurboGears 0.9a9dev-r1781)
* quickstart (TurboGears 0.9a9dev-r1781)
* update (TurboGears 0.9a9dev-r1781)
* sql (TurboGears 0.9a9dev-r1781)
* i18n (TurboGears 0.9a9dev-r1781)
* toolbox (TurboGears 0.9a9dev-r1781)

Visit Managers

* sqlobject (TurboGears 0.9a9dev-r1781)
* sqlalchemy (TurboGears 0.9a9dev-r1781)

Template Engines

* kid (TurboKid 0.9.8)
* cheetah (TurboCheetah 0.9.5)
* json (TurboJson 0.9.9)

Widget Packages

* selectshuttle (Select-Shuttle 0.94)

TurboGears Extensions

* visit (TurboGears 0.9a9dev-r1781)
* identity (TurboGears 0.9a9dev-r1781)
* fastdata (TGFastData 0.9a6)


[1] http://groups.google.com/group/turbogears/browse_thread/thread/edbb33d2d3426f6/0a96c6ec3937fddc

Max Ischenko

unread,
Aug 21, 2006, 5:25:07 AM8/21/06
to turbogea...@googlegroups.com
Hi,

Works for me here on quickstarted project with TG 0.9a9.

I can only suggest you try to quickstart a project and see if it works. If it does then examine differences between you app.cfg/dev.cfg and quickstarted ones. If it doesn't that means package problem with TG, Kid or else.

Max.

Ksenia Marasanova

unread,
Aug 21, 2006, 9:33:13 AM8/21/06
to turbogea...@googlegroups.com
> I can only suggest you try to quickstart a project and see if it works. If it does then examine differences between you app.cfg/dev.cfg and quickstarted ones. If it doesn't that means package problem with TG, Kid or else.
>

Quickstarted project doesnt work either.
Digging into TG/Kid code...

Ksenia.

Ksenia Marasanova

unread,
Aug 21, 2006, 10:27:54 AM8/21/06
to turbogea...@googlegroups.com
Found it:
http://trac.turbogears.org/turbogears/changeset/1728

Because module turbogears is the first thing that gets imported, *all*
Kid configuration variables are accessed too early, before they get
updated from config files.
So the temporaly solution is to move _load_engines() back to _choose_engine()...

Ksenia.

Ksenia Marasanova

unread,
Aug 21, 2006, 11:12:35 AM8/21/06
to turbogea...@googlegroups.com
Still weird that I seem to be the only one with this problem...
Reply all
Reply to author
Forward
0 new messages