Re: pgadmin4 l10n issues

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, 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-23 15:52:35
Message-ID: B598D176-F184-41BD-B0B5-7E2DFAB85F92@pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Should be upthread I believe - archives.postgresql.org if you cannot find it?

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

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

> On 23 Oct 2017, at 07:21, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> 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?
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>
> http://www.linkedin.com/in/asheshvashi
>>
>> Thanks.
>>
>>> On Thu, Oct 19, 2017 at 6:08 AM, Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
>>> Hello,
>>>
>>> I would like to to add Russian translation to pgAdmin 4, but having complete messages.po, I get incomplete UI translation.
>>> (See ss1.png attached.)
>>> I found two issues with the i18n in the current master.
>>> The first one is with web/pgadmin/tools/templates/js/translations.js.
>>> I don't understand why, but commit 4a91bcde makes the function return an empty array instead of translations.
>>> Patch for fixing it is attached.
>>>
>>> The second one is more complex and related to get_locale() method. This method is called when first gettext() invoked and it occurs on early stage, where the Preference module 'miscellaneous' is not registered yet. To be precise, first call to gettext() occurs when registering the 'Browser' module. But even if MiscModule will register first, it had to call _('Miscellaneous') before it gets registered.
>>> So I propose to implement some way to get current language when the misc preference module is not registered. Please look at the proposed patch.
>>>
>>> After these two fixes I get (almost) complete Russian interface (See ss2.png attached.)
>>> (May be some more strings should be made localizeable, but that is another question.)
>>>
>>> ------
>>> Alexander Lakhin
>>> Postgres Professional: http://www.postgrespro.com
>>> The Russian Postgres Company
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Rob Emery 2017-10-23 19:09:04 Re: [pgAgent][Patch] Fixing connection pool leak
Previous Message Rob Emery 2017-10-23 12:10:54 Re: [pgAgent][Patch] Fixing connection pool leak