Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed 2190 - Move languageselection to Preferences. - Mailing list pgadmin-hackers

From Khushboo Vashi
Subject Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed 2190 - Move languageselection to Preferences.
Date
Msg-id CAFOhELednsERbfOo7c3Smbdfs+mQrx9xm_P4mi9CwNWnxCYbGw@mail.gmail.com
Whole thread Raw
In response to Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed 2190 - Move languageselection to Preferences.  (Dave Page <dpage@pgadmin.org>)
Responses Re: [pgAdmin4][Patch]: Fixed 2190 - Move languageselection to Preferences.  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Hi,

Please find the attached updated patch.

Thanks,
Khushboo

On Fri, Mar 17, 2017 at 6:02 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, Mar 17, 2017 at 12:17 PM, Khushboo Vashi
<khushboo.vashi@enterprisedb.com> wrote:
> Hi,
>
> Please find the attached updated patch.
>
> Thanks,
> Khushboo
>
> On Fri, Mar 17, 2017 at 4:20 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Fri, Mar 17, 2017 at 10:25 AM, Khushboo Vashi
>> <khushboo.vashi@enterprisedb.com> wrote:
>> > Hi,
>> >
>> > On Mon, Mar 13, 2017 at 4:09 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> Hi
>> >>
>> >> On Fri, Mar 10, 2017 at 1:55 PM, Khushboo Vashi
>> >> <khushboo.vashi@enterprisedb.com> wrote:
>> >> > Hi,
>> >> >
>> >> > Please find the attached patch for #2190: Move language selection to
>> >> > Preferences.
>> >> >
>> >> > Moved the user language selection into Preferences.
>> >> >
>> >> > For the desktop mode, if the user has selected the language from the
>> >> > Preferences then that will be reflected otherwise English will be the
>> >> > default language.
>> >> > For the server mode, we have given an option on the log-in page to
>> >> > choose
>> >> > the language. We drop the cookie for the selected language and also
>> >> > update
>> >> > the preferences for the same.
>> >> > So, the app will be loaded with the language which the user has
>> >> > selected
>> >> > on
>> >> > the log-in page.
>> >> > If the user will change the language from the preferences, then the
>> >> > cookie
>> >> > will be changed and also this change will be reflected on the log-in
>> >> > page
>> >> > next time.
>> >>
>> >> I found some issues with this patch - though it's possible those
>> >> issues existed previously in some, perhaps all cases:
>> >>
>> >> - The Polish translation has a bug in it that causes a syntax error in
>> >> sqleditor.js. I fixed that with:
>> >>
>> >> -msgstr "Całkowity czas wykonania zapytania: %s\n"
>> >> +msgstr "Całkowity czas wykonania zapytania: %s"
>> >>
>> >> - If I choose a language for the first time at login, then the
>> >> top-level menu bar isn't translated. If I completely refresh the page,
>> >> then that is resolved. We haven't loaded the main page at this point I
>> >> don't think, so I wouldn't expect to see this (though, maybe it is
>> >> being cached so we need to ensure it gets invalidated)?
>> >>
>> > This was my code issue which I have fixed now.
>> > When we receive the first request (after hitting Login button), I have
>> > set
>> > that language selection into the session.
>> > If no session then it will pick up from the cookie.
>> >
>> >>
>> >> - Like the top menu bar, the preferences panel doesn't seem to pickup
>> >> the new language until a hard refresh is performed. For example, the
>> >> attached screenshot is the result of me selecting Chinese at login,
>> >> having previously used Polish. Perhaps we need to add "lang=cn" or
>> >> similar to all URLs to force the cache to distinguish between
>> >> languages?
>> >>
>> > In the preferences module, The aci-tree labels were not translated, that
>> > has
>> > been fixed now.
>> > As I have introduced the session variable, so, I think we don't require
>> > to
>> > pass "lang=cn" to the URLS
>> >
>> >>
>> >> - s/misc/Misc (the preference category).
>> >>
>> > I have changed it to Miscellaneous. (Like pgAdmin 3)
>>
>> That's much better. The only issues I see now are:
>>
>> - The descriptive help strings in the preferences dialogue are always
>> shown in English
>>
> Fixed

Nearly. I now see "None" as the help string for options that don't
actually have a string. I'm also still seeing some that aren't
translated - e.g. the binary paths options.

Fixed 
>> - I'm seeing "miscellaneous" in all languages, not "Miscellaneous" or
>> the translated version (e.g. "Pozostałe")
>
>
> Fixed

Yup :-)

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [pgadmin-hackers] Patch for Feature #1344 Can't use multiple monitors (Windows 10)
Next
From: Dave Page
Date:
Subject: Re: [patch] Raise InternalServerError whileretrieving table DDL