Skip to content

ci(i18n): add translation and POT validation workflow - #150

Merged
somethingwithproof merged 2 commits into
developfrom
ci/i18n-validation-workflow
Nov 26, 2026
Merged

somethingwithproof merged 2 commits into
developfrom
ci/i18n-validation-workflow

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Adds .github/workflows/i18n-validation.yml, a short caller of the shared reusable-i18n-validation.yml workflow in Cacti/cacti. The checks and their scripts live in one place, so every plugin runs the same validation and a fix there reaches all of them.

It runs on changes to locales/po/*.po, locales/po/*.pot or the workflow file, with permissions: contents: read. For the changed catalogs it runs:

  • msgfmt -c syntax and format-string checks;
  • msgcheck through tests/tools/run_msgcheck.py, which accepts the Devanagari danda (।);
  • the HTML tag and placeholder audit (tests/tools/audit_po.py);
  • the source-string audit of locales/po/cacti.pot (tests/tools/audit_pot.py).

The audits compare against the PR base, so issues already in a catalog do not fail unrelated changes.

Depends on Cacti/cacti#8977, which adds the reusable workflow and audit_pot.py. Until that merges, this check cannot start.

actionlint reports no findings for the caller.

Add SHA-pinned GitHub Actions workflow validating plugin .po and .pot files:
- msgfmt -c -v -o /dev/null syntax and format-string checks
- Devanagari-danda-safe msgcheck==4.2.0 linting (hi/mr/ne/sa)
- Placeholder and HTML tag parity audit matching Cacti/cacti#8970
- POT source-string lint (plural periods, HTML balance, php-format prose)
Uses incremental --base comparison so pre-existing upstream baseline issues
do not break unrelated PRs, and runs a validator self-test on workflow edits.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Replace the copied validation steps with a call to the reusable workflow in
Cacti/cacti, which runs msgfmt, msgcheck and the .po and .pot audits from the
shared scripts in tests/tools. The triggers and the job name stay the same.

Depends on Cacti/cacti#8977, which adds the reusable workflow.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@somethingwithproof
somethingwithproof merged commit 91e7488 into develop Nov 26, 2026
7 checks passed
@somethingwithproof
somethingwithproof deleted the ci/i18n-validation-workflow branch November 26, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants