Skip to content

locale: Collect messages of temporal tools and the Python package - #729

Open
echoix wants to merge 4 commits into
mainfrom
claude/collect-python-messages
Open

echoix wants to merge 4 commits into
mainfrom
claude/collect-python-messages

Conversation

@echoix

@echoix echoix commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Description

make pot now also searches:

  • ../temporal for Python tool messages (grassmods),
  • ../python/grass for library messages (grasslibs, the first domain the Python _() looks in).

The templates are not regenerated here; the weekly workflow does that after building.

Motivation and context

MOD_PYFILES only searched ../scripts and LIB_POTFILES only ../lib, so the _() messages of the temporal tools and of the grass Python package were in no template and could not be translated.

gui/scripts (d.rast3d, d.wms) is not searched: these wrappers have no _() messages, and the messages d.wms shows come from the r.in.wms drivers, already collected from scripts/r.in.wms. It needs to be added to MOD_PYFILES when one of them gets its own _() message, for example an error when d.wms is run outside the GUI renderer, which sets GRASS_REGION and GRASS_RENDER_FILE.

How has this been tested?

Ran the xgettext commands of make pot with the old and new file lists and compared:

  • grasslibs: 403 new messages from python/grass, none removed.
  • grassmods: 105 new messages from the temporal tools, none removed.
  • No file is in more than one domain.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Prepared with assistance from Claude (Anthropic).

make pot only searched scripts/ for the Python messages of tools and lib/
for library messages, so the messages of the temporal tools and of the
grass Python package (python/grass) were in no template and could not be
translated. The temporal tools give 106 new messages for grassmods and
the grass package 429 for grasslibs, the first domain the Python _()
looks in. Also search gui/scripts, whose tools are installed like other
script tools.

Developed with assistance from Claude (Anthropic).
claude and others added 3 commits October 11, 2026 12:14
The d.rast3d and d.wms wrappers in gui/scripts have no _() messages, so
searching them added nothing. The messages d.wms shows come from the
r.in.wms drivers, which are already collected from scripts/r.in.wms.
Add gui/scripts to MOD_PYFILES again when one of these scripts gets its
own _() message, for example an error when d.wms is run outside the GUI
renderer, which sets GRASS_REGION and GRASS_RENDER_FILE.

Developed with assistance from Claude (Anthropic).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants