From: "Stephan Müller" <fruktopus@gmail.com>
To: util-linux@vger.kernel.org
Subject: Re: cfdisk, wrong interpretation of yes in non-english language
Date: Tue, 26 Aug 2014 12:41:34 +0200 [thread overview]
Message-ID: <53FC645E.5090600@gmail.com> (raw)
In-Reply-To: <d8263f3bc98929c82bbd0962ca77a159@nutyx.org>
Am 26.08.2014 11:18, schrieb tnut@nutyx.org:
> I'm building a new installer for the NuTyX distribution.
>
> If another language then english is choose as native language, some answer are wrong interpreted
>
> I think you should check both cases are wrong instead of one of them or do the test in the opposite way
>
> Here is a proposal of patch:
>
>
> --- util-linux-2.25/disk-utils/cfdisk.c 2014-07-21 13:36:21.000000000 +0000
> +++ util-linux-2.25-new/disk-utils/cfdisk.c 2014-08-25 18:52:17.000000000 +0000
> @@ -1834,8 +1834,8 @@
> buf, sizeof(buf));
>
> ref = 1;
> - if (rc <= 0 || strcasecmp(buf, "yes") != 0
> - || strcasecmp(buf, _("yes")) != 0) {
> + if (rc <= 0 || (strcasecmp(buf, "yes") != 0
> + && strcasecmp(buf, _("yes")) != 0)) {
> info = _("Did not write partition table to disk");
> break;
> }
>
Why are both tests necessary at all? If NLS is disabled, both tests agree. If it is enabled, we should test against the gettext translated version only (2nd strcasecmp).
regards
stephan
next prev parent reply other threads:[~2014-08-26 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 9:18 cfdisk, wrong interpretation of yes in non-english language tnut
2014-08-26 10:41 ` Stephan Müller [this message]
2014-08-26 11:33 ` tnut
2014-08-26 12:54 ` Stephan Müller
2014-08-26 17:58 ` Karel Zak
2014-08-26 19:28 ` tnut
2014-08-26 20:23 ` Karel Zak
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=53FC645E.5090600@gmail.com \
--to=fruktopus@gmail.com \
--cc=util-linux@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox