KID template i18n

0 views
Skip to first unread message

Diez B. Roggisch

unread,
Dec 11, 2006, 1:31:28 PM12/11/06
to turbo...@googlegroups.com
Hi,

I'm having troubles bringing i18n with KID up and running. Well, actually it
is up and running, but doesn't do anything. The

tg-admin i18n collect

processes my template properly, at least it doesn't complain. But there are no
strings created that reflect text in my templates.

But even when I add them - and turn on the filter of course - nothing happens.

Any suggestions? I'm on TG 1.0b1.


--
>> Diez B. Roggisch
>> Developer

T +49 (30) 443 50 99 - 27
F +49 (30) 443 50 99 - 99
M +49 (179) 11 75 303
E diez.r...@artnology.com


>> artnology GmbH

A Milastraße 4 / D-10437 Berlin
T +49 (30) 443 50 99 - 0
F +49 (30) 443 50 99 - 99
E in...@artnology.com
I http://www.artnology.com

Diez B. Roggisch

unread,
Dec 11, 2006, 1:55:05 PM12/11/06
to turbo...@googlegroups.com
> I'm having troubles bringing i18n with KID up and running. Well, actually
> it is up and running, but doesn't do anything. The
>
> tg-admin i18n collect
>
> processes my template properly, at least it doesn't complain. But there are
> no strings created that reflect text in my templates.
>
> But even when I add them - and turn on the filter of course - nothing
> happens.

I investigated the i18n command, and it appears that only those parts of a KID
template that are surrounded by

${_()}

are supposed to work. And that is clearly in violation to the i18n-docs:

"""
Handling text strings in Kid templates is somewhat easier. If you set the
cherrypy configuration setting i18n.run_template_filter to True, all text
inside your Kid templates will be passed through _() automatically. The user
locale (see below) can be overriden in your template by using the lang
attribute. For example:
"""

http://docs.turbogears.org/1.0/Internationalization

So - it seems that stuff is somewhat non-working. I'd be willing to put some
effort into it, my primary concern is the automatic filtering: I've found a
bit of configuration file handling in

turbogears/view/base.py

but no actual filter. Is this part of KID itself, or is this thing just
missing? Any pointers?

Diez

Diez B. Roggisch

unread,
Dec 11, 2006, 2:20:20 PM12/11/06
to turbo...@googlegroups.com
>
> So - it seems that stuff is somewhat non-working. I'd be willing to put
> some effort into it, my primary concern is the automatic filtering: I've
> found a bit of configuration file handling in
>
> turbogears/view/base.py
>
> but no actual filter. Is this part of KID itself, or is this thing just
> missing? Any pointers?

Ok, I dug further, and it appears that at least the filtering won't work, for
the same reason Ksenia Marasanova already found out:

http://groups.google.com/group/turbogears-trunk/browse_thread/thread/eb8bfd02311e43db/c9da916d45b17565

Undoing the mentionend changeset did the trick for the filtering for me.

And I also made the i18n-command work, but it will collect a great deal of
stuff now - especially all the KID-commands. I'll see if I can enhance it.

Diez

Og Maciel

unread,
Dec 11, 2006, 2:25:39 PM12/11/06
to turbo...@googlegroups.com
On 12/11/06, Diez B. Roggisch <diez.r...@artnology.com> wrote:
> And I also made the i18n-command work, but it will collect a great deal of
> stuff now - especially all the KID-commands. I'll see if I can enhance it.

Great work! I'd definitely be very interested to know when/if you
ever get the KID pages to render in a different language.

Cheers,
--
Og B. Maciel

(Leader) Ubuntu Brazilian Portuguese Translators

Interessado em aprender mais sobre o Ubuntu em português? Comece
aqui: http://wiki.ubuntubrasil.org/ComeceAqui!

ogma...@ubuntu.com
ogma...@ubuntubrasil.org
og.m...@gmail.com

GPG Keys: D5CFC202

http://www.ogmaciel.com (en_US)
http://blog.ogmaciel.com (pt_BR)

Reply all
Reply to author
Forward
0 new messages