bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #21758] "yes" problem with differents languages


From: Eric Blake
Subject: [bug #21758] "yes" problem with differents languages
Date: Sun, 09 Dec 2007 16:23:58 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Mnenhy/0.7.5.666

Follow-up Comment #1, bug #21758 (project coreutils):

When answering yes/no questions, POSIX states that the locale chosen by
LC_MESSAGES is relevant to the regular expression chosen for recognizing
yes/no answers.  yes also takes an optional argument, which is the string it
should output.  So either one of these approaches should work around the
problem:

yes S | mkfs.ext3
yes | LC_MESSAGES=C mkfs.ext3

However, it may be worth pursuing two more avenues.  One would be a bug
report against the es_ES locale, as used by mkfs.ext3, to make the regular
expression for recognizing a yes answer be more permissive.  While POSIX
leaves all locales other than the C locale unspecified, the es_ES locale would
be wise to use a yesexpr of ^[sSyY] rather than ^[sS], as seems to be the case
based on your report.

The other would be writing a patch for coreutils.  Right now, yes.c uses the
string "y" untranslated as its default string, when no options are provided. 
Perhaps it would be better to use _("y") instead, so that the default output
of yes uses the translated string provided by gettext according to
LC_MESSAGES, which in turn will match the yesexpr compared against by
mkfs.ext3 also determined by LC_MESSAGES.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21758>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]