[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45893] [PATCH 0/2] DRAFT: Hint for options.
From: |
zimoun |
Subject: |
[bug#45893] [PATCH 0/2] DRAFT: Hint for options. |
Date: |
Tue, 26 Jan 2021 22:27:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Thanks for the review.
On Tue, 26 Jan 2021 at 21:53, Ludovic Courtès <ludo@gnu.org> wrote:
>>> > + (fold (lambda (name res)
>>> > + (if (string-null? res)
>>> > + (string-append "@code{" name "}")
>>> > + (string-append "@code{" name "}, " res)))
>>> > + ""
>>> > + (string-closest (symbol->string guess) command-names)))
>>>
>>> Hmm I thought ‘string-closest’ would return a single string, but
>>> actually it returns a list of strings?
>>>
>>> You cannot append strings together like this as this can break i18n.
>>
>> Hum? But it is not (G_ "")...
>
> Yes, but here you’re building an enumeration like:
>
> ‘foo’, ‘bar’, ‘baz’
>
> This should be i18n’d, and so it should all be in a single format
> string.
Are the options translated? If yes, then I understand, else I miss.
Anyway, I have removed that since I agree with your practical argument:
hint is for typo. Type a faulty option name at the same distance as 2
real option names is not a typo. ;-)
Cheers,
simon
- [bug#45893] [PATCH 1/2] scripts: search, show: Replace 'args-fold*' by 'parse-command-line'., (continued)
- [bug#45893] [PATCH 1/2] scripts: search, show: Replace 'args-fold*' by 'parse-command-line'., zimoun, 2021/01/15
- [bug#45893] [PATCH v2 0/3] DRAFT: Hint command line typo, zimoun, 2021/01/15
- [bug#45893] Hint for package name: too slow!, zimoun, 2021/01/19
- [bug#45893] Hint for package name: full matrix iteration, zimoun, 2021/01/20
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/26
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., zimoun, 2021/01/26
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/27
- [bug#45893] [PATCH v2 2/3] guix: scripts: Add hint for option typo., zimoun, 2021/01/15
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/19
[bug#45893] [PATCH v3 1/3] utils: Add string distance., zimoun, 2021/01/19