[GRASS-git] [OSGeo/grass] a5a14a: locale: Make pot file generation stable (#8010)

Edouard Choinière noreply at github.com
Mon Oct 5 12:27:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: a5a14ae0793cd006111395e1c46c0e462dae195e
      https://github.com/OSGeo/grass/commit/a5a14ae0793cd006111395e1c46c0e462dae195e
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M lib/vector/Vlib/build_sfa.c
    M locale/Makefile

  Log Message:
  -----------
  locale: Make pot file generation stable (#8010)

* libvector: Use the same plural string for vertices registered in build_sfa.c

The message "One vertex registered" is used in build_nat.c with the plural
"%" PRId64 " vertices registered" and in build_sfa.c with "%d vertices
registered". A .pot file keeps only one plural form per singular msgid, and
xgettext keeps the first one it reads. The input file list comes from find,
whose order is not stable, so the template flipped between the two forms
from one update to the next. Each flip changed the msgid and made the
existing translations fuzzy.

Use the 64-bit form in build_sfa.c as well, casting the int counters, so
all three call sites share one msgid_plural.

Prepared with AI assistance (Claude Code); the root cause was found from
the history of locale/templates/grasslibs.pot.

Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>

* locale: Sort the input file lists for xgettext

The lists of files given to xgettext come from find, whose order depends
on the filesystem and can differ between runners. When the same msgid is
used with different plural forms, xgettext keeps the first one it reads, so
the generated .pot files could change without any change in the code.

Sort the lists with LC_ALL=C so that the order is the same everywhere.

Prepared with AI assistance (Claude Code).

Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>

* Apply batched suggestions from code review

Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>

---------

Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list