git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [L10N] fixed mismatched variable names

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 3, 2021, 11:43 UTC
Message-ID
<87sg0v8vr8.fsf@evledraar.gmail.com>
In-Reply-To
<20210703111837.14894-1-worldhello.net@gmail.com>
On Sat, Jul 03 2021, Jiang Xin wrote:
Show 47 quoted lines
> From: Peter Krefting <peter@softwolves.pp.se>
>
> On Tue, Jun 22 2021, Peter Krefting wrote:
>
>> Andrei also pointed out another typo in the Swedish translation, where
>> a configuration option had been copied incorrectly. Could you please
>> amend your patch to contain both these changes?
>>
>> ... ...
>>
>> @@ -2734,7 +2734,7 @@ msgstr "Felaktigt %s: \"%s\""
>>   #: config.c:2512
>>   #, c-format
>>   msgid "splitIndex.maxPercentChange value '%d' should be between 0 and 100"
>> -msgstr "värdet \"%d\" för splitIndex.maxPercentage borde vara mellan 0 och 100"
>> +msgstr "värdet \"%d\" för splitIndex.maxPercentChange borde vara mellan 0 och 100"
>> 
>>   #: config.c:2558
>>   #, c-format
>
> There are definitely more typos like this! In order to find mismatched
> git config variables and other mismatched variable names in the po file,
> I implemented a checker for such typos in the "git-po-helper" in commit:
>
>  * https://github.com/git-l10n/git-po-helper/commit/e44df847abb91227771560aca56719031f280068
>
> To find typos, run:
>
>     git-po-helper check-po XX.po
>
> All easy-to-fix typos can be fixed using the following patch, but there
> are still some typos need to be fixed by l10n team leaders for the
> following languages:
>
>  + bg.po 
>  + id.po
>  + tr.po
>
> Patch for easy-to-fix typos, cut here -- 8< --
>
> Subject: [PATCH] l10n: fixed mismatched config variables
>
> Andrei pointed out a typo in the Swedish translation, where a config
> variable name had been copied incorrectly.
>
> By introducing typo detection function in "git-po-helper", more typos
> were found. All easy-to-fix typos were fixed in this commit.

This seems like a good narrow fix for now, but I'd think a much better fix would be to e.g. add something to the CI or a lintk check based on "git help --config" that errored if any string meant for gettext contains such a variable.

It's data that isn't meant to be translated at all, so we should be passing it as %s to the format string.

I see there's at least one fix that fixes a reference to a function internal to git.git, such a check wouldn't catch that, but that message should be fixed too. We shouldn't have anything referencing code names except the BUG() messages (which we don't translate)>

Previous: Jiang XinNext: Jiang Xin
Message 6 of 10 in “[L10N] l10n: fixed tripple-letter typos”
  1. Jiang XinJun 21, 2021
  2. Peter KreftingJun 21, 2021
  3. Jiang XinJun 22, 2021
  4. Junio C HamanoJun 29, 2021
  5. [L10N] fixed mismatched variable namesJiang Xin, Jul 3, 2021
  6. Ævar Arnfjörð BjarmasonJul 3, 2021
  7. Jiang XinJul 3, 2021
  8. Jiang XinJul 3, 2021
  9. [l10n] po/id.po: fix mismatched variable namesBagas Sanjaya, Jul 5, 2021
  10. Jean-Noël AvilaJun 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.