public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Rahul Shirsat <[email protected]>
Cc: Aditya Toshniwal <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Akshay Joshi <[email protected]>
Subject: Re: [patch][pgAdmin] Fix for pgadmin4-linux-qa #1651 failure
Date: Wed, 30 Jun 2021 14:25:12 +0100
Message-ID: <CA+OCxoyWueM+uo3z1xMnCVD3rw59wrWBPaRLqT8A15ezNxGV8Q@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxozFw2awND=5n3BkRG3jZDg_Z_V7Mm=qBgX8J8She78vyQ@mail.gmail.com>
References: <CAKtn9dP2TmBCqHxV0szjdmCEVLbJwBNXA6rsumoOKeQJG1qyUw@mail.gmail.com>
<CA+OCxoxE+OK3_KW_vu_pWY4+t5qyH985_Znp7v+uA2vmYRo2BQ@mail.gmail.com>
<CAKtn9dOWXDQo9K_HuqGOmhq=AeVVzcE8d=J+8obRj014G=0jxQ@mail.gmail.com>
<CA+OCxozh_DV2m7vcEAaD0rsY31OntJF5GdRBXmqj0PCWULStew@mail.gmail.com>
<CAM9w-_kzsV0uvVyqswNCwnhED=3-Z=sL9=awoaUZwKxcvS=5Tg@mail.gmail.com>
<CAKtn9dP3nj5j6ZL-9ExyBz0rnm2-S2FO+qKTcituB+Z=5sPswg@mail.gmail.com>
<CA+OCxoyjCRCo3t6PvHR9LUctEoyPB9c-Vjo-hOK9Z82wRCn-Lg@mail.gmail.com>
<CAM9w-_n3JKd5XsrDJ_NFkaNnhSaQyKhx5XjVq6cpVfb68B8xmw@mail.gmail.com>
<CA+OCxozO3ea=CnCofz0RDii4wdMcGAe1JYN-HLmxLurtw7Kmwg@mail.gmail.com>
<CAM9w-_=A5qZ=0g4Y==Ue_5esXX48JdYadpfQ1jf-hkJ6DhQvHg@mail.gmail.com>
<CA+OCxozap1agLK-tWnBmcNA8COc7ahW70hEmBgM1KRANX-6DJw@mail.gmail.com>
<CAKtn9dNWNAO84Qg15TPoJgVMgah39jbQcxaWp6xDik2ykQQx-g@mail.gmail.com>
<CAKtn9dMcVSjEwjeOfZC5Kt7CD-YUmQ=W9fFN4XXGSCLsT-oyzw@mail.gmail.com>
<CA+OCxozFw2awND=5n3BkRG3jZDg_Z_V7Mm=qBgX8J8She78vyQ@mail.gmail.com>
Hi
On Wed, Jun 30, 2021 at 9:22 AM Dave Page <[email protected]> wrote:
> Hi
>
> On Wed, Jun 30, 2021 at 8:28 AM Rahul Shirsat <
> [email protected]> wrote:
>
>> Hi All,
>>
>> Please find the attached patch for resolving this issue wrt above
>> suggestion.
>>
>
> Well that may fix the problem (and is a reasonable change), however, I
> think it's important that we understand the root cause. Why is this failing
> on Linux only? Why does the following from node.js (which follows the same
> pattern) work fine?
>
> var type_label = gettext('%s Script',stype.toUpperCase());
>
Rahul and I figured out the root cause. The issue is occuring because the
previous string had no parameters (i.e. no %s's). Because fuzzy matching is
used for the translations, when updating the catalogs it was matching with
the old translation, which at runtime would likely have caused a crash
because the catalogs would have contained something like:
#: pgadmin/browser/static/js/node.js:209
#, fuzzy, python-format
msgid "Search %s Objects"
msgstr "Typy obiektów"
There are a few of ways around this:
- Manually fix the translations in each catalog. This is not a good idea
because we don't speak all those languages and will probably mess the
translations up.
- Run something like 'make msg-extract && pybabel update
--no-fuzzy-matching -i web/pgadmin/messages.pot -d web/pgadmin/translations
&& make msg-compile', then commit the results. This will remove all fuzzy
matches from the catalogs, which means more work for the translators on the
next release, but will likely also result in them becoming much cleaner.
- Change the code to use the conditional fix.
I'm leaning towards the second option. In the worst case, it'll lose about
58 fuzzy translations (meaning 58 messages to re-translate), but at least
we'll know they are clean. See
https://www.pgadmin.org/development/translations/ for current stats.
Thoughts?
--
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: https://www.enterprisedb.com
view thread (22+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: [patch][pgAdmin] Fix for pgadmin4-linux-qa #1651 failure
In-Reply-To: <CA+OCxoyWueM+uo3z1xMnCVD3rw59wrWBPaRLqT8A15ezNxGV8Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox