feat(i18n): backfill Spanish (es) translations (AI-generated, needs review)#41609
feat(i18n): backfill Spanish (es) translations (AI-generated, needs review)#41609rusackas wants to merge 1 commit into
Conversation
…eview) Fills the 97 remaining untranslated entries in the Spanish catalog using scripts/translations/backfill_po.py (Claude, cross-language context). All generated strings are marked `#, fuzzy` with an attribution comment so they are excluded from compiled .mo output until a human reviewer confirms them. Catalog re-normalized to the Babel 2.17 canonical format via `pybabel update` (toolchain pinned in superset/translations/requirements.txt); the es catalog was already close to canonical, so churn is minimal. Existing translations are untouched (only re-wrapped where line boundaries shifted). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41609 +/- ##
=======================================
Coverage 64.42% 64.42%
=======================================
Files 2668 2668
Lines 147181 147181
Branches 33946 33946
=======================================
Hits 94815 94815
Misses 50649 50649
Partials 1717 1717
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| "%(prefix)sResultados truncados a %(row_count)s filas por limitaciones en " | ||
| "la memoria" |
There was a problem hiding this comment.
Suggestion: This newly backfilled translation is not marked as fuzzy, so it will be compiled into .mo and shipped immediately instead of staying review-gated like the rest of the AI-generated backfill entries. Add the #, fuzzy flag (and attribution comment, if applicable) so it is excluded until human validation. [incomplete implementation]
Severity Level: Major ⚠️
⚠️ Spanish memory-constraint warning uses unreviewed AI translation.
⚠️ Backfill workflow guarantee of fuzzy gating broken.Steps of Reproduction ✅
1. Inspect the Spanish catalog at `superset/translations/es/LC_MESSAGES/messages.po`
around PR hunk lines 255–261 (confirmed via Read), where the msgid for the memory
truncation warning is declared with `#, python-format` and the msgstr on lines 259–260
contains `"%(prefix)sResultados truncados… la memoria"` but there is no `#, fuzzy` comment
attached to this entry.
2. Run the documented command `pybabel compile -d superset/translations -l es`, which
compiles `messages.po` into `messages.mo` and, by default, includes all non-fuzzy msgstr
entries while skipping fuzzy ones (as noted in the PR description that fuzzy entries are
“skipped, as intended”).
3. Start Superset with the locale set to Spanish (`es`) so that translations from
`messages.mo` are used for UI strings pulled from the catalog, including the msgid
`%(prefix)sResults truncated to %(row_count)s rows due to memory constraints.` defined at
lines 15–21 in the same file.
4. Trigger a query that hits the memory truncation path (where the backend calls gettext
with that msgid) and observe that the Spanish UI shows the AI-generated translation from
lines 259–260 even though this backfilled entry is not marked fuzzy and therefore bypasses
the intended human-review gate, unlike nearby machine-translated entries which are all
annotated `#, fuzzy`.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/translations/es/LC_MESSAGES/messages.po
**Line:** 259:260
**Comment:**
*Incomplete Implementation: This newly backfilled translation is not marked as `fuzzy`, so it will be compiled into `.mo` and shipped immediately instead of staying review-gated like the rest of the AI-generated backfill entries. Add the `#, fuzzy` flag (and attribution comment, if applicable) so it is excluded until human validation.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| "Las claves API permiten el acceso programático con ámbito restringido a " | ||
| "Superset." |
There was a problem hiding this comment.
Suggestion: This added translation is also missing the fuzzy marker, which breaks the stated backfill workflow and causes unreviewed AI text to be included in compiled catalogs immediately. Mark it fuzzy until a human reviewer confirms it. [incomplete implementation]
Severity Level: Major ⚠️
⚠️ API key helper text shipped without human review.
⚠️ Inconsistent fuzzy flags on AI backfilled entries.Steps of Reproduction ✅
1. Inspect `superset/translations/es/LC_MESSAGES/messages.po` around PR hunk lines
1017–1033 (confirmed via Read): the msgid `API keys allow scoped programmatic access to
Superset.` at line 1029 now has a Spanish msgstr on lines 1031–1032, but unlike the
preceding machine-translated entry `API key revoked successfully` (lines 14–18) there is
no `#, fuzzy` marker or “Machine-translated via backfill_po.py” comment attached to this
API-keys description.
2. Run `pybabel compile -d superset/translations -l es`, which compiles the Spanish
catalog; because this msgstr is not marked fuzzy, Babel includes it in the generated
`messages.mo` file while fuzzy backfill entries are excluded by default, contrary to the
PR’s stated workflow that all AI backfilled strings remain fuzzy-gated.
3. Start Superset with the locale set to Spanish (`es`) and navigate to the API keys
management UI where the help text for API keys is rendered using the msgid `API keys allow
scoped programmatic access to Superset.` wired to gettext and the es catalog.
4. Observe that the UI shows the AI-generated Spanish text from lines 1031–1032 (“Las
claves API permiten el acceso programático con ámbito restringido a Superset.”) as if it
were a fully-reviewed translation, while other nearby backfilled entries remain fuzzy and
are gated from compilation, demonstrating that this added translation bypasses the
intended fuzzy-review safeguard.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/translations/es/LC_MESSAGES/messages.po
**Line:** 1031:1032
**Comment:**
*Incomplete Implementation: This added translation is also missing the `fuzzy` marker, which breaks the stated backfill workflow and causes unreviewed AI text to be included in compiled catalogs immediately. Mark it fuzzy until a human reviewer confirms it.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fixThere was a problem hiding this comment.
Code Review Agent Run #3e581f
Actionable Suggestions - 3
-
superset/translations/es/LC_MESSAGES/messages.po - 3
- Wrong translation cross-contaminated · Line 1020-1022
- CWE-117: Translation Error on Security Concept · Line 2837-2839
- Semantic error: opposite-direction verb · Line 16817-16817
Additional Suggestions - 2
-
superset/translations/es/LC_MESSAGES/messages.po - 2
-
CWE-707: Wrong translation assigned · Line 9024-9025Cross-contamination detected: the `msgstr` on line 9025 ('El correo electrónico es obligatorio') is the correct translation for the distinct English string 'Email is required' (line 6218). The AI backfill script (`translate_batch`, backfill_po.py:283-312) maps Claude responses by numeric index without validating that the returned translation matches the source `msgid`, causing entries to receive translations meant for different strings. Remove the `#, fuzzy` flag and replace the `msgstr` with the correct string once corrected.
-
Semantic accuracy: formality mismatch · Line 18299-18299Translation 'Necesita' uses formal third-person form where 'Necesitas' (informal second-person) would better match the English 'You need to' addressing the user directly. Review for consistency with other imperative/informal UI strings in the file.
-
Filtered by Review Rules
Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
-
superset/translations/es/LC_MESSAGES/messages.po - 3
- Translation regression causes runtime void · Line 5258-5264
- Duplicate machine-translated entry · Line 15933-15937
- Duplicate machine-translated entry · Line 15949-15957
Review Details
-
Files reviewed - 1 · Commit Range:
0bd5127..0bd5127- superset/translations/es/LC_MESSAGES/messages.po
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
| msgid "API key name is required" | ||
| msgstr "El nombre del rol es obligatorio" | ||
|
|
There was a problem hiding this comment.
Translation for msgid "API key name is required" reads "El nombre del rol es obligatorio" ('The role name is required') — a cross-contamination error from a different entry. Should be "El nombre de la clave API es obligatorio.".
Code Review Run #3e581f
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
| "Los estilos CSS pueden ser eliminados por la depuración HTML del lado del" | ||
| " servidor. Si los estilos no se aplican, solicite al administrador de " | ||
| "Superset que ajuste la configuración de depuración HTML." |
There was a problem hiding this comment.
The term 'depuración HTML' (HTML debugging) is an incorrect translation of 'HTML sanitization' (a security feature that strips dangerous HTML/CSS). In Spanish security terminology, this should be 'desinfección' or 'sanitización' to convey the correct meaning to administrators investigating why their CSS styles are removed. (See also: CWE-117)
Code Review Run #3e581f
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
| @@ -16503,8 +16816,11 @@ msgstr "Desanclar" | |||
| msgid "Unpin from the result panel" | |||
| msgstr "Fijar en el panel de resultados" | |||
There was a problem hiding this comment.
The msgstr says "Fijar" (to pin/fix), which is the opposite of the source "Unpin" (to remove a pin). The file's own precedent uses "Desanclar" for "Unpin" (line 16812) and "Fijar" for "Pin". This was a backfill-generated translation that needs correction before the fuzzy flag is removed.
Code Review Run #3e581f
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
SUMMARY
Backfills the 97 remaining untranslated entries in the Spanish (
es) catalog usingscripts/translations/backfill_po.py, which drafts translations with Claude using every other language's existing translation of the same string as cross-language disambiguation context (perdocs/developer_docs/contributing/howtos.md).All generated strings are marked
#, fuzzywith aMachine-translated via backfill_po.pyattribution comment, so they are excluded from compiled.mooutput until a human reviewer confirms them.Diff notes: the
escatalog was already close to the Babel 2.17 canonical format, so normalization churn is minimal (452/81). Existing translations are untouched — only re-wrapped where line boundaries shifted. Tracked bycheck_translation_regression.pyasuntranslated → fuzzy, which is explicitly not a regression.Part of a per-language sweep to backfill translation gaps. Follows the German backfill (#41608) and the merged Japanese backfill (#41466).
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — translation catalog only, no UI change until entries are reviewed and de-fuzzed.
TESTING INSTRUCTIONS
pybabel compile -d superset/translations -l essucceeds (fuzzy entries are skipped, as intended).#, fuzzyentries; correct anymsgstrand remove the#, fuzzyflag + attribution comment to promote them to confirmed translations.ADDITIONAL INFORMATION