could you try to update to the trunk, and see if that solves your problem?

On 7/27/06, Ulysses Almeida <[EMAIL PROTECTED]> wrote:
>
>   I just upgrade my TG-0.9a6 to TG-0.9a8 pretending to solve an i18n
> problem with kid. But now, when I run tg-admin i18n collect, it stops
> on every single gettext string, some times with EOL exception some
> times with InvalidSyntax exception. I removed every gettext string I
> wrote and left only ones created with tg-admin quickstart. When I let
> only with strings create with tg-admin quickstart, it shows-me
> InvalidSyntax exception.
>   Is that a problem on tg-admin 0.9a8 or I'm doing something dumb with my 
> code?
>
>   code example (relevant part from menu.py):
> <code>
>     itens = []
>     itens.append(MenuItem(_("MCS"), "/", level=0,
>                           description = _("Milenium Control System")))
>     itens.append(MenuItem(_("Close"), "/logout",
>                           level=10, prio = 0,
>                           description = _("Close this session")))
>
> <code>
>
>   command line output:
> # tg-admin i18n collect
> Scanning source directory mcs
> Working on mcs/__init__.py
> Working on mcs/json.py
> Working on mcs/release.py
> Working on mcs/model.py
> Working on mcs/menu.py
> Traceback (most recent call last):
>   File "/usr/bin/tg-admin", line 7, in ?
>     sys.exit(
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/command/base.py",
> line 346, in main
>     command.run()
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/command/i18n.py",
> line 119, in run
>     self.scan_source_files()
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/command/i18n.py",
> line 189, in scan_source_files
>     pygettext.main()
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/toolbox/admi18n/pygettext.py",
> line 724, in main
>     tokenize.tokenize(fp.readline, eater)
>   File "/usr/lib/python2.4/tokenize.py", line 153, in tokenize
>     tokenize_loop(readline, tokeneater)
>   File "/usr/lib/python2.4/tokenize.py", line 160, in tokenize_loop
>     tokeneater(*token_info)
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/toolbox/admi18n/pygettext.py",
> line 394, in __call__
>     self.__state(ttype, tstring, stup[0])
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/toolbox/admi18n/pygettext.py",
> line 445, in __openseen
>     self.__addentry(EMPTYSTRING.join(self.__data))
>   File 
> "/usr/lib/python2.4/site-packages/TurboGears-0.9a8-py2.4.egg/turbogears/toolbox/admi18n/pygettext.py",
> line 469, in __addentry
>     msg = eval(repr(msg)[1:])
>   File "<string>", line 1
>     MCS'
>       ^
> SyntaxError: EOL while scanning single-quoted string
>
>   I don't know why it calls single-quoted string if on code its double-quoted.
>
>   Thanks in advance.
>
> --
>  - Ulysses Almeida
>
> >
>


-- 
cheers
    elvelind grandin

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

Reply via email to