Re: [PATCH v4 6/8] refs: introduce the `ref_transaction_update_reflog` function
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Dec 20, 2024, 10:55 UTC
- Message-ID
- <CAOLa=ZR3fNRdGyYcvOBi=79WyOEr5VF7KD=p3JuGO6jUCfxANw@mail.gmail.com>
- In-Reply-To
- <xmqq4j2zifmy.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Toon Claes <toon@iotcl.com> writes:
>
>>> + const char *what = flags & REF_LOG_ONLY ? "reflog for pseudoref" : "pseudoref";
>>
>> These strings are not localized.
>>
>>> + strbuf_addf(err, _("refusing to update %s '%s'"), what, refname);
>>> return 0;
>
> And the structure forces sentence logo. If "reflog for pseudoref"
> were masculine and "pseudoref" were feminine in a language where the
> verb "update" conjugates differently based on its object, the
> resulting construction cannot be translated. Rather, we'd need to
> do something uglier like this:
>
> const char *refusal_msg;
> if (flag & REF_LOG_ONLY)
> refusal_msg = _("refusing to update reflog for pseudoref '%s'");
> else
> refusal_msg = _("refusing to update pseudoref '%s'");
> ...
> strbuf_addf(err, refusal_msg, refname);Indeed. Will add this in. I think its better to prioritize good translation here.