public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jiang Xin <worldhello.net@gmail•com>
Cc: "Alexander Shopov" <ash@kambanaria•org>,
	"Git List" <git@vger•kernel.org>,
	jmas@softcatala•org, alexhenrie24@gmail•com,
	ralf.thielow@gmail•com, matthias.ruester@gmail•com,
	phillip.szelat@gmail•com, vyruss@hellug•gr,
	christopher.diaz.riv@gmail•com, jn.avila@free•fr,
	flashcode@flashtux•org, bagasdotme@gmail•com,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
	alessandro.menti@alessandromenti•it, elongbug@gmail•com,
	cwryu@debian•org, uneedsihyeon@gmail•com, arek_koz@o2•pl,
	dacs.git@brilhante•top, "insolor@gmail•com" <insolor@gmail•com>,
	peter@softwolves•pp.se, bitigchi@me•com, ark@cho•red,
	kate@kgthreads•com, "vnwildman@gmail•com" <vnwildman@gmail•com>,
	pclouds@gmail•com, "dyroneteng@gmail•com" <dyroneteng@gmail•com>,
	"oldsharp@gmail•com" <oldsharp@gmail•com>,
	"lilydjwg@gmail•com" <lilydjwg@gmail•com>,
	me@angyi•io, "pan93412@gmail•com" <pan93412@gmail•com>,
	"franklin@goodhorse•idv.tw" <franklin@goodhorse•idv.tw>
Subject: Re: Is there any interest in localizing term delimiters in git messages?
Date: Tue, 17 Oct 2023 19:47:24 -0700	[thread overview]
Message-ID: <xmqqwmvkve83.fsf@gitster.g> (raw)
In-Reply-To: <CANYiYbHK90Ptq5v4EbquyRA7N9jo=xwkg=WuM=r60Wh9HMxdyA@mail.gmail.com> (Jiang Xin's message of "Wed, 18 Oct 2023 10:01:52 +0800")

Jiang Xin <worldhello.net@gmail•com> writes:

> Starting with the release of git 2.34.0 two years ago, we had a new
> l10n pipeline and the git-po-helper tool as part of our l10n workflow.
> The first version of git-po-helper introduced a validator to protect
> git command parameters and variable names in megid.

Ahh, that is the piece I was missing.  I didn't know you guys are
doing extra checks that could trigger false positives.

> E.g. In pull
> request 541 (https://github.com/git-l10n/git-po/pull/541), a
> mismatched variable name "new_index" was reported in bg.po as below:
>
>     level=warning msg="mismatch variable names in msgstr: new_index"
>     level=warning msg=">> msgid: unable to write new_index file"
>     level=warning msg=">> msgstr: новият индекс не може да бъде записан"
>
> And po/bg.po changed as below:
>
>     msgid "unable to write new_index file"
>     msgstr "новият индекс (new_index) не може да бъде записан"

Wait.  Is this supposed to be a good example of validator working
well?  We use this exact message three times in builtin/commit.c; is
the validator insisting on the translated message to have verbatim
string "new_index" in it so that the end-users will see it?

I may still be confused, but if that is what is going on, I think it
is a wrong validation in this particular case.  I can understand if
we were creating say .git/new_index file and it helps the end users
to diagnose a troubled repository by running "ls .git" to see if a
file called "new_index" exists and getting in the way, but I do not
think it is the case.  A new file ".git/index.lock" is created via
repo_hold_locked_index() and I do not think it helps the end-user to
know that we may be calling it "new_index" internally among the
developers' circle.  If the message were about "index.lock", it
might be a different story, but such an error would probably have
been issued long before write_locked_index() gets called.

I'd suggest doing s/new_index/new index/ to msgid string for these
anyway.

> Later, more validators were introduced into git-po-helper for checking
> git config name, place holders, etc. "git-po-helper" used a list of
> regular expressions to find git config names, placeholders, and there
> are some false positive cases need to be ignored.

OK, and "<file>" in msgid string, for example, will automatically
insist on the translated msgstr string to have a string that is
enclosed by a pair of such angle brackets, regardless of the target
language convention?  If so, I can now understand where Alexander
comes from (assuming that the common convention in Bulgarian language
is not to use a pair of angle brackets to highlight such a placeholder
word).

I can see that you have a lot better handle on the matter than I do,
so I trust you and Alexander can resolve what the best "validation"
(and possibly override per language) should be in the git-po-helper
tool.

Thanks for explaining.

  reply	other threads:[~2023-10-18  2:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 21:09 Is there any interest in localizing term delimiters in git messages? Alexander Shopov
2023-10-17 21:49 ` Junio C Hamano
2023-10-18  2:01   ` Jiang Xin
2023-10-18  2:47     ` Junio C Hamano [this message]
2023-10-18  3:08       ` [PATCH] commit: do not use cryptic "new_index" in end-user facing messages Junio C Hamano
2023-10-19  5:08       ` Is there any interest in localizing term delimiters in git messages? Jiang Xin
2023-10-19 17:52         ` Junio C Hamano
2023-10-19 18:07           ` Jeff Hostetler
2023-10-19 19:18             ` Junio C Hamano
2023-10-19 19:47           ` Torsten Bögershausen
2023-10-19 20:16             ` Junio C Hamano
2023-10-21  9:30 ` Peter Krefting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqwmvkve83.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=alessandro.menti@alessandromenti$(echo .)it \
    --cc=alexhenrie24@gmail$(echo .)com \
    --cc=arek_koz@o2$(echo .)pl \
    --cc=ark@cho$(echo .)red \
    --cc=ash@kambanaria$(echo .)org \
    --cc=avarab@gmail$(echo .)com \
    --cc=bagasdotme@gmail$(echo .)com \
    --cc=bitigchi@me$(echo .)com \
    --cc=christopher.diaz.riv@gmail$(echo .)com \
    --cc=cwryu@debian$(echo .)org \
    --cc=dacs.git@brilhante$(echo .)top \
    --cc=dyroneteng@gmail$(echo .)com \
    --cc=elongbug@gmail$(echo .)com \
    --cc=flashcode@flashtux$(echo .)org \
    --cc=franklin@goodhorse$(echo .)idv.tw \
    --cc=git@vger$(echo .)kernel.org \
    --cc=insolor@gmail$(echo .)com \
    --cc=jmas@softcatala$(echo .)org \
    --cc=jn.avila@free$(echo .)fr \
    --cc=kate@kgthreads$(echo .)com \
    --cc=lilydjwg@gmail$(echo .)com \
    --cc=matthias.ruester@gmail$(echo .)com \
    --cc=me@angyi$(echo .)io \
    --cc=oldsharp@gmail$(echo .)com \
    --cc=pan93412@gmail$(echo .)com \
    --cc=pclouds@gmail$(echo .)com \
    --cc=peter@softwolves$(echo .)pp.se \
    --cc=phillip.szelat@gmail$(echo .)com \
    --cc=ralf.thielow@gmail$(echo .)com \
    --cc=uneedsihyeon@gmail$(echo .)com \
    --cc=vnwildman@gmail$(echo .)com \
    --cc=vyruss@hellug$(echo .)gr \
    --cc=worldhello.net@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox