From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45599) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfIkx-0003vD-TQ for guix-patches@gnu.org; Mon, 24 Jun 2019 02:47:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfIkr-0005za-1o for guix-patches@gnu.org; Mon, 24 Jun 2019 02:47:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfIkn-0005tb-UV for guix-patches@gnu.org; Mon, 24 Jun 2019 02:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfIkn-0005bg-Pp for guix-patches@gnu.org; Mon, 24 Jun 2019 02:47:01 -0400 Subject: [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type. Resent-Message-ID: References: <20190518093206.22069-1-mail@cbaines.net> <878suz27ke.fsf@gnu.org> <87ef4dxgvl.fsf@cbaines.net> <87pnnpj15u.fsf@gnu.org> <87h88pu1cc.fsf@cbaines.net> <875zp0lbmx.fsf@gnu.org> From: Christopher Baines In-reply-to: <875zp0lbmx.fsf@gnu.org> Date: Mon, 24 Jun 2019 07:46:29 +0100 Message-ID: <875zovmqey.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35790@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> Ludovic Court=C3=A8s writes: >> >>> A possibility would be to pass =E2=80=98make-warning=E2=80=99 a =E2=80= =98format=E2=80=99 list instead of >>> a single string: >>> >>> (make-warning package (list (G_ "~a is bad") 'something) =E2=80=A6) >>> >>> That=E2=80=99d solve the problem but it=E2=80=99d have to be packaged n= icely to avoid >>> having too much boilerplate. >> >> I've now made an attempt at doing this, I've kept the changes separate >> for now, and I've sent them as a separate patch. > > Nice! > >> I'm not sure I've got it working yet though. I've been testing with the >> zile package, as there's a lint warning for the synopsis, however, if I >> try to set the language to Spanish, it isn't translated. >> >> I've also tried checking the existing behaviour, but that doesn't seem >> to work either: >> >> =E2=86=92 LC_MESSAGES=3Des_ES LANGUAGE=3Des_ES LC_ALL=3Des_ES ./pre-in= st-env guile >> ... >> scheme@(guile-user)> (use-modules (guix i18n)) >> scheme@(guile-user)> (G_ "~a: ~a: proposed synopsis: ~s~%") >> $1 =3D "~a: ~a: proposed synopsis: ~s~%" >> >> Many of the translated strings won't match up with the code now as I've >> changed them. I did try changing the Spanish translation for this >> proposed synopsis message to match the code, but it didn't seem to work. >> >> Any ideas on what's going on here? > > You need to tell libc (gettext) where to look for message catalogs. > This is normally done in scripts/guix: > > (bindtextdomain "guix" "@localedir@") > > For testing purposes, you can probably do: > > (bindtextdomain "guix" > "/run/current-system/profile/share/locale") Thanks, so if I set the bindtextdomain, things do indeed work better. So, regarding these two patches, I've got the following things on my mind... - As they change so many things, I'm not sure what to add for the GNU changelog at the end of the commit message? - Is it OK to break some of the translations, or should I fix some of those as well? - I'm thinking of the "proposed synopsis" related check specifically, as I've changed what goes in to the translated string. - How ready are these patches to merge? I don't know of any problems with them, but I am making lots of changes. Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0QccVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xd5OBAApQXAuitR8T/8zKm9evTcyjAPzO60yr9Fo+wgpgdqzhsAo4lP5nt1NWei hssuxDsLqRLnZ/N6CQrx6W9C+fT4tiuI2tkNWoCAECHaQZtmT4o5pwhUcK9G+sVc /gj5TVECEB7+5UTG4/hmur56hJdGLUkhRRvMcOzleOyTKDRWe1/sdm2saEH0qGSr aEZw8Qg2ykGPx8NXC7jJphGD3+R3ddJlj7M2v/kAvGEIs2WReD/IAhgVOeXYJkqD zKOcfM9bi1Lf9CVZ5nX2pyxdi0BOKrS/SB2X1BAb7qmo8Q41561+JLD74qSbKGNw iZS8E5Fx7yMR2sVqoS8Vto2ooBJ6IFTy42DSno0yTjIxTIAtmeHQcy0NJqXsmrcc 8UMK0Vu/iM8yY2y3e4X431TgNHGpWiy3O4A1a+P6fuBtEUuIfYwsaEm71yNy/4c5 cuGU5HxxmyActmnLO/5TBpUnnlh3+33jIBjjxP57aky+TKlsHeywuRku1gneJzFw LnMjvBqkBGI2UpICT6n94oODmk/M5q37CbLCHXG1mfDzmfg32fzpUkenrLgIlhjo b2779RjeOGe8Ogqt8FRsvj/19L0tV7cwtxnFqE/50Mab6xS36XSSBGcmTKZpKsDt ASZkElBxAflNaVGKf9N7+7W1peulSbCAkFM6eNz00jh/vfdetd0= =guy+ -----END PGP SIGNATURE----- --=-=-=--