Re: [PATCH 04/11] sha1dc: mark forgotten message for translation
From: Jeff King <hidden>
Date: 2021-01-15 16:30:24
On Fri, Jan 15, 2021 at 04:43:05PM +0100, Johannes Schindelin wrote:
quoted
quoted
- 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