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

Re: [PATCH 0/1] Resubmittimg Bulgarian translation of git-gui

From
Johannes Sixt <j6t@kdbg.org>
Date
Jun 23, 2025, 06:18 UTC
Message-ID
<d9561ef1-f67c-492a-b9bd-5adf55cf4868@kdbg.org>
In-Reply-To
<CAP6f5M=cYn_XBN=-zw0ezqFskOSjZiVQwQ60f8k4mb2dYqM-vQ@mail.gmail.com>
Am 22.06.25 um 19:11 schrieb Alexander Shopov:
Show 13 quoted lines
>> not .. obvious, even with `git show --ignore-matching-lines='#:'
>> --color-moved`. Is there a way to enforce a stable order in the .pot
>> file and/or the merged .po files?
> 
> Sadly no. The -s/--sort-output is deprecated (plus it is counter productive).
> https://www.gnu.org/software/gettext/manual/gettext.html#index-_002ds_002c-msgmerge-option
> 
> The default is -F/--sort-by-file which is kind of saner.
> https://www.gnu.org/software/gettext/manual/gettext.html#index-_002dF_002c-msgmerge-option
> 
> It may cause jumping around in case a translatable string that was 
> available in one file, becomes available in a file sorted earlier
> than the format but nothing is 100% proof.

That is acceptable and is mitigated somewhat if the diff is viewed with --color-moved.

As far as I can see, the order of files that are passed to xgettext is stable. We use $(wildcard lib/*.tcl), which is specified to produce a sorted list of file names. If xgettext doesn't do anything silly, this should produce a stable .pot file.

Show 11 quoted lines
> Sorting is not enough for sane diffs. As the location data also 
> contains line numbers - adding a line before a message pushes its
> location down.
> 
> The way I read your message:
> - you are OK with a translator choosing to submit po-files without 
> location info. This will make commits and diffs shorter and more
> understandable and reduces the growth of the repo The info is not
> used during runtime and is easily recoverable - generate the pot and
> merge the translation.
> - you are at least interested in moving the infrastructure to this workflow.
All correct.
> In such a case next time I submit a gitk/git-gui translation I will
> voluntarily remove the locations.

An update of the Makefile rules would also be desirable, so that a simple `make update-po` produces the new format.

-- Hannes
Previous: Alexander Shopov
Message 6 of 6 in “Resubmittimg Bulgarian translation of git-gui”
  1. 0/1 Resubmittimg Bulgarian translation of git-guiAlexander Shopov, Jun 15, 2025
  2. 1/1 git-gui i18n: Updated Bulgarian translation (578t)Alexander Shopov, Jun 15, 2025
  3. Johannes SixtJun 21, 2025
  4. Johannes SixtJun 21, 2025
  5. Alexander ShopovJun 22, 2025
  6. Johannes SixtJun 23, 2025

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.