Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Владимир Мартьянов" <vilgeforce@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][PR server/24377] Fix mixing English and system default languages in error messages on Windows
Date: Fri, 29 Mar 2019 09:39:00 -0000	[thread overview]
Message-ID: <CAL5iTPJD77ML8=2uM_dc63QCSHtKrgQTZe2MQbPUoo=veAYJ3A@mail.gmail.com> (raw)
In-Reply-To: <838swyjafd.fsf@gnu.org>

Using system default locale is not a good idea, user must have a way
to change message language. If somebody have to debug on chinese
Windows, he'll get Chinese messages. And this way mustn't affect any
other applications or the system itself. LC_ALL and other env.
variables will affect only gettext, not FormatMessage in the current
implementation.

пт, 29 мар. 2019 г. в 12:29, Eli Zaretskii <eliz@gnu.org>:
>
> > From: Владимир Мартьянов <vilgeforce@gmail.com>
> > Date: Fri, 29 Mar 2019 11:42:36 +0300
> > Cc: gdb-patches@sourceware.org
> >
> > Just try to use gettext with FormatMessage. I don't have idea how to
> > do it, could you please give me a code sample?
>
> I believe this is a misunderstanding of some kind, because there's
> nothing wrong with FormatMessage calls.  As you originally pointed
> out, the 4th argument to FormatMessage is zero, which means use the
> system default locale.  The problem you raised was that gdbserver has
> messages where English is hard-coded, so this makes gdbserver
> sometimes talk in English and sometimes in the default locale's
> language.
>
> My proposal was to make gdbserver _always_ talk in the current
> locale's language, which means the FormatMessage call should be left
> alone, and instead those gdbserver messages that use English
> hard-coded should be translated by using gettext.
>
> That is, instead of
>
>       error ("Error creating process \"%s%s\", (error %d): %s\n",
>              program, args, (int) err, strwinerror (err));
>
> gdbserver should use this:
>
>       error (_("Error creating process \"%s%s\", (error %d): %s\n"),
>              program, args, (int) err, strwinerror (err));
>
> A question to other GDB maintainers: does gdbserver use gettext?  Or
> is gdbserver supposed to talk to users only in English?


  reply	other threads:[~2019-03-29  9:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 11:59 Владимир Мартьянов
2019-03-23 13:11 ` Eli Zaretskii
2019-03-28 20:36   ` Владимир Мартьянов
2019-03-29  8:27     ` Eli Zaretskii
2019-03-29  8:42       ` Владимир Мартьянов
2019-03-29  9:29         ` Eli Zaretskii
2019-03-29  9:39           ` Владимир Мартьянов [this message]
2019-03-29 12:32             ` Eli Zaretskii
2019-03-30 21:26               ` Владимир Мартьянов
2019-03-31 14:45                 ` Eli Zaretskii
2019-03-31 19:39                   ` Владимир Мартьянов
2019-04-01  4:47                     ` Eli Zaretskii
2019-04-02 20:08                       ` Владимир Мартьянов
2019-04-03  4:30                         ` Eli Zaretskii
2019-04-01 22:08                     ` Jon Turney
2019-04-02 20:57                       ` Владимир Мартьянов
2019-04-02 21:10                         ` Jon Turney
2019-04-02 21:18                           ` Владимир Мартьянов
2019-04-03  4:48                         ` Eli Zaretskii
2019-04-03  4:58                           ` LRN
2019-04-03  7:37                             ` Eli Zaretskii
2019-04-03 11:32                               ` LRN
2019-04-03 12:04                                 ` Eli Zaretskii

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='CAL5iTPJD77ML8=2uM_dc63QCSHtKrgQTZe2MQbPUoo=veAYJ3A@mail.gmail.com' \
    --to=vilgeforce@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.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