Go to

http://127.0.0.1:8000/admin/default/design/admin

mind of what you do.

On Feb 20, 7:08 pm, Iceberg <[email protected]> wrote:
> The latest fix to language.py is fine. And your fix to zh-cn.py
> reminds me one more trick, how about changing one more line of
> read_dict() like this?
>
>     try:
>         return dict((k,v) for k,v in eval(lang_text).items()
>             if v) # to strip empty translation
>     except:
>         ...
>
> By the way, if you do feel reluctant to let go zh-cn.py, I can work
> out a full translated version. But, although I know a "full set" of
> strings to be translated can be obtained by clicking "update all
> language" in admin, however there there is no "EDIT" page for appadmin
> itself. So where can I start?
>
> On Feb19, 9:47pm, mdipierro <[email protected]> wrote:
>
> > I fixed what you suggested in trunk, please check it. I did not remove
> > zh-cn.py but I removed those lines that do not have a translation.
>
> > Massimo
>
> > On Feb 19, 7:09 am, Iceberg <[email protected]> wrote:
>
> > > Hi there,
>
> > > I upgrade from web2py 1.74.8 to latest trunk and then my admin can not
> > > login normally, instead it generates error ticket. Tracing down the
> > > bug, I found the reason and cure.
>
> > > 1. Since rev 146, web2py uses the browser's prefer language as the
> > > default language setting. It is good. My browser's prefer language is
> > > "zh-cn" (Chinese), it is also fine. But it happened that the current
> > > Chinese language file, web2py\applications\admin\languages\zh-cn.py,
> > > introduced by Jobinson in rev79 (http://code.google.com/p/web2py/
> > > source/detail?r=063cc48352), is totally unacceptable. It contains the
> > > unmatched-quotation syntax error, besides it does not finish
> > > translation at all, many english strings are "translated" into empty
> > > string, and some others are not translated precisely.
>
> > > So the first suggestion, in my humble opinion, is to delete web2py
> > > \applications\admin\languages\zh-cn.py.  After all, a web2py developer/
> > > user should be able to read all english words in admin app, so no need
> > > to have a non-english version which is not likely to be always
> > > synchronized with the official ones.
>
> > > 2. On the other hand, web2py's core code should be robust, to survive
> > > a language file with syntax error inside (now we know it happens). So
> > > the last line of function read_dict(filename) of web2py/gluon/
> > > languages.py, should change into:
>
> > >     try:
> > >         return eval(lang_text)
> > >     except:
> > >         import logging
> > >         logging.exception('Syntax error in %s'%filename)
> > >         return {}
>
> > > Regards,
> > > Iceberg

-- 
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.

Reply via email to