mirror of
https://github.com/apache/superset.git
synced 2026-05-29 11:45:16 +00:00
Four "Apply suggestion" commits from codeant-ai replaced real code bodies
with docstring-only lines, breaking syntax (syntax errors at
build_translation_index.py:119). Restore the bodies while keeping the
suggested docstrings:
- build_translation_index.py: _plural_key, main()
- backfill_po.py: _lang_name, _plural_key
Also addresses two major issues raised in review:
1. parse_response() in backfill_po.py used str(v) on values, which
converted dict responses (from plural entries) into Python repr
like "{'0': 'x'}" that json.loads could not later parse in
_apply_translation. Serialize dict/list values with json.dumps.
2. build_index() wrote fuzzy entries as trusted context in the
cross-language index, letting AI-generated drafts propagate back
into future backfill runs as if reviewed. Gate index values via
_is_translated so fuzzy entries become null.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>