Skip to content

fix(i18n): ASCII percent signs, restore fuzzied translations, prepare 5.1 (#465) - #482

Merged
TheWitness merged 2 commits into
developfrom
fix/465-zh-tw-percent
Dec 3, 2026
Merged

TheWitness merged 2 commits into
developfrom
fix/465-zh-tw-percent

Conversation

@TheWitness

@TheWitness TheWitness commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Summary

This fixes the code-side items still open in #465 and prepares the branch for the 5.1 release.

Fixes #465

#465: translation fixes

Full-width percent sign (U+FF05). zh-TW, zh-CN and ja-JP used % where the source string has a normal %:

  • In the interface report's InBound % / OutBound % labels, these now use a single ASCII %. Cacti's __uf() unescapes %% only once, so %%% would display as %%.
  • In the MAC authorization help text, which tells users which wildcard character to type, % was the wrong character, because the plugin only accepts %.

These were the only % in any catalog. Cacti's __() sends a string without a real format specifier to __uf(), not sprintf(), so a bare % can't throw an error.

Translations restored after #481. #481 corrected the spelling "aggergated" in two Utilities messages, and Weblate's msgmerge then marked both messages fuzzy in all 42 catalogs. Fuzzy entries aren't compiled, so the messages showed in English in every language. This PR clears the fuzzy flag on those 84 entries. Most translations were fine, but in 8 catalogs (de-DE, he-IL, hi-IN, pl-PL, pt-BR, pt-PT, tr-TR, zh-CN) they had been machine-translated from the misspelled word, giving "intensified", "aggravated", "aggressive" or "approaching" table, a wrong sentence, or an untranslated aggergate. Those now use each catalog's own term for "aggregated".

Compiled catalogs rebuilt. I rebuilt every .mo with msgfmt -c. Each one now has all 865 entries. The committed .mo files also still contained the two retired misspelled messages.

Still open, and needs a Weblate admin. The cacti/mactrack component still has auto-translate addon id 6 in mode: "translate" (80% threshold), which commits unreviewed matches straight to develop. The second auto-translate addon (id 10) is gone. Switching id 6 to suggest can't be done from the repository.

5.1 release prep

Validation

  • msgfmt -c -v passes on all 42 changed catalogs.
  • Cacti's tests/tools/audit_po.py --base origin/develop (develop): OK: 42 file(s) passed.
  • No active fuzzy entries remain in any catalog (checked with polib), so CI's msgcheck --error-on-fuzzy should pass. I couldn't run that wrapper locally because the enchant C library isn't installed here.
  • Compared the old and new .mo files with msgunfmt: the only differences are the edited strings, the restored entries and Weblate's header metadata.
  • No PHP changes.

… 5.1

- zh-TW, zh-CN and ja-JP used the full-width percent sign (U+FF05) in the
  interface InBound/OutBound % labels and in the MAC authorization
  wildcard help, which tells users to type a character the plugin does
  not accept. Use the ASCII form the source string uses.
- Correcting "aggergated" in #481 made Weblate mark the two Utilities
  messages fuzzy in all 42 catalogs, so they showed in English. The
  existing translations are still correct; clear the flag.
- Rebuild every compiled catalog. The committed .mo files also still
  carried the two retired misspelled messages.
- Release prep: rename the pending CHANGELOG section to --- 5.1 ---, fold
  the unreleased documentation note into it, and update the README and
  contributor instructions to 5.1 (INFO is already 5.1).

Fixes #465

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 3, 2026 12:10
@TheWitness

Copy link
Copy Markdown
Member Author

Translation validation: the failure is from older translations, and this PR doesn't add any new errors.

CI's msgcheck step checks every catalog a PR touches, and this PR touches all 42.

Run fuzzy end punctuation
develop (Weblate "Update translation files", 12:02) 84 280
this PR 0 281
  • Fuzzy: this PR clears all 84 fuzzy errors. These are the two restored "aggregated" messages in each of the 42 catalogs.
  • Punctuation: all 281 errors are [punct] end punctuation mismatches in older translations, in am-ET (148), zh-TW (27), zh-CN (26), ja-JP (19), el-GR (15), fr-MA (13), fr-SN (13), sv-SE (11) and 8 others with 1–2 each. Most are false positives for scripts with their own punctuation: CJK translations correctly end in : / 。, and Amharic ends in ።. The single extra error compared with develop is the restored am-ET message, which msgcheck skipped while it was fuzzy. It ends with ።, which is correct, so I left it.

Making this check pass would mean changing correct CJK and Amharic punctuation to ASCII, or teaching Cacti's shared run_msgcheck.py to accept those scripts' equivalents. That belongs in Cacti core's shared i18n tooling, not in this PR. Everything else passes: the PHP 8.2–8.6 tests, CodeQL and SonarCloud.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Chinese labels render doubled percent signs, while newly activated German, Portuguese, and Polish Utilities translations incorrectly describe aggregated tables.

4 open issues
What changed in this PR

Addresses translation cleanup from #465 and prepares Device Tracking’s documentation for release 5.1. No PHP code changes.

Changes:

  • Replaces full-width percent signs in Chinese labels and Chinese/Japanese wildcard help.
  • Restores two Utilities translations in all 42 catalogs after #481’s spelling correction.
  • Updates release notes and version references to 5.1.
File Description
README.md Updates source version to 5.1.
locales/​po/​zu-ZA.po Restores Utilities translations.
locales/​po/​zh-TW.po Restores translations; updates percent signs.
locales/​po/​zh-CN.po Restores translations; updates percent signs.
locales/​po/​yo-NG.po Restores Utilities translations.
locales/​po/​xh-ZA.po Restores Utilities translations.
locales/​po/​vi-VN.po Restores Utilities translations.
locales/​po/​uk-UA.po Restores Utilities translations.
locales/​po/​tr-TR.po Restores Utilities translations.
locales/​po/​sw-KE.po Restores Utilities translations.
locales/​po/​sv-SE.po Restores Utilities translations.
locales/​po/​sr-RS.po Restores Utilities translations.
locales/​po/​so-SO.po Restores Utilities translations.
locales/​po/​rw-RW.po Restores Utilities translations.
locales/​po/​ru-RU.po Restores Utilities translations.
locales/​po/​pt-PT.po Restores Utilities translations.
locales/​po/​pt-BR.po Restores Utilities translations.
locales/​po/​pl-PL.po Restores Utilities translations.
locales/​po/​nl-NL.po Restores Utilities translations.
locales/​po/​mg-MG.po Restores Utilities translations.
locales/​po/​lv-LV.po Restores Utilities translations.
locales/​po/​ko-KR.po Restores Utilities translations.
locales/​po/​ka-GE.po Restores Utilities translations.
locales/​po/​ja-JP.po Restores translations; corrects wildcard character.
locales/​po/​it-IT.po Restores Utilities translations.
locales/​po/​ig-NG.po Restores Utilities translations.
locales/​po/​hr-HR.po Restores Utilities translations.
locales/​po/​hi-IN.po Restores Utilities translations.
locales/​po/​he-IL.po Restores Utilities translations.
locales/​po/​ha-NG.po Restores Utilities translations.
locales/​po/​fr-SN.po Restores Utilities translations.
locales/​po/​fr-MA.po Restores Utilities translations.
locales/​po/​fr-FR.po Restores Utilities translations.
locales/​po/​es-ES.po Restores Utilities translations.
locales/​po/​el-GR.po Restores Utilities translations.
locales/​po/​de-DE.po Restores Utilities translations.
locales/​po/​bs-BA.po Restores Utilities translations.
locales/​po/​bg-BG.po Restores Utilities translations.
locales/​po/​ar-SA.po Restores Utilities translations.
locales/​po/​ar-MA.po Restores Utilities translations.
locales/​po/​ar-EG.po Restores Utilities translations.
locales/​po/​am-ET.po Restores Utilities translations.
locales/​po/​af-ZA.po Restores Utilities translations.
CHANGELOG.md Names release 5.1 and records fixes.
.github/​copilot-instructions.md Aligns version and changelog guidance with 5.1.

Review effort: Balanced

Comment thread locales/po/de-DE.po Resolved
Comment thread locales/po/pl-PL.po Resolved
Comment thread locales/po/pt-BR.po Resolved
Comment thread locales/po/zh-TW.po Resolved
…ted-table messages

Address review on #482:

- Cacti unescapes %% once, so "InBound %%%" renders as "InBound %%". Use a single % in the zh-TW and zh-CN labels.
- The restored Utilities messages were machine-translated from the misspelled "aggergated" and read as "intensified", "aggravated", "aggressive" or "approaching" table in some catalogs. Use each catalog's own term for aggregated in de-DE, pt-BR, pt-PT, pl-PL, he-IL, zh-CN, tr-TR and hi-IN, and rebuild their compiled catalogs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the translation fixes and version 5.1 documentation updates.

No open issues 🎉

4 resolved since last review

Review effort: Balanced

@TheWitness

Copy link
Copy Markdown
Member Author

The remaining Validate Translations failure is fixed in the shared tooling: Cacti/cacti#9136.

  • The reusable workflow's msgcheck step will check only the entries a PR changes (--base), the same as the audit_po.py step already does.
  • run_msgcheck.py will accept the Amharic ። ፦ ፡ and the CJK full-width : ? !.

I ran the updated wrapper against this PR's 42 catalogs with --base, the way CI will run it: 42 files OK. This workflow loads the tooling from Cacti/cacti@develop, so once #9136 merges, re-running this check should pass with no changes here.

@TheWitness
TheWitness merged commit 197337d into develop Dec 3, 2026
10 of 12 checks passed
@TheWitness
TheWitness deleted the fix/465-zh-tw-percent branch December 3, 2026 16:03
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.

i18n: 44 fatal msgfmt errors across 5 .po files, duplicate auto-translate Weblate addon, mojibake, and orphan ka.mo

3 participants