[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#35790] [PATCH] scripts: lint: Handle warnings with a record type.
From: |
Christopher Baines |
Subject: |
[bug#35790] [PATCH] scripts: lint: Handle warnings with a record type. |
Date: |
Mon, 24 Jun 2019 07:46:29 +0100 |
User-agent: |
mu4e 1.2.0; emacs 26.2 |
Ludovic Courtès <address@hidden> writes:
> Christopher Baines <address@hidden> skribis:
>
>> Ludovic Courtès <address@hidden> 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
signature.asc
Description: PGP signature
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., (continued)
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Ludovic Courtès, 2019/06/07
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Christopher Baines, 2019/06/01
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Christopher Baines, 2019/06/16
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Ludovic Courtès, 2019/06/20
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type.,
Christopher Baines <=
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Ludovic Courtès, 2019/06/24
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Ludovic Courtès, 2019/06/24
- [bug#35790] [PATCH 1/2] scripts: lint: Handle warnings with a record type., Christopher Baines, 2019/06/29
- [bug#35790] [PATCH 2/2] scripts: lint: Separate the message warning text and data., Christopher Baines, 2019/06/29
- [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type., Christopher Baines, 2019/06/29