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-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 9B7A81F4B4 for ; Fri, 15 Jan 2021 16:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726402AbhAOQaX (ORCPT ); Fri, 15 Jan 2021 11:30:23 -0500 Received: from cloud.peff.net ([104.130.231.41]:57386 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbhAOQaX (ORCPT ); Fri, 15 Jan 2021 11:30:23 -0500 Received: (qmail 2780 invoked by uid 109); 15 Jan 2021 16:29:42 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 15 Jan 2021 16:29:42 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 30920 invoked by uid 111); 15 Jan 2021 16:29:42 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 15 Jan 2021 11:29:42 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 15 Jan 2021 11:29:41 -0500 From: Jeff King To: Johannes Schindelin Cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, =?utf-8?B?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= , SZEDER =?utf-8?B?R8OhYm9y?= Subject: Re: [PATCH 04/11] sha1dc: mark forgotten message for translation Message-ID: References: <8f2c08474a75793c24af7d4ae44d73d2b23920bc.1610441263.git.gitgitgadget@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Jan 15, 2021 at 04:43:05PM +0100, Johannes Schindelin wrote: > > > - die("SHA-1 appears to be part of a collision attack: %s", > > > + die(_("SHA-1 appears to be part of a collision attack: %s"), > > > hash_to_hex_algop(hash, &hash_algos[GIT_HASH_SHA1])); > > > > I didn't find any list discussion, but I think I may have actually left > > this untranslated intentionally. Like a BUG(), we'd expect it to come up > > basically never. And when it does, being able to search for the exact > > wording online may be more important than providing a translated > > version. > > I disagree with that reasoning. By that rationale, any message we deem to > be somewhat rare should be _untranslated_. > > A much better rule, at least from my perspective is: is the target > audience the Git users? If so, the message is to be translated. If not, > then not. That's what I was getting at. The audience is really Git developers, just like it would be for a BUG(). We don't expect either of those things to happen. > In this instance, it is quite obviously targeting the Git users who need > to understand why the command they tried to run was failing. The test in > t0013 is totally agreeing with this: > > test_expect_success 'test-sha1 detects shattered pdf' ' > test_must_fail test-tool sha1 <"$TEST_DATA/shattered-1.pdf" 2>err && > test_i18ngrep collision err && > grep 38762cf7f55934b34d179ae6a4c80cadccbb7f0a err > ' > > Notice that `test_i18ngrep`? It tells me that we expect this message to be > translated. Well, I wrote both that line and the untranslated original code, so I'm not sure what we can deduce from that. ;) But yeah, I am not strongly opposed to translating this. I brought it up more in the line of "I don't think it's that big a deal that it was not translated". -Peff