{"thread":{"id":"64191","subject":"format-patch: why are the Range-diff: and Interdiff: headers translated?","startedAt":"2025-09-23T16:54:37Z","lastAt":"2025-09-24T05:11:54Z","messageCount":6,"participants":["Kristoffer Haugsbakk","Eric Sunshine","Jeff King","Ben Knoble"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"527105","messageId":"3945bf06-ba04-4ecb-887e-0f3a76e1c2f8@app.fastmail.com","threadId":"64191","inReplyTo":null,"subject":"format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-09-23T16:53:04Z","receivedAt":"2025-09-23T16:54:37Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"git-format-patch(1) has had translated strings for `Range-diff:` and\n`Interdiff:` since they were introduced.[1][2][3]\n\n    // Example\n    _(\"Interdiff against v%d: ...\n\nIs that how translated/l10n Git is supposed to to work?  I get\ntranslating errors and such—that’s for the user.  But a Colombian user\nmight send out patches to an international email list.  Why should their\nown translated UI (again, if I’m understanding l10n correctly) affect\nthe patch output?\n\nI found no comments on these changes.\n\n🔗 1: https://lore.kernel.org/git/20180722095717.17912-1-sunshine@sunshineco.com/#t\n† 2: 688cb1c9 (Merge branch 'es/format-patch-interdiff', 2018-09-17)\n† 3: 881c019e (Merge branch 'es/format-patch-rangediff', 2018-09-17)\n\n-- \nKristoffer\n"},{"id":"527125","messageId":"CAPig+cS-qYqpK2GOzSLQtqF_gqan6hftnnOnfMFUKby1nT5n7w@mail.gmail.com","threadId":"64191","inReplyTo":"3945bf06-ba04-4ecb-887e-0f3a76e1c2f8@app.fastmail.com","subject":"Re: format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2025-09-23T18:16:13Z","receivedAt":"2025-09-23T18:16:27Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Sep 23, 2025 at 12:54 PM Kristoffer Haugsbakk\n<kristofferhaugsbakk@fastmail.com> wrote:\n> git-format-patch(1) has had translated strings for `Range-diff:` and\n> `Interdiff:` since they were introduced.[1][2][3]\n>\n>     // Example\n>     _(\"Interdiff against v%d: ...\n>\n> Is that how translated/l10n Git is supposed to to work?  I get\n> translating errors and such—that’s for the user.  But a Colombian user\n> might send out patches to an international email list.  Why should their\n> own translated UI (again, if I’m understanding l10n correctly) affect\n> the patch output?\n\nMaking these translatable was deliberate. As I recall, I had been able\nto formulate arguments in favor of both making them translatable and\nmaking them non-translatable, though I no longer remember what those\narguments were. One argument in favor may have been that (a) the\ntitles \"Interdiff\" & \"Range-diff\" are meant for human readers, not for\nmachine consumption, and (b) there may very well be\nnon-English-centric projects (open-source or not) using a patch-based\nworkflow.\n\nI further recall that I was expecting pushback from reviewers and was\nsurprised when there was none. Hence, those titles remained\ntranslatable in the final version.\n\nAs far as I recall, this is only the second time in the intervening\nyears that someone has questioned why the titles are translatable. If\nyour reason for posing this question is that you believe the titles\nshould not be translatable and you wish to submit a patch series to\nrectify that, then you won't get pushback from me. Also, in support of\nsuch a proposal, I do recall (though can't find the email) that Junio\nonce pushed back years ago against someone proposing to make the\ndiffstat \"x file changed, y insertions(+), z deletions(-)\" summary\ntranslatable.\n"},{"id":"527136","messageId":"54b9d6a1-6edf-43e0-8e6b-e096f322df64@app.fastmail.com","threadId":"64191","inReplyTo":"CAPig+cS-qYqpK2GOzSLQtqF_gqan6hftnnOnfMFUKby1nT5n7w@mail.gmail.com","subject":"Re: format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-09-23T19:59:55Z","receivedAt":"2025-09-23T20:00:16Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Sep 23, 2025, at 20:16, Eric Sunshine wrote:\n> On Tue, Sep 23, 2025 at 12:54 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>> git-format-patch(1) has had translated strings for `Range-diff:` and\n>> `Interdiff:` since they were introduced.[1][2][3]\n>>\n>>     // Example\n>>     _(\"Interdiff against v%d: ...\n>>\n>> Is that how translated/l10n Git is supposed to to work?  I get\n>> translating errors and such—that’s for the user.  But a Colombian user\n>> might send out patches to an international email list.  Why should their\n>> own translated UI (again, if I’m understanding l10n correctly) affect\n>> the patch output?\n>\n> Making these translatable was deliberate. As I recall, I had been able\n> to formulate arguments in favor of both making them translatable and\n> making them non-translatable, though I no longer remember what those\n> arguments were.\n\nThanks for quick and solid reply!\n\n> One argument in favor may have been that (a) the titles \"Interdiff\" &\n> \"Range-diff\" are meant for human readers, not for machine consumption,\n> and (b) there may very well be non-English-centric projects\n> (open-source or not) using a patch-based workflow.\n\nI’m not concerned about machine-readability.  My thought was that\nlocalization/l10n of this software was intended for the user themselves.\nAnd also that users might, without intending to do so necessarily, end\nup using localized output in contexts where they do want English\nstrings, like on an English-language mailing list.  Even though they\nmight prefer Spanish (from my Colombian example) when using Git\nthemselves.\n\nBut there might for all I know be Colombian/Latin American patch mailing\nlists where localization like this works great.\n\nI’m not really in the natural target group for l10n Git.  I might be\ntotally missing all the use-cases here.\n\n> I further recall that I was expecting pushback from reviewers and was\n> surprised when there was none. Hence, those titles remained\n> translatable in the final version.\n>\n> As far as I recall, this is only the second time in the intervening\n> years that someone has questioned why the titles are translatable. If\n> your reason for posing this question is that you believe the titles\n> should not be translatable and you wish to submit a patch series to\n> rectify that, then you won't get pushback from me. Also, in support of\n> such a proposal, I do recall (though can't find the email) that Junio\n> once pushed back years ago against someone proposing to make the\n> diffstat \"x file changed, y insertions(+), z deletions(-)\" summary\n> translatable.\n\nOh, not at all.  I don’t intend to send any patches to change something\nthat only me (and one other person from years ago?) have questions\nabout.  These are only questions, after all (from my side anyway).\n\nGood night!\n\n-- \nKristoffer Haugsbakk\n"},{"id":"527165","messageId":"20250924004133.GA1142438@coredump.intra.peff.net","threadId":"64191","inReplyTo":"54b9d6a1-6edf-43e0-8e6b-e096f322df64@app.fastmail.com","subject":"Re: format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-09-24T00:41:33Z","receivedAt":"2025-09-24T00:41:35Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 23, 2025 at 09:59:55PM +0200, Kristoffer Haugsbakk wrote:\n\n> I’m not concerned about machine-readability.  My thought was that\n> localization/l10n of this software was intended for the user themselves.\n> And also that users might, without intending to do so necessarily, end\n> up using localized output in contexts where they do want English\n> strings, like on an English-language mailing list.  Even though they\n> might prefer Spanish (from my Colombian example) when using Git\n> themselves.\n> \n> But there might for all I know be Colombian/Latin American patch mailing\n> lists where localization like this works great.\n> \n> I’m not really in the natural target group for l10n Git.  I might be\n> totally missing all the use-cases here.\n\nI'm not a user of the l10n stuff either, so you can take my opinion with\na grain of salt. But it seems obvious to me that \"the language I am most\ncomfortable using\" and \"the language for the project I am contributing\nto\" might not necessarily be the same.\n\nI'm not sure how well gettext supports this use case, though. The first\none should obviously come from LANG, etc. If we added a hypothetical\nformat.lang config option, is there a way to tell gettext to translate a\nstring using a language string provided per-call, rather than from the\nenvironment?\n\nI don't know that anybody is really even asking for this, so I'm not\nproposing to spend a lot of effort on it. But the thread made me wonder\nwhat is even possible/easy to do here.\n\n-Peff\n"},{"id":"527167","messageId":"43606056-D212-408C-8E53-0B082ED1BF55@gmail.com","threadId":"64191","inReplyTo":"20250924004133.GA1142438@coredump.intra.peff.net","subject":"Re: format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-09-24T02:08:42Z","receivedAt":"2025-09-24T02:08:54Z","isPatch":false,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 23 sept. 2025 à 20:42, Jeff King <peff@peff.net> a écrit :\n> \n> ﻿On Tue, Sep 23, 2025 at 09:59:55PM +0200, Kristoffer Haugsbakk wrote:\n> \n>> I’m not concerned about machine-readability.  My thought was that\n>> localization/l10n of this software was intended for the user themselves.\n>> And also that users might, without intending to do so necessarily, end\n>> up using localized output in contexts where they do want English\n>> strings, like on an English-language mailing list.  Even though they\n>> might prefer Spanish (from my Colombian example) when using Git\n>> themselves.\n>> \n>> But there might for all I know be Colombian/Latin American patch mailing\n>> lists where localization like this works great.\n>> \n>> I’m not really in the natural target group for l10n Git.  I might be\n>> totally missing all the use-cases here.\n> \n> I'm not a user of the l10n stuff either, so you can take my opinion with\n> a grain of salt. But it seems obvious to me that \"the language I am most\n> comfortable using\" and \"the language for the project I am contributing\n> to\" might not necessarily be the same.\n\nYep. My own patches have probably come in with French titles here because I set LANG that way.\n\n> I'm not sure how well gettext supports this use case, though. The first\n> one should obviously come from LANG, etc. If we added a hypothetical\n> format.lang config option, is there a way to tell gettext to translate a\n> string using a language string provided per-call, rather than from the\n> environment?\n> \n> I don't know that anybody is really even asking for this, so I'm not\n> proposing to spend a lot of effort on it. But the thread made me wonder\n> what is even possible/easy to do here.\n\nI’m not asking at the moment, since it hasn’t bothered anyone. If it does and there’s a need to do something else, I’ll fix my workflow (opting in to such new config or otherwise, as the case may be).  "},{"id":"527172","messageId":"20250924051153.GA1173044@coredump.intra.peff.net","threadId":"64191","inReplyTo":"43606056-D212-408C-8E53-0B082ED1BF55@gmail.com","subject":"Re: format-patch: why are the Range-diff: and Interdiff: headers translated?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-09-24T05:11:53Z","receivedAt":"2025-09-24T05:11:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 23, 2025 at 10:08:42PM -0400, Ben Knoble wrote:\n\n> Yep. My own patches have probably come in with French titles here\n> because I set LANG that way.\n\nTBH, I hadn't even noticed. I think after a while I end up just looking\npast stuff like:\n\n> > Le 23 sept. 2025 à 20:42, Jeff King <peff@peff.net> a écrit :\n\nwithout even reading it. I did a quick search in the archives, and yeah,\none of your v2's has \"Diff-intervalle contre v1\". It's pretty clear what\nit means in context even if you don't understand any French, and I think\nit adds some flavor to the list. ;)\n\n-Peff\n"}]}