Replace the hardcoded DO_NOT_TRANSLATE set with a canonical registry file
(superset/translations/do-not-translate.txt) and a propagating, gettext-native
marker, so do-not-translate status is consistent across every catalog and
maintained in one place.
- superset/translations/do-not-translate.txt: the msgid registry.
- scripts/translations/apply_do_not_translate.py: stamps each registry msgid in
messages.pot with a `#. MACHINE_READ-DO_NOT_TRANSLATE` extracted comment via
format-preserving text edit (idempotent). Wired into babel_update.sh after
extraction; `pybabel update` then propagates the marker into every .po.
- backfill_po.py: loads the registry (single source of truth) and honors the
`#. MACHINE_READ-DO_NOT_TRANSLATE` marker (extracted comment) as well as the
legacy `# Не переводить` translator comment, in the extracted OR translator
comment.
- UPDATING.md + howtos: document the new standard.
There is no official gettext "do not translate" flag; an extracted comment
propagated from the .pot is the closest native, cross-language mechanism.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The backfill only checked for an empty msgstr, so it filled entries a human
translator had deliberately left blank — e.g. the ru catalog's "# Не переводить"
(do-not-translate) markers on literal tokens. This translated strings that must
stay identical to the source: icon names (`bolt` -> the ⚡ Explore control
icon), d3 enum values (`step-after`/`step-before`), API field names
(`error_message`), SQL keywords, code constants, and example placeholders.
Add `_is_do_not_translate`, consulted when collecting untranslated entries. An
entry is skipped if its msgid is in the curated `DO_NOT_TRANSLATE` set (seeded
from the ru translator's markers; language-independent) or if it carries an
explicit do-not-translate translator comment in any catalog. Skipped entries are
reported and left untranslated (source-token fallback).
Adds unit tests for the curated set, translator-comment honoring (incl. the
Cyrillic marker), and the normal-entry pass-through.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>