Re: pgadmin4 l10n issues

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(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-24 15:11:02
Message-ID: CAG7mmoxgjHY2vQmpAigTGZdhjRRSOjkbHTyBTE8_6=wGW2oPzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Oct 24, 2017 at 8:35 PM, Alexander Lakhin <exclusion(at)gmail(dot)com>
wrote:

> 24.10.2017 17:17, Ashesh Vashi wrote:
>
> On Tue, Oct 24, 2017 at 6:08 PM, Alexander Lakhin <exclusion(at)gmail(dot)com>
> wrote:
>
>> Hi Ashesh,
>>
>> 23.10.2017 08:21, Ashesh Vashi wrote:
>>
>> Hi Dave/Alexander,
>>
>> On Thu, Oct 19, 2017 at 6:43 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> Akshay, can you review/commit this, and look into why the remaining
>>> strings Alexander notes are not getting translated please?
>>>
>>
>>
>> Did you forget to attach the patch?
>>
>> No, I didn't. You can find all my attached files here:
>> https://www.postgresql.org/message-id/5c7914c8-db5f-cb70-a81
>> e-6e9145039935%40gmail.com
>>
> I reviewed your patches.
> I have committed the first patch.
>
> About the second patch, I understood the issue.
> I prefer another approach, instead of proposed by you.
>
> Yes, your approach is better (I tried to minimize the fix and didn't
> notice the label change).
> But with the patch applied I get the following error:
>
> File "/data/sources/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/__init__.py",
> line 246, in get_locale
> 'miscellaneous', 'user_language'
> File "/data/sources/pgadmin4/lib/python2.7/site-packages/
> pgadmin4/pgadmin/utils/preferences.py", line 502, in raw_value
> ).filter_by(uid=current_user.id).first()
> File "/data/sources/pgadmin4/lib/python2.7/site-packages/werkzeug/local.py",
> line 338, in __getattr__
> return getattr(self._get_current_object(), name)
>
> AttributeError: 'AnonymousUser' object has no attribute 'id'
>
Looks like - I missed to logout, and test.

Please find the updated patch.

-- Thanks, Ashesh

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

Attachment Content-Type Size
fix-get_locale_v3.patch application/octet-stream 2.5 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Rob Emery 2017-10-24 15:29:45 Re: [pgAgent][Patch] Fixing connection pool leak
Previous Message Ashesh Vashi 2017-10-24 15:05:16 Re: [pgAgent][Patch] Fixing connection pool leak