Re: [pgAdmin4][Patch]: Fixed 2190 - Move language selection to Preferences.

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: Fixed 2190 - Move language selection to Preferences.
Date: 2017-03-13 10:39:06
Message-ID: CA+OCxoxa=do0XHjJg03gUk9-U7g9PceYjLbbvDogNAhe+H582Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Fri, Mar 10, 2017 at 1:55 PM, Khushboo Vashi
<khushboo(dot)vashi(at)enterprisedb(dot)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)?

- 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?

- s/misc/Misc (the preference category).

Thanks!

--
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-13 10:39:40 pgAdmin 4 commit: Remove \n in translation that was causing a syntax er
Previous Message Dave Page 2017-03-13 09:03:43 Re: Introduce Migration system for SQLite database