I'm still struggling with the javascript translation problem, so it
seems like I'm forced to pull it out of the project I'm working on. If
anybody has any input I'm still interested.

-Lau

On Nov 24, 3:39 am, Lau <lau.laurit...@gmail.com> wrote:
> I'm having some trouble with makemessages failing while parsing my
> javascript files. I'm running it with domain set todjangojsand it's
> successfully finding all my javascript files but keeps halting during
> the parsing.
>
> I did a bit of debugging in the makemessages command (Django version
> 1.2.1 and trunk) and found that when running indjangojsmode it
> pythonizes the javascript files with pythonize_re.sub('\n#', src), but
> then runs the xgettext shell command with language "Perl". Why is
> this?
>
> The javascript code it's bailing out on is stuff like this:
>
>   message.css("margin-left", -1*message.width()/2);
>   $(".action", form).val(id ? "change" : "create");
>
> The outcome is a bit random, for some javascript functions the parser
> just skips the function, which also skips the gettext calls in it, and
> at other times it just breaks out of the whole file with no further
> processing. So I'm not entirely sure what the makemessages command is
> supposed to be doing ("converting" the javascript to python and
> running xgettext on it as if it were perl?).
>
> Any clarification on this would be great, thanks!
>
> -Lau

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to