2009/12/15 Yarko Tymciurak <[email protected]>:
>
> If the string argument of T is Italian, then how I expect this to work
> is this: [.....] That is all.
This is clear, I have sentences in italian and i have 2 files
--> it.py
'Ciao Mondo':'Ciao Mondo'
--> en.py
'Ciao Mondo':'Hello World'
and in some view I have T('Ciao Mondo')
My hope is that I see 'Hello World' when browser accept_language in
pointed on en, 'Ciao Mondo' if I request it and 'Ciao Mondo' (please
read this as the dict key and not as a translation) when no lang or
uknown lang is submitted
I'm wrong?
> In the past, web2py would look for http_accept, and serve the first
> languages/*.py file that was found, or NONE if none was found.
>
> This was a BUG because (for example) if a client had an
> accept_language sequence as ['en', 'it'] and there was no languages/
> en.py, but there was it.py, then Italian was ALWAYS served, EVEN when
> the argument language to the T('This is an english source string')
> was english.
Ok, this is definitely a bug :)
> The problem was that there was not concept of source language for the
> application; this was added, and the default of 'en' set.
>
> Now, if you simply declare "My T() strings are 'it'!" all will work
> as it should.
>
>>
>> 2) If I use the old 1.65.1 (rev 992) all seems to work properly, but I
>> have another problem. I wrote a python script to completely wget all
>> pages (production server doesn't have python, so i have to put on it
>> only html/css/js) and always works if I have only one language. If I
>> have both en.py and it.py strange behaviour appear. The most annoying
>> thing is that the language file is "corrupted" by web2py, in it i can
>> see a comment reporting that the file is utf8 and an open curly
>> bracket ( '{' ).
>> Seems that web2py opens the file but for some reason fail when write
>> to it
>
> Can you share your script?
Not at this moment (I hope soon).
Trying to summarize there were a list of url and a pool of thread that
simply get (using the command line tool wget) pages and write them to
disk
With the old version sometimes file it.py became corrupt with only '{'
in it. As I have wrote I think this was solved with the lock
introduced in newer version of gluon/langages.py
Thank you
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en.