Commands like "guix system search KEYWORD" don't work with locale it_IT.utf8

  • Open
  • quality assurance status badge
Details
5 participants
  • Julien Lepiller
  • Luigi Salamone
  • Ludovic Courtès
  • Maxim Cournoyer
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Luigi Salamone
Severity
normal
Merged with
L
L
Luigi Salamone wrote on 4 Mar 2023 16:08
(address . bug-guix@gnu.org)
CAMD_u54z_kf-9_5eDsw=oR92YkjFyH27rP75hS0+WtrDMRg_+A@mail.gmail.com
Hi!

I'm unable to use guix commands like "guix system search KEYWORD".
No problem if I run the commend with LANG=LC_ALL.

[anonymous@guix ~]$ guix system search cups

Backtrace:
In ice-9/boot-9.scm:
1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
851:3 18 (_)
831:4 17 (call-with-status-report _ _)
In ice-9/boot-9.scm:
1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/system/search.scm:
188:20 15 (_)
164:18 14 (find-service-types _)
In guix/discovery.scm:
189:3 13 (fold-module-public-variables _ _ _)
In guix/combinators.scm:
48:26 12 (fold2 #<procedure 7fb93997b800 at guix/discovery.scm:…> …)
48:26 11 (fold2 #<procedure 7fb93997b760 at guix/discovery.scm:…> …)
In guix/discovery.scm:
192:33 10 (_ #<service-type activate 7fb93e430a40> () #<vhash 7fb…>)
In guix/scripts/system/search.scm:
166:28 9 (_ #<service-type activate 7fb93e430a40> ())
In guix/ui.scm:
1670:6 8 (relevance #<service-type activate 7fb93e430a40> _ (# …))
In srfi/srfi-1.scm:
460:18 7 (fold #<procedure 7fb939983de0 at guix/ui.scm:1670:12 …> …)
In guix/ui.scm:
1673:17 6 (_ _ 0)
1473:24 5 (texi->plain-text _)
In texinfo.scm:
1132:22 4 (parse _)
967:36 3 (loop #<input: string 7fb939966620> (*fragment*) #<pro…> …)
92:2 2 (command-spec _)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `parser-error' with args `(#f "Unknown command" dnf)'.
Attachment: file
L
L
Ludovic Courtès wrote on 6 Mar 2023 23:46
(name . Luigi Salamone)(address . lg.salamone@gmail.com)
87ilfdfqfy.fsf@gnu.org
Hi Luigi,

Luigi Salamone <lg.salamone@gmail.com> skribis:

Toggle quote (3 lines)
> I'm unable to use guix commands like "guix system search KEYWORD".
> No problem if I run the commend with LANG=LC_ALL.

[...]

Toggle quote (3 lines)
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Throw to key `parser-error' with args `(#f "Unknown command" dnf)'.

I believe Tobias (Cc’d) fixed this and related issues a couple of days
ago in 0609ae7897b025f46822779d0c5c36509cb0180f and
4775460ba9a60c3c09966216da10686a70b8fadb.

Julien: We’ll have to make sure these changes reach Weblate. :-)

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 2023 23:47
control message for bug #61965
(address . control@debbugs.gnu.org)
87h6uxfqf5.fsf@gnu.org
merge 61965 61961
quit
J
J
Julien Lepiller wrote on 7 Mar 2023 08:28
Re: bug#61965: Commands like "guix system search KEYWORD" don't work with locale it_IT.utf8
(name . Ludovic Courtès)(address . ludo@gnu.org)
20230307082824.3e8888c5@sybil.lepiller.eu
Le Mon, 06 Mar 2023 23:46:57 +0100,
Ludovic Courtès <ludo@gnu.org> a écrit :

Toggle quote (22 lines)
> Hi Luigi,
>
> Luigi Salamone <lg.salamone@gmail.com> skribis:
>
> > I'm unable to use guix commands like "guix system search KEYWORD".
> > No problem if I run the commend with LANG=LC_ALL.
>
> [...]
>
> > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> > Throw to key `parser-error' with args `(#f "Unknown command" dnf)'.
> >
>
> I believe Tobias (Cc’d) fixed this and related issues a couple of days
> ago in 0609ae7897b025f46822779d0c5c36509cb0180f and
> 4775460ba9a60c3c09966216da10686a70b8fadb.
>
> Julien: We’ll have to make sure these changes reach Weblate. :-)
>
> Thanks,
> Ludo’.

I believe it did already reach Weblate :)
L
L
Luigi Salamone wrote on 7 Mar 2023 21:43
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAMD_u569BYmp_d9n=z1H0GNt-ZN1cgpvFGFxAQ8_9zkJusnimw@mail.gmail.com
Hi Ludo!
Hi Julien!

Now "guix system search KEYWORD" works! But... guix install hello:

hint: Backtrace: 16 (primitive-load
"/home/anonymous/.config/guix/current/b…") In guix/ui.scm: 2300:7 15
(run-guix . _) 2263:10 14 (run-guix-command _ . _) In ice-9/boot-9.scm:
1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In guix/status.scm:
851:3 12 (_) 831:4 11 (call-with-status-report _ _) In guix/store.scm:
1300:8 10 (call-with-build-handler _ _) 1300:8 9 (call-with-build-handler #
…) In guix/build/syscalls.scm: 1442:3 8 (_) 1408:4 7
(call-with-file-lock/no-wait "/var/guix/profiles/per-u…" …) In
guix/scripts/package.scm: 325:7 6 (build-and-use-profile _
"/var/guix/profiles/per-user/…" …) In guix/ui.scm: 325:5 5 (display-hint _
#:port _ . _) 1473:24 4 (texi->plain-text _) In texinfo.scm: 1132:22 3
(parse _) 967:36 2 (loop # (*fragment*) # …) 92:2 1 (command-spec _) In
ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key
`parser-error' with args `(#f "Unknown command" esempio)'.

Thanks!


On Mon, Mar 6, 2023 at 10:47?PM Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (21 lines)
> Hi Luigi,
>
> Luigi Salamone <lg.salamone@gmail.com> skribis:
>
> > I'm unable to use guix commands like "guix system search KEYWORD".
> > No problem if I run the commend with LANG=LC_ALL.
>
> [...]
>
> > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> > Throw to key `parser-error' with args `(#f "Unknown command" dnf)'.
>
> I believe Tobias (Cc’d) fixed this and related issues a couple of days
> ago in 0609ae7897b025f46822779d0c5c36509cb0180f and
> 4775460ba9a60c3c09966216da10686a70b8fadb.
>
> Julien: We’ll have to make sure these changes reach Weblate. :-)
>
> Thanks,
> Ludo’.
>
Attachment: file
M
M
Maxim Cournoyer wrote on 7 Mar 2023 22:05
control message for bug #61965
(address . control@debbugs.gnu.org)
877cvsw9us.fsf@gmail.com
merge 61965 61961
quit
L
L
Ludovic Courtès wrote on 10 Mar 2023 10:03
Incorrect Italian translation of hints
(name . Luigi Salamone)(address . lg.salamone@gmail.com)
87edpx9dw9.fsf_-_@gnu.org
Hi Luigi,

Luigi Salamone <lg.salamone@gmail.com> skribis:

Toggle quote (18 lines)
> Now "guix system search KEYWORD" works! But... guix install hello:
>
> hint: Backtrace: 16 (primitive-load
> "/home/anonymous/.config/guix/current/b…") In guix/ui.scm: 2300:7 15
> (run-guix . _) 2263:10 14 (run-guix-command _ . _) In ice-9/boot-9.scm:
> 1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In guix/status.scm:
> 851:3 12 (_) 831:4 11 (call-with-status-report _ _) In guix/store.scm:
> 1300:8 10 (call-with-build-handler _ _) 1300:8 9 (call-with-build-handler #
> …) In guix/build/syscalls.scm: 1442:3 8 (_) 1408:4 7
> (call-with-file-lock/no-wait "/var/guix/profiles/per-u…" …) In
> guix/scripts/package.scm: 325:7 6 (build-and-use-profile _
> "/var/guix/profiles/per-user/…" …) In guix/ui.scm: 325:5 5 (display-hint _
> #:port _ . _) 1473:24 4 (texi->plain-text _) In texinfo.scm: 1132:22 3
> (parse _) 967:36 2 (loop # (*fragment*) # …) 92:2 1 (command-spec _) In
> ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _)
> ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key
> `parser-error' with args `(#f "Unknown command" esempio)'.

That’s a similar bug, this time in the ‘guix’ gettext domain. Julien?

Should we have a “TRANSLATORS” command somewhere explaining that Texinfo
command names (like @example) must not be translated?

More importantly, should we have a tool on our side to validate all the
Texinfo strings that appear in .po files? I’m not entirely sure how to
do that.

Ludo’.
J
J
Julien Lepiller wrote on 7 Mar 2023 22:27
Re: bug#61965: Commands like "guix system sea rch KEYWORD" don't work with locale it_IT.utf8
FE25E9B9-F2F2-4913-8E5F-EF9B05B9F5A7@lepiller.eu
OK, fixed on master and on weblate. Hope it works now!

Had to change @esempio to @example (it's Texinfo markup that's not supposed to be cranslated) and even found a typo'd @sempio.

Also, if you want to help with translations andqproof-reading, you're very welcome to edit on https://translate.fedoraproject.org/projects/guix/guix/it:)

Le 7 mars 2023 21:43:59 GMT+01:00, Luigi Salamone <lg.salamone@gmail.com> a écrit :
Toggle quote (47 lines)
>Hi Ludo!
>Hi Julien!
>
>Now "guix system search KEYWORD" works! But... guix install hello:
>
>hint: Backtrace: 16 (primitive-load
>"/home/anonymous/.config/guix/current/b…") In guix/ui.scm: 2300:7 15
>(run-guix . _) 2263:10 14 (run-guix-command _ . _) In ice-9/boot-9.scm:
>1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In guix/status.scm:
>851:3 12 (_) 831:4 11 (call-with-status-report _ _) In guix/store.scm:
>1300:8 10 (call-with-build-handler _ _) 1300:8 9 (call-with-build-handler #
>…) In guix/build/syscalls.scm: 1442:3 8 (_) 1408:4 7
>(call-with-file-lock/no-wait "/var/guix/profiles/per-u…" …) In
>guix/scripts/package.scm: 325:7 6 (build-and-use-profile _
>"/var/guix/profiles/per-user/…" …) In guix/ui.scm: 325:5 5 (display-hint _
>#:port _ . _) 1473:24 4 (texi->plain-text _) In texinfo.scm: 1132:22 3
>(parse _) 967:36 2 (loop # (*fragment*) # …) 92:2 1 (command-spec _) In
>ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _)
>ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key
>`parser-error' with args `(#f "Unknown command" esempio)'.
>
>Thanks!
>
>
>On Mon, Mar 6, 2023 at 10:47?PM Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Hi Luigi,
>>
>> Luigi Salamone <lg.salamone@gmail.com> skribis:
>>
>> > I'm unable to use guix commands like "guix system search KEYWORD".
>> > No problem if I run the commend with LANG=LC_ALL.
>>
>> [...]
>>
>> > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> > Throw to key `parser-error' with args `(#f "Unknown command" dnf)'.
>>
>> I believe Tobias (Cc’d) fixed this and related issues a couple of days
>> ago in 0609ae7897b025f46822779d0c5c36509cb0180f and
>> 4775460ba9a60c3c09966216da10686a70b8fadb.
>>
>> Julien: We’ll have to make sure these changes reach Weblate. :-)
>>
>> Thanks,
>> Ludo’.
>>
T
T
Tobias Geerinckx-Rice wrote on 10 Mar 2023 10:42
E415C683-C2A6-4BA3-A6C9-095417ED9F6A@tobias.gr
Toggle quote (3 lines)
> I believe Tobias (Cc’d) fixed this and related issues
> a couple of days ago

Yep. I also fixed a worrying number of @comando, @opzione, etc. on Weblate (both in the 'guix' and 'packages' sets).

Weblate is pretty unfriendly, so this was tedious and I'm positive there are some I missed. There's a comment warning translators not to do this, but it's sadly useless since it's tied to *one* package—the odds of seeing it are vanishing.

Julien, is there a way to make this warning more prominent/ubiquitous?

(Also, is there a translation workflow that avoids relying on Weblate or other clunky tools?)

Run-time errors appear to be the only QA available for these strings, but this failure mode is extreme. How about explicitly reporting the error & continuing in English?

From what I remember, the code won't be elegant (we append to the translation, then convert Texi, so falling back must be done by the caller or a new combo procedure) but the result would be better.

Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
J
J
Julien Lepiller wrote on 10 Mar 2023 12:21
(address . 61965@debbugs.gnu.org)
EF0DDD11-6649-475E-9EDA-A3B93FD502BE@lepiller.eu
Gettext already checks issues with format strings, and for the manual, I always try to build it, so I can catch most issues. Unfortunately, we don't have good tools to check texinfo markup in our strings, so this kind of error can stell slip in, I hadn't realized.

I'll try to contact the translator who did that and see if they have an idea how to make the situation better.

At the very least, I think we should validate strings better before we accept translations, and make warnings more visible.

Le 10 mars 2023 10:42:24 GMT+01:00, Tobias Geerinckx-Rice <me@tobias.gr> a écrit :
Toggle quote (20 lines)
>> I believe Tobias (Cc’d) fixed this and related issues
>> a couple of days ago
>
>Yep. I also fixed a worrying number of @comando, @opzione, etc. on Weblate (both in the 'guix' and 'packages' sets).
>
>Weblate is pretty unfriendly, so this was tedious and I'm positive there are some I missed. There's a comment warning translators not to do this, but it's sadly useless since it's tied to *one* package—the odds of seeing it are vanishing.
>
>Julien, is there a way to make this warning more prominent/ubiquitous?
>
>(Also, is there a translation workflow that avoids relying on Weblate or other clunky tools?)
>
>Run-time errors appear to be the only QA available for these strings, but this failure mode is extreme. How about explicitly reporting the error & continuing in English?
>
>From what I remember, the code won't be elegant (we append to the translation, then convert Texi, so falling back must be done by the caller or a new combo procedure) but the result would be better.
>
>Kind regards,
>
>T G-R
>
>Sent on the go. Excuse or enjoy my brevity.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 61965@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61965
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch