Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOd1P-0002pY-Cg for pgadmin-hackers@arkaria.postgresql.org; Wed, 15 Apr 2020 08:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jOd1O-000100-9Z for pgadmin-hackers@arkaria.postgresql.org; Wed, 15 Apr 2020 08:03:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOd1O-0000z8-36 for pgadmin-hackers@lists.postgresql.org; Wed, 15 Apr 2020 08:03:46 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jOd1L-00084r-Mo for pgadmin-hackers@postgresql.org; Wed, 15 Apr 2020 08:03:45 +0000 Received: by mail-il1-x144.google.com with SMTP id z12so2437256ilb.10 for ; Wed, 15 Apr 2020 01:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dA341tIsT794DxMxVqny5De9ApeQ87n7GRiqJIL9zR0=; b=2THXhSg0IvHW9A64HdrLRgepEOzRMyP/jCNGEfbAODCQM87KS0GFIki4iJDKU3/6m8 RUseAtzIBk++fPk8aqLrhsTAsMm/CmWCARNd8494qWf88IAE9bWa4lNxBRpRwI72FGW9 pd8v+7nN8ADE1zmS/hEO9MIT7MxemmGFixUGdf1Bw8w7MttqxUOIlnatRCkVc2zs9rCu 6ntJOP15uHpqLAWDlzmYHoP/7IXNaeH0LPTrQtFIRDz8rhY6poJITqfgRnGvvD0RY8bZ 0PzoqSsxqQxtAxu9tap6WzfOUdSB+mZVnlfyNXZAHVnFm9b6+dys/5lORDcF5MaaQiv6 TxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dA341tIsT794DxMxVqny5De9ApeQ87n7GRiqJIL9zR0=; b=kP1lTvs63hVkMYckdsydeJQ0/fKqJgTvTf9ntQiwacTs0cROMtvTm3JUkyvJwnEDnt DhA1CuYzCoftQT1T5/113kaWd8Dg++hgzrrI4vqSQc0zqgIqjl08oFDG5xgg82bK7Ayj gatlEzkVloRvU+CJMQphc45PhCVnTLnv9p7LXBRsIl51ogJ1MG6zsCjTRR9SlxdCDK8e vJJQXZg1WswW9FayBr3heAc9kv7+VoOtMBp51XIxpncvfMJoNLNMu+7hZ18LgauOJiYe kbOzV0HU+jk3Plf4V6jRFTnrOhxV3Kj8AbSTHm0sa3zwftyV11e2R7BBwYCRb2zatWjU b7eA== X-Gm-Message-State: AGi0Pub4aCuTjuyBAOG1O6bpzr95TajN3DgoNiMtmjW9mbt0HDpTG7Tl AxLAU50xBTjWfsT7GfFrgnsJZivPgzie2rSJvmOw77JEq2xQ7hH5V4vMmhmJp0rfIh76OrhUig6 TDyLAt8xKZIvowEBX56bTrp2zAfzW1tSGhLnubYrAlYFp9Kw4hDfePDtoFUZ4vztvflp+vrKrq5 iV4UFqief01j8qwidnr6POsvZwl2rWqlp5/KDH7FkXcavTJCCBp2k= X-Google-Smtp-Source: APiQypLxWWD3DetL+2p46LXx/BrelfCpjhy6NJKmPr6sK2I/CUHeXS3lDGEG9q4Pf7M2iI2sqGms309TCUAdRgck40E= X-Received: by 2002:a92:8f08:: with SMTP id j8mr4173290ild.121.1586937821967; Wed, 15 Apr 2020 01:03:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Wed, 15 Apr 2020 13:33:31 +0530 Message-ID: Subject: Re: pgAdmin 4 - next gettext usage fixes To: Aditya Toshniwal Cc: "Libor M." , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000028d14a05a34fc142" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000028d14a05a34fc142 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Aditya I think the fix is incorrect. .format method should be applied after gettext() like gettext().format(). Please check for other places too and send the updated patch. On Wed, Apr 15, 2020 at 11:38 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers/Libor, > > The changes like below are incorrect. Try "Count rows" from a table's > context menu. > > - info=3Dgettext("Table rows counted: %s" % count), > > + info=3Dgettext("Table rows counted: %s") % count, > > Attached is the patch to fix all such changes in pgAdmin, to use format() > instead. > Please review. > > On Fri, Apr 10, 2020 at 2:57 PM Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> Hi Libor >> >> Thanks, patch applied. Please make sure to run the PEP8 checks before >> sending the patch. >> I have fixed and committed the code. >> >> On Wed, Apr 8, 2020 at 9:30 PM Libor M. wrote: >> >>> Hello, >>> I fixed next gettext usage: >>> >>> - fixed gettext usage with .format() only for original text with %s >>> - fixed typos >>> - fixed translation yes/no buttons in dialog >>> - improved translating sentences without "connecting" words (eg. see >>> web/pgadmin/dashboard/static/js/dashboard.js, word 'cancel' needs to >>> be translated in Czech language as 'zru=C5=A1it' but in another sentenc= e as >>> 'zru=C5=A1en=C3=AD') >>> - added gettext for text translations >>> >>> Diff file is attached. >>> >>> Best regards, >>> >>> Libor M. >>> >>> E-mail: liborm85@gmail.com >>> GitHub: https://github.com/liborm85 >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> >> *Sr. Software Architect* >> *EnterpriseDB Software India Private Limited* >> *Mobile: +91 976-788-8246* >> > > > -- > Thanks and Regards, > Aditya Toshniwal > pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > --=20 *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* --00000000000028d14a05a34fc142 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Aditya

I think the fix is incor= rect. .format method should be applied after gettext() like gettext().forma= t(). Please check for other places too and send the updated patch.

On = Wed, Apr 15, 2020 at 11:38 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrot= e:
Hi Hackers/Libor,

The changes like below are incorre= ct. Try "Count rows" from a table's context menu.

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 info=3Dge= ttext("Table rows counted: %s" % count),

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 info=3Dge= ttext("Table rows counted: %s") % count,

Attached is the patch to fix all such changes in pgAdmin, to use format(= ) instead.
Please review.

On Fri, Apr 10, 2020 at 2:57 PM Akshay Josh= i <ak= shay.joshi@enterprisedb.com> wrote:
Hi=C2=A0Libor

Thanks, patch applied. Please make sure to run the PEP8 checks before sen= ding the patch.
I have fixed and committed the code.
<= br>
On Wed,= Apr 8, 2020 at 9:30 PM Libor M. <liborm85@gmail.com> wrote:
Hello,
I fixed next gettext usage:

- fixed gettext usage with .format() only for original text with %s
- fixed typos
- fixed translation yes/no buttons in dialog
- improved translating sentences without "connecting" words (eg. = see
web/pgadmin/dashboard/static/js/dashboard.js, word 'cancel' needs t= o
be translated in Czech language as 'zru=C5=A1it' but in another sen= tence as
'zru=C5=A1en=C3=AD')
- added gettext for text translations

Diff file is attached.

Best regards,

Libor M.

E-mail: liborm85@gm= ail.com
GitHub: https://github.com/liborm85


--
Thanks & Regards
Akshay Joshi
<= font color=3D"#3333FF">Sr. Software Architect=
<= font color=3D"#000000" face=3D"arial, sans-serif">EnterpriseDB Software = India Private Limited
Mobile: +91 976-788-8246=


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=


--
Thanks & Regards
=
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
=
Mobile: += 91 976-788-8246
--00000000000028d14a05a34fc142--