From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93076 invoked by alias); 29 Mar 2019 08:27:08 -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 93057 invoked by uid 89); 29 Mar 2019 08:27:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,SPF_PASS autolearn=no version=3.3.1 spammy=HContent-type:plain, HContent-type:charset, HContent-type:text, HContent-Transfer-Encoding:8bit X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Mar 2019 08:27:05 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9mqt-0002sX-UE; Fri, 29 Mar 2019 04:27:04 -0400 Received: from [176.228.60.248] (port=2274 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h9mqt-0007Dl-5D; Fri, 29 Mar 2019 04:27:03 -0400 Date: Fri, 29 Mar 2019 08:27:00 -0000 Message-Id: <83ef6qjdbb.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= CC: gdb-patches@sourceware.org In-reply-to: (message from =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= on Thu, 28 Mar 2019 23:36:05 +0300) Subject: Re: [PATCH][PR server/24377] Fix mixing English and system default languages in error messages on Windows References: <83mullpwg6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00740.txt.bz2 > From: Владимир Мартьянов > Date: Thu, 28 Mar 2019 23:36:05 +0300 > Cc: gdb-patches@sourceware.org > > сб, 23 мар. 2019 г. в 16:11, Eli Zaretskii : > > 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=c++1z or -std=gnu++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 _().