Re: [patch] Refactor: clipboard, translations, jasmine

From: Atira Odhner <aodhner(at)pivotal(dot)io>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Refactor: clipboard, translations, jasmine
Date: 2017-03-10 14:53:33
Message-ID: CA+Vc24qeOehFH8NLD6SXNeNN7BR1vanaE1f_76WdxNhOSzPhYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pgadmin(dot)org> wrote:

> Hi
>
> On Thu, Mar 9, 2017 at 9:56 PM, Atira Odhner <aodhner(at)pivotal(dot)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
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Juliano 2017-03-10 14:58:14 Re: PgAdmin4 jobs pgagent "run now" option
Previous Message Khushboo Vashi 2017-03-10 13:55:52 [pgAdmin4][Patch]: Fixed 2190 - Move language selection to Preferences.