Re: pgadmin4 l10n issues

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Subject: Re: pgadmin4 l10n issues
Date: 2017-10-27 13:15:39
Message-ID: ad69e937-9314-2517-d5fe-1c774d975788@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

25.10.2017 14:52, Ashesh Vashi wrote:
> On Tue, Oct 24, 2017 at 9:11 PM, Alexander Lakhin <exclusion(at)gmail(dot)com
> <mailto:exclusion(at)gmail(dot)com>> wrote:
>
> 24.10.2017 18:11, Ashesh Vashi wrote:
>> Looks like - I missed to logout, and test.
>>
>> Please find the updated patch.
> Now the error is gone but I get no right locale.
> The issue is with Desktop mode (see "if config.SERVER_MODE is
> False:" in web/pgadmin/__init__.py).
>
> Did you restart the pgAdmin4/reload after changing the language?
Yes, I restarted it.
The issue is with the current_user.
To reproduce it you can perform rm ~/.pgadmin/sessions/* and then
restart pgAdmin4/reload the web interface.
As I understand, the modules are registered (and get_locales() first
called) before user_login is performed in before_request.
So on very first call to get_locale() you can't use the current_user object.
Please look at v4 of the patch.

Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
fix-get_locale_v4.patch text/x-patch 3.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2017-10-30 12:51:29 pgAdmin 4 commit: Saved user language was not being picked up in case o
Previous Message pgAdmin 4 Jenkins 2017-10-27 12:20:32 Jenkins build is back to normal : pgadmin4-master-python27 #361