Hi Christoph,
I am using TG 1.0 (SVN) but I have applied the TG 1.1 #1461 patch to
it. And actually I decided not to use the symlinks for the collection
since I could just make a one line change to command/i18n.py to make
TG collect strings from .html files as well as .kid files. So why not
just upgrade to 1.1? I will be upgrading within the next 6 months but
I would like to upgrade directly to 2.0.
Another issue is that I made a change to the google translation
function since the JSON is sometimes containing a list. I am however
not sure whether my approach is good. Should I create a ticket for
this or will it do with the diff below?
--- i18n/utils.py (revision 6549)
+++ i18n/utils.py (working copy)
@@ -31,6 +31,8 @@
text = TGURLopener().open(
'http://translate.google.com/translate_a/t', params).read()
text = simplejson.loads(text)
+ if isinstance(text, list):
+ text = text[0]
if not has_nbsp:
text = text.replace(u'\xa0', ' ')
return text
Best regards,
Jesper
On Apr 7, 6:38 pm, Christoph Zwerschke <[email protected]> wrote:
> jlar schrieb:
>
> > Oh, the Javascript strings are already translated. I missed that,
> > sorry. So my only remaining question is how to persuade TG 1 to
> > translate my Genshi templates. I found that a simple symbolic link
> > from my Genshi .html files to .kid files is a work-around.
>
> Did you use TG 1.0 or 1.1? If it does not work with TG 1.1, then please
> create a ticket for this.
>
> -- Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---