Re: Javascript translations

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>, Matthew Kleiman <mkleiman(at)pivotal(dot)io>
Subject: Re: Javascript translations
Date: 2017-03-28 18:04:40
Message-ID: CAGRPzo_Jy=+rHX5nn5tzysi_aPobaL5edphiYDqUHKX_t5en6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

There should be 2 additional lines in the babel.cfg file. We can see them
when we download the patch from the email. The additional lines are

+[javascript: **/templates/about/**.js]
+[javascript: **/templates/dashboard/**.js]

Thanks!

On Tue, Mar 28, 2017 at 1:56 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> Was that the correct patch? I don't see the changes you describe.
>
> On Tue, Mar 28, 2017 at 12:29 PM, Sarah McAlear <smcalear(at)pivotal(dot)io>
> wrote:
> > Good catch. We looked into this and it appears that the language
> > interpretation that is defined in the babel.cfg only picks up one
> definition
> > per file. Since we are in the process of moving things over to the new
> > gettext() functionality, it looks like we will have to be more specific
> in
> > the config file for now. Whichever path gets defined first is the
> > interpreter that will be used for that file. We updated the config file
> and
> > included dashboard.js and about.js more specifically. They are now being
> > interpreted using Javascript. When we are done moving other files over we
> > should be able to eliminate some of the configuration again. Here's a new
> > patch that should fix this.
> >
> > Thanks,
> > Matt & Sarah
> >
> >
> >
> > On Mon, Mar 27, 2017 at 9:19 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> >>
> >> Hi
> >>
> >> On Mon, Mar 27, 2017 at 2:06 PM, Sarah McAlear <smcalear(at)pivotal(dot)io>
> >> wrote:
> >> > Hi Hackers,
> >> > Sorry about that, we attached the wrong patch file. Attaching the
> >> > correct
> >> > one
> >>
> >> It no longer errors, but it's still not working correctly - after
> >> running an extract, there are no strings from about.js or dashboard.js
> >> in the resulting template. I wonder if that's because they are still
> >> templates (and thus use the Jinja2 extractor), but are using client
> >> side translation?
> >>
> >> --
> >> Dave Page
> >> Blog: http://pgsnake.blogspot.com
> >> Twitter: @pgsnake
> >>
> >> EnterpriseDB UK: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >
> >
>
>
>
> --
> 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 Dave Page 2017-03-28 19:22:03 pgAdmin 4 commit: Fix translation extraction for new client side transl
Previous Message Dave Page 2017-03-28 17:56:31 Re: Javascript translations