From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id E9A581F5CB for ; Tue, 23 Apr 2019 11:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726659AbfDWLpu (ORCPT ); Tue, 23 Apr 2019 07:45:50 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54945 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbfDWLpu (ORCPT ); Tue, 23 Apr 2019 07:45:50 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id ECE7621C82; Tue, 23 Apr 2019 07:45:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 23 Apr 2019 07:45:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=p8qDIWzXV6RDqPPVTfSMhRF4PhF04eyARCwlPAeC7 Xc=; b=dnwIlqv0sUPjGijWdwoD6kUWRVE5dcl+RkWUgQG8YawcQvPLQjdJXvHr0 SdD8kQ0dlKi0y0Th54pFScmEw3P9J6O4wXHCZmJvRuOrfvIM46nLUhJ7QsePWjmz y+cu3ybdxoxNygY0ACLIPAaHD/6HqQI6V+9BPGC5K15GovralYCadRdUg17+DMmL Vsry8tIlYpBwlculFAQogGTdoNVlZ+K7/8Yze/keMZoL/jAXeieNL6RLP/98DJz/ IkFpc5GLDskeUFvGZGfpmFv314ihbISE4mYKYvBRz+YNJFJGuhHJ31hxOaBe+muY D40airInSzH/rJTlT6LOC+oDz3rlg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrgeekgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptehnughrvgifucflrghnkhgvuceofhhlohhsshesrghpjhgr nhhkvgdrnhgvtheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpmhgrrhgtrdhinh hfohdpghhnuhdrohhrghenucfkphepieejrddvgeehrddvvdeirdeffeenucfrrghrrghm pehmrghilhhfrhhomhepfhhlohhsshesrghpjhgrnhhkvgdrnhgvthenucevlhhushhtvg hrufhiiigvpedt X-ME-Proxy: Received: from angharad.local (cpe-67-245-226-33.nyc.res.rr.com [67.245.226.33]) by mail.messagingengine.com (Postfix) with ESMTPA id 679E6E424F; Tue, 23 Apr 2019 07:45:48 -0400 (EDT) Subject: Re: gettext, multiple Preferred languages, and English To: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Cc: Duy Nguyen , Git Mailing List References: <9d7a2fb4-8bab-2d28-1066-fbace688a5cc@apjanke.net> <875zr6szik.fsf@evledraar.gmail.com> From: Andrew Janke Openpgp: preference=signencrypt Autocrypt: addr=floss@apjanke.net; prefer-encrypt=mutual; keydata= mQINBFlwNDEBEACxcsbVDWy2m1G3cpsLukaWZHTyfNkzEfh5FJIhyLpyVgHc7NZ8Lm7IPA3S K2G/B9yMWtQimOpnGrW9jolqU4YLzeda/tuaq5s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I3kK/f5sbDjfdJM/AupKFzkA9nf3GJAzbc/b5ILHmgcJ1OeGXtTpQGh+htiJWBvfo7r 4WG7/iRVOa4oU0JtaRZpABEBAAGJAiUEGAEKAA8FAllwNDECGwwFCQlmAYAACgkQpnBifCSv HqVgTA//dp10THZ5mmdnIhietm3v8BFcS7HZy2ojy6XtGHOALu9cCiU+RHiFd2TGg8zuno/B z/ImtxZIVg5JlpOBtYTSCCXMgPpdljNvvw+24wk/cVSyDdi6z2vPO0c1cIZAvTTKCse28fka BCUJM6YOQRrc6LjqiiMlg8siuRUnOmh1wYSj7fw+3scmlsRfuhwphxmKhxtjwiaDvRlClD1q MLARMDg9GnbnrIuZcCGZ6Ki1Jva3Jzhz2T5ZHv6GGyPMbt6SVcNge5PUXFwzwvwLIabGs62t rn3GHoc58/4IfA6QG3ikAX8J75cIC5qWk2Q7urN23bmZZalElJKY8L+r3b/GRUthaGZ1NPJk uJdL1ibAgRgJ33Tm5keawsLNMmI6KNHCAgHjXShdo2MdMXGF4EXkwYyi0xSdAGci+5O5H3Tk ZZ/xjHDq8S2X4IOqXHKhLtREV6FyFRA+Ouje3TK0EBS83pawE1aHW3+kKxaON0kV0tdtk9Eu QgLUvsJRHMGHDWpGh3jIT2dRniqzNEkECciMdPnjcieVJHL+gaaDHza84VlBQBeimfp5Xg8N oOBwp2r15sd6u3IZPWNn8KqkjAekHsR64DCQ9R8mMUMtHDGc7dEE3NSFCpIPuSK6anRu37Q+ d+mJA6rT8aqKec8Lqm7u3PiTADl9AQQtB3YopKYIH2k= Message-ID: <0ef2b667-fedd-da66-c87a-452f70ffc570@apjanke.net> Date: Tue, 23 Apr 2019 07:45:47 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <875zr6szik.fsf@evledraar.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 4/22/19 1:47 PM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Apr 22 2019, Andrew Janke wrote: > >> On 4/21/19 8:35 PM, Duy Nguyen wrote: >>> On Sun, Apr 21, 2019 at 6:40 PM Andrew Janke wrote: >>>> >>>> Hi, Git folks, >>>> >>>> This is a follow-up to https://marc.info/?l=git&m=154757938429747&w=2. >>> >>> This says the problem with "en" detection has been fixed. Would >>> upgrading gettext fix it? >>> >>> You would need to upgrade something (git or gettext) and if it's >>> already fixed in gettext I don't see why we need a workaround in git. >> >> From reading the bug report, that does sound like it would fix it. But >> from what I can see, that fix hasn't made it out into a released version >> of gettext yet. I haven't downloaded the development gettext to confirm >> the fix. >> >> Looking at the gettext ftp site at https://ftp.gnu.org/pub/gnu/gettext/, >> it looks like gettext does not make frequent releases, and the last >> release was two and a half years ago. Who knows when the next release >> will be. And then it'll take longer to trickle down into Linux >> distributions and such. >> >> From your release history at https://github.com/git/git/releases, it >> seems like Git is a lot more active in making releases than gettext. So >> including this fix in Git would get it into the hands of affected users >> sooner. And it seems like a pretty low-risk change to me. >> >> Then once the new gettext release is out, their fix is confirmed, and it >> makes it out into common distros, the workaround could be removed from Git. > > What does Linux distro release schedule have to do with this? Your > initial report and the linked-to bug on GNU savannah only talk about > this being an issue on OSX. Is there some more general issue I'm > missing? > > People have reported issues with OSX's weird language selection in the > past. I think it makes sense to do whatever we need to hack around it as > long as it's some well-understood and OSX-only hack. > > I'm paranoid that the suggestion of adding an en.po *in general* would > break stuff elsewhere. I'd be surprised if the project linked-to > upthread that used that hack is as widely ported as we are, and that > includes a lot of i18n implementations, not just GNU's. > > Ultimately setlocale() is *supposed* to be a well-understood thing. You > set your preferred locale, programs have translations, the OS takes care > of it. I'm concerned that us trying to be specifically smart in git will > backfire (e.g. it's been suggested in the past to have core.language or > whatever..). > > But it looks like we don't need to go there, this seems like a > workaround needed for some specific OSX version. > > That can just live behind a flag and be detected in config.mak.uname, > no? And then we'd do whatever hack digs us out of that specific hole on > OSX, e.g. maybe generating an en.po *just* there, and just for that list > of known broken version(s) of OSX. > Good point. I had forgotten this was OS X-specific; Linux release schedules are not relevant. (I don't know enough about language selection on Linux to know if would ever be relevant there.) There's no more general issue you're missing; as far as I know this only happens under OS X's multiple-Preferred-languages setup. Yeah, adding the workaround only on OS X sounds like it would work, and would be the more conservative thing to do. Generating a stub en.po just for OS X, and maybe just for affected versions of OS X and gettext, sounds sensible to me. The bad behavior is due to gettext's interaction with OS X's language selection, so whether it happens is probably going to depend on both the version of OS X and the version of gettext you're building against. So if you want to generate it selectively, I think you'll need to check the version of gettext (in the expectation that a future version of gettext will fix this), as well as maybe the version of OS X. This multi-language-selection behavior seems to be by design in OS X; I wouldn't expect it to change in the future. But it seems like some older versions of OS X are not affected by it. I can reproduce the bad-language-selection behavior on OS X 10.12, 10.13, and 10.14. I cannot reproduce it on OS X 10.11, which is the oldest version of OS X I can get running these days. (I'm not sure if that's due to different OS behavior, or if I'm just doing something wrong on that box.) All my testing was done with git 2.21.0 and GNU gettext 0.19.8.1. Cheers, Andrew