From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15842 invoked by alias); 29 Mar 2019 08:42:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15832 invoked by uid 89); 29 Mar 2019 08:42:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=1.7 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,FREEMAIL_FROM,FROM_EXCESS_BASE64,GARBLED_BODY,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy==d0=bf=d1?= X-HELO: mail-vs1-f46.google.com Received: from mail-vs1-f46.google.com (HELO mail-vs1-f46.google.com) (209.85.217.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Mar 2019 08:42:49 +0000 Received: by mail-vs1-f46.google.com with SMTP id n14so806843vsp.12 for ; Fri, 29 Mar 2019 01:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BPverMkt6vbakiJLCBUvBBeKFXp8XOENpVzN3XEXjss=; b=nsgOf/3IH5JTfnELDIFz5TyrSg5yM7Id1hr0595BJ7tNr0JrEtTxDbt1NaoXBJXehX o1yjMOS5cCa+iR78XYJE0hrRiOtgIPjF8ptxvF0EVa68Ev9ldadHikRe5NtPTco2u6la 2D9ECGeC8A1c/gEaWC461AOCjqackHwIOi5eY7Vmrv98gOoRqzC70I9vdy9C46PjdHou /gGReQ3azoOxL6zvJxw/PDgUvJgv4UvWhnBN4zDRN4OWpxqAALBTGUD+qZVxakAbwt3G R4p5uU2hejveiDtwBbYiT29Zcmc+4+xwi2p0k1aw9AOXPclpYGjg17x3b51Q6+bVM7Xv wiQw== MIME-Version: 1.0 References: <83mullpwg6.fsf@gnu.org> <83ef6qjdbb.fsf@gnu.org> In-Reply-To: <83ef6qjdbb.fsf@gnu.org> From: =?UTF-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= Date: Fri, 29 Mar 2019 08:42:00 -0000 Message-ID: Subject: Re: [PATCH][PR server/24377] Fix mixing English and system default languages in error messages on Windows To: Eli Zaretskii Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-03/txt/msg00741.txt.bz2 Just try to use gettext with FormatMessage. I don't have idea how to do it, could you please give me a code sample? =D0=BF=D1=82, 29 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 11:27, Eli Zaretsk= ii : > > > From: =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80 =D0=9C=D0=B0=D1= =80=D1=82=D1=8C=D1=8F=D0=BD=D0=BE=D0=B2 > > Date: Thu, 28 Mar 2019 23:36:05 +0300 > > Cc: gdb-patches@sourceware.org > > > > =D1=81=D0=B1, 23 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 16:11, Eli Zar= etskii : > > > Thanks, but isn't this a step backward? Would it make sense to have > > > the hard-coded messages be translated instead? Or is that impossible > > > for some reason? > > > > There is _nl_locale_name function in intl/localename.c, it could be > > used to retrieve current locale name, which, in turn, could be used to > > translate messages in FormatMessage. But when I include gettextP.h in > > win32-low.c I got an error: > > In file included from win32-low.c:38:0: > > ../../intl/gettextP.h:71:8: error: inline variables are only available > > with -std=3Dc++1z or -std=3Dgnu++1z [-Werror] > > Can you tell why you needed to retrieve the current locale's name? > > If gdbserver supports NLS and gettext, all you need is to wrap the > untranslated messages in _().