all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 35790@debbugs.gnu.org
Subject: [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type.
Date: Mon, 24 Jun 2019 07:46:29 +0100	[thread overview]
Message-ID: <875zovmqey.fsf@cbaines.net> (raw)
In-Reply-To: <875zp0lbmx.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@cbaines.net> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> A possibility would be to pass ‘make-warning’ a ‘format’ list instead of
>>> a single string:
>>>
>>>   (make-warning package (list (G_ "~a is bad") 'something) …)
>>>
>>> That’d solve the problem but it’d have to be packaged nicely 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:
>>
>>   → LC_MESSAGES=es_ES LANGUAGE=es_ES LC_ALL=es_ES ./pre-inst-env guile
>>   ...
>>   scheme@(guile-user)> (use-modules (guix i18n))
>>   scheme@(guile-user)> (G_ "~a: ~a: proposed synopsis: ~s~%")
>>   $1 = "~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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

  reply	other threads:[~2019-06-24  6:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-18  9:32 [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type Christopher Baines
2019-05-21 14:41 ` Ludovic Courtès
2019-06-01 18:31   ` Christopher Baines
2019-06-07  7:44     ` Ludovic Courtès
2019-06-16 13:00       ` Christopher Baines
2019-06-20 11:40         ` Ludovic Courtès
2019-06-01 19:09   ` Christopher Baines
2019-06-07  7:38     ` Ludovic Courtès
2019-06-16 12:56       ` [bug#35790] [PATCH] scripts: lint: Separate the message warning text and data Christopher Baines
2019-06-24  8:36         ` Ludovic Courtès
2019-06-29  8:46           ` Christopher Baines
2019-06-16 13:05       ` [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type Christopher Baines
2019-06-20 11:49         ` Ludovic Courtès
2019-06-24  6:46           ` Christopher Baines [this message]
2019-06-24  8:33             ` Ludovic Courtès
2019-06-24  8:39             ` Ludovic Courtès
2019-06-29 11:25               ` [bug#35790] [PATCH 1/2] " Christopher Baines
2019-06-29 11:25                 ` [bug#35790] [PATCH 2/2] scripts: lint: Separate the message warning text and data Christopher Baines
2019-06-29 11:56               ` [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type Christopher Baines
2019-07-01 12:32                 ` Ludovic Courtès
2019-07-02 19:25                   ` [bug#35790] [PATCH 1/2] lint: Move the linting code to a different module Christopher Baines
2019-07-02 19:25                     ` [bug#35790] [PATCH 2/2] lint: Separate checkers by dependence on the internet Christopher Baines
2019-07-12 14:38                       ` Ludovic Courtès
2019-07-14 18:17                         ` Christopher Baines
2019-07-12 14:36                     ` [bug#35790] [PATCH 1/2] lint: Move the linting code to a different module Ludovic Courtès
2019-07-14 18:03                       ` Christopher Baines
2019-07-14 18:23                         ` Christopher Baines
2019-07-15  9:20                         ` Ludovic Courtès
2019-07-15 19:45                           ` [bug#35790] [PATCH 1/4] scripts: lint: Handle warnings with a record type Christopher Baines
2019-07-15 19:45                             ` [bug#35790] [PATCH 2/4] scripts: lint: Separate the message warning text and data Christopher Baines
2019-07-15 19:45                             ` [bug#35790] [PATCH 3/4] lint: Move the linting code to a different module Christopher Baines
2019-07-15 19:45                             ` [bug#35790] [PATCH 4/4] lint: Separate checkers by dependence on the internet Christopher Baines
2019-07-15 20:17                               ` Ludovic Courtès
2019-07-15 22:23                                 ` bug#35790: " Christopher Baines
2019-07-16 21:34                                   ` [bug#35790] " Ludovic Courtès
2019-07-15 19:51                           ` [bug#35790] [PATCH 1/2] lint: Move the linting code to a different module Christopher Baines
2019-07-02 20:15                   ` [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zovmqey.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=35790@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.