threads / discuss / 31847

L10n regression in 1.8.0.rc2: diffstat summary (git diff --stat, git format-patch)

Subject: L10n regression in 1.8.0.rc2: diffstat summary (git diff --stat, git format-patch)

## tl;dr

4 messages between Oct 17, 2012 and Oct 24, 2012.

replies: 3people: 2as markdown or json

Peter Krefting· Oct 17, 2012, 10:53 UTC · lore
Hi!

The output of "git format-patch" and "git diff --stat" no longer becomes localized when using 1.8.0.rc2, compared to 1.7.12

Running both versions of "git format-patch -1" from the same repository, with the same settings otherwise, has 1.7.12 output the diffstat summary in Swedish, while 1.8.0.rc2 doesn't:

   diff 1.7.12.txt 1.8.0.rc2.txt
   8c8
   <  1 fil ändrad, 1 tillägg(+)
   ---
   >  1 file changed, 1 insertion(+)
   18c18
   < 1.7.12
   ---
   > 1.8.0.rc2

The same applies to "git diff --stat" and "git show --stat". I can understand for "git format-patch" to default to English (but as its output is ignored on read, it doesn't hurt to have it localized), but for diff and show, it is annoying (even if the rest of the "git diff" output also needs to be translated eventually).

-- 
\\// Peter - http://www.softwolves.pp.se/
Nguyen Thai Ngoc Duy· Oct 17, 2012, 11:51 UTC · re: Peter Krefting · lore

Re: L10n regression in 1.8.0.rc2: diffstat summary (git diff --stat, git format-patch)

On Wed, Oct 17, 2012 at 5:53 PM, Peter Krefting <peter@softwolves.pp.se> wrote:
> Hi!
>
> The output of "git format-patch" and "git diff --stat" no longer becomes
> localized when using 1.8.0.rc2, compared to 1.7.12

It's the result of this discussion [1]. I don't remember exactly the open issues. But I think it involves drawing a line between team language vs local language, whether team language can be anything other than English, the maintenance cost for supporting it. You're welcome to revive the discussion. Maybe we can find a solution that is agreed by all parties.

[1] http://thread.gmane.org/gmane.comp.version-control.git/204285/focus=204283
-- 
Duy
Peter Krefting· Oct 19, 2012, 23:38 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: L10n regression in 1.8.0.rc2: diffstat summary (git diff --stat, git format-patch)

Nguyen Thai Ngoc Duy:
> It's the result of this discussion [1]. I don't remember exactly the
> open issues. But I think it involves drawing a line between team
> language vs local language, whether team language can be anything
> other than English, the maintenance cost for supporting it

Like I said, I can see that defaulting format-patch to output English is a good idea (since its output is "protocol data" and not something for human consumption), it is the output from diff and show that I want to have localized.

I'll see if I can come up with a patch that cater for both use-cases. Maybe I can also fix so that log output is fully localized at the same time (translating "commit", "author", "date" and outputting locale dates (although my locale usess ISO dates, so I can get proper formatting there already)).

-- 
\\// Peter - http://www.softwolves.pp.se/
Peter Krefting· Oct 24, 2012, 07:54 UTC · re: Peter Krefting · lore

Re: L10n regression in 1.8.0.rc2: diffstat summary (git diff --stat, git format-patch)

> I'll see if I can come up with a patch that cater for both use-cases.

I see that I forgot to Cc you; please see the patch series starting with the Subject "[RFC PATCH 0/2] Localize log output", which I posted here yesterday.

-- 
\\// Peter - http://www.softwolves.pp.se/

← back to recent threads