Files
superset2/tests/unit_tests/scripts
Claude Code de4c929e44 test(translations): add unit tests for build_translation_index
Adds 17 tests under tests/unit_tests/scripts/translations/ covering the
two pure helpers (_is_translated, _plural_key) and the build_index
workflow against a tmp_path fixture with three fake languages.

Locks in the cross-language index shape that the AI backfill prompt
depends on:
- fuzzy entries surface as null (so unreviewed drafts don't feed back
  into the prompt as trusted context, and don't inflate --min-context)
- every msgid has a slot for every non-en language (null when missing)
- plural entries are keyed by the msgid\x00msgid_plural composite
- the en source locale and directories without LC_MESSAGES/messages.po
  are excluded
- the .po header entry (empty msgid) is skipped

Addresses the reviewer question on whether the new tooling script
should have test coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 13:54:05 -07:00
..