rusackas opened a new pull request, #41828:
URL: https://github.com/apache/superset/pull/41828
### SUMMARY
Closes out the mechanical loose ends of the i18n sweep. Master had **82
`msgfmt --check` fatal errors** across 19 catalogs; this PR brings **all 28
catalogs to zero**, with no translation regressions.
**What's in here:**
1. **ja plural fixes** — 7 entries with hardcoded numbers or
cross-contaminated values (`%s min ago` was translated as *1 month ago*; `%s
metrics` as *sort metrics*). Kept fuzzy for human review.
2. **Canonicalization** — 8 catalogs had drifted from the pinned babel-2.17
wrap (en/fr/ja/ro/ru/sr/sr_Latn/zh_TW). One-time rewrap; `pybabel update` is
now a no-op on every catalog. This also synced ro/sr/sr_Latn to the current
template — their "100% complete" status predated newer msgids entirely.
3. **Every plural-form format-spec fatal repaired**, by class:
- *hardcoded-1 singular forms* (`Modified 1 column…`) — Slavic form-0
also serves n=21, 31…, so the number must be a placeholder; replaced
per-language preserving the translators' grammar.
- *the dual-parameter suggestions string* — form-0 now uses
`%(lastSuggestion)s` (identical value at n=1); 3-form catalogs additionally
carry all plural args, with `firstSuggestions` collapsing invisibly at n=1.
- *pt's cross-contaminated `Deleted …` family* — six entries said
`Selecione…` ("Select…") or crammed both variants into one string; retranslated
properly.
- *fa's empty plural forms* and *mi's truncated ECharts `{a}/{b}/{c}/{d}`
label legend*.
4. **The `% calculation` trap, fixed durably** — `% c` parses as an
accidentally-valid %-format directive (space flag + conversion char), so babel
auto-flags these three labels `python-format` on every write, and msgfmt then
fatals on any translation. `babel_update.sh` now strips the flag *after* its
update pass (babel re-adds it mid-run, so ordering matters); applied to the pot
and all catalogs.
**Verification:** `msgfmt --check` clean on all 28 catalogs;
`check_translation_regression.py`: no regressions (0 translations lost, counts
unchanged except ro/ru/sr dropping entries for msgids that no longer exist in
the app).
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — catalog hygiene.
### TESTING INSTRUCTIONS
```bash
for f in superset/translations/*/LC_MESSAGES/messages.po; do msgfmt --check
-o /dev/null $f; done
python scripts/translations/check_translation_regression.py --count
--translations-dir superset/translations
```
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]