Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine - Mailing list pgadmin-hackers
From | Atira Odhner |
---|---|
Subject | Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine |
Date | |
Msg-id | CA+Vc24qeOehFH8NLD6SXNeNN7BR1vanaE1f_76WdxNhOSzPhYQ@mail.gmail.com Whole thread Raw |
In response to | Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine
(Dave Page <dpage@pgadmin.org>)
|
List | pgadmin-hackers |
Actually that's not an issue - the package builds will (in most cases
now) remove the test directories, and will only include files that are
in GIT anyway. Please move everything under web/regression as right
now it's cluttering up the root directory which doesn't make sense as
it only applies to the web/ code.
I just did a build and saw python tests showing up in the mac-build folder, before the dmg is created. Can you point out where the exclusion of test directories is supposed to happen during the dmg build process so I can check that it works in this case?
Thanks,
Tira
On Fri, Mar 10, 2017 at 5:30 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi
On Thu, Mar 9, 2017 at 9:56 PM, Atira Odhner <aodhner@pivotal.io> wrote:
> Hi Dave,
>
> We've split these changes up into separate patches, added docs, pulled
> jasmine out of the packaged app, and enabled running from the commandline:
>
> Add jasmine
> - it runs with karma from the commandline
> - it is outside of the /web folder so that tests and test dependencies
> are excluded from the packaged app.
Actually that's not an issue - the package builds will (in most cases
now) remove the test directories, and will only include files that are
in GIT anyway. Please move everything under web/regression as right
now it's cluttering up the root directory which doesn't make sense as
it only applies to the web/ code.
>
> Enable refactoring javascript with translations:
> - Create a translations.js and translate.js which uses flask to pull in
> translations, but
> lets us have the flask template rendering confined to that one
> file,
> enabling us to test javascript files that rely on translations
OK.
> Refactor copying text to clipboard into a separate file (this
> demonstrates use of translate.js)
I would have applied that, except that it relied on the tests :-(
> remove some dead code from sqleditor
Thanks, I've applied that.
> Change quotes in sqleditor to make it valid js independent of flask (it
> makes our IDE happy)
>
>> - The changes to the translation mechanism need discussion. How will
>> it work? What do developers have to do differently? When will the
>> changes it allows be implemented?
>
>
> Instead of using flask to render translations into javascript, developers
> will need to require "translate" and use it in much the same way as the
> flask _ method. So, for example, translate("My name is %(name)s.", {name:
> "Tira"}) would replace {{ _("My name is %(name)s.", {name: "Tira"}) }}
OK.
> We would like to start on these changes right away! We refactored the
> clipboard functionality out of sqleditor.js and used this translate
> functionality. The resulting file is now testable javascript.
If you can update the location of the files per my comment above, I
can get it committed. Note that the update to libraries.txt is no
longer needed, as we will neither include the additional JS modules in
the GIT repo or packages.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
pgadmin-hackers by date: