From: | Sarah McAlear <smcalear(at)pivotal(dot)io> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Atira Odhner <aodhner(at)pivotal(dot)io>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: Javascript translations |
Date: | 2017-03-27 18:06:10 |
Message-ID: | CAGRPzo-m=3KyhVx+=xSUiR9Y4bhfU58nwAErcaH=TJRB24C1Pw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Hackers,
Sorry about that, we attached the wrong patch file. Attaching the correct
one
Thanks
Joao & Sarah
On Mon, Mar 27, 2017 at 1:58 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Hi
>
> On Mon, Mar 27, 2017 at 11:33 AM, Sarah McAlear <smcalear(at)pivotal(dot)io>
> wrote:
> > Hi Hackers!
> >
> > We updated the documentation and included the ability to generate the
> > messages.pot files again. We changed the file and function from
> translate.js
> > to gettext.js to be consistent with Python and also to have it
> automatically
> > picked up without having to add extensions to Pybabel. See patch
> attached.
>
> This doesn't seem to work so well - message extraction now crashes on
> various JS files, possibly because babel.cfg treats them as Python not
> Javascript. For example:
>
> extracting messages from
> pgadmin/browser/static/vendor/aciTree/jquery.aciTree.core.js
> (extensions="jinja2.ext.autoescape,jinja2.ext.with_")
> Traceback (most recent call last):
> File "/Users/dpage/.virtualenvs/pgadmin4/bin/pybabel", line 11, in
> <module>
> sys.exit(main())
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/frontend.py",
> line 1151, in main
> return CommandLineInterface().run(sys.argv)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/frontend.py",
> line 665, in run
> return getattr(self, cmdname)(args[1:])
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/frontend.py",
> line 919, in extract
> for filename, lineno, message, comments, context in extracted:
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/extract.py",
> line 163, in extract_from_dir
> strip_comment_tags):
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/extract.py",
> line 190, in extract_from_file
> strip_comment_tags))
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/extract.py",
> line 267, in extract
> for lineno, funcname, messages, comments in results:
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/babel/messages/extract.py",
> line 359, in extract_python
> for tok, value, (lineno, _), _, _ in tokens:
> File "/System/Library/Frameworks/Python.framework/Versions/2.7/
> lib/python2.7/tokenize.py",
> line 363, in generate_tokens
> raise TokenError, ("EOF in multi-line statement", (lnum, 0))
> tokenize.TokenError: ('EOF in multi-line statement', (2545, 0))
>
> The update should probably also ignore node_modules and static/vendor
> directories.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachment | Content-Type | Size |
---|---|---|
0001-Changed-untemplated-translate-to-be-picked-up-with-t.patch | application/octet-stream | 91.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Atira Odhner | 2017-03-27 18:09:43 | Re: Feature test regression failures |
Previous Message | Dave Page | 2017-03-27 17:58:13 | Re: Javascript translations |