Re: [PATCH 1/4] sequencer: do not translate reflog messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 18 2022, Michael J Gruber wrote:

> Traditionally, reflog messages were never translated, in particular not
> on storage.
>
> Due to the switch of more parts of git to the sequencer, old changes in
> the sequencer code may lead to recent changes in git's behaviour. E.g.:
> c28cbc5ea6 ("sequencer: mark action_name() for translation", 2016-10-21)
> marked several uses of `action_name()` for translation. Recently, this
> lead to a partially translated reflog:
>
> `rebase: fast-forward` is translated (e.g. in de to `Rebase: Vorspulen`)
> whereas other reflog entries such as `rebase (pick):` remain
> untranslated as they should be.
>
> Change the relevant line in the sequencer so that this reflog entry
> remains untranslated, as well.
>
> Signed-off-by: Michael J Gruber <git@xxxxxxxxx>
> ---
>  sequencer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 5f22b7cd37..51d75dfbe1 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -575,7 +575,7 @@ static int fast_forward_to(struct repository *r,
>  	if (checkout_fast_forward(r, from, to, 1))
>  		return -1; /* the callee should have complained already */
>  
> -	strbuf_addf(&sb, _("%s: fast-forward"), _(action_name(opts)));
> +	strbuf_addf(&sb, "%s: fast-forward", action_name(opts));
>  
>  	transaction = ref_transaction_begin(&err);
>  	if (!transaction ||

I 95% agree with this direction, but the other 5% of me is thinking
"isn't this fine then? Let's keep it?".

I.e. from the very beginning we've really tried not to translate file
formats and plumbing, to the point of having the (now removed) "gettext
poison" facility to try to smoke out any such cases (but it wouldn't
have caught this one).

We've even done this to the point of not translating things like the
"revert" template, even though that's an entirely "soft" file format as
far as anyone being able to rely on it goes.

But reflogs are local-only, if you're using Git in German isn't it
useful to you to have this messaging in German too? We don't "push" them
around, and to the extent that there's shared environments they (should)
ensure LC_ALL=C if they care.

Of course more useful would be if we wrote it in some language-agnostic
format and changed it on the fly, but perhaps we've inadvertently run an
experiment here that's shows us this is fine?

We do have some translated "file format" output already, notable
whatever we write into the "gc.log". Perhaps we should treat this the
same.

I'm *not* noting the other 95% argument(s) for accepting this change,
just playing devil's advocate for the 5% one :)





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux