Skip to content

feat(i18n): backfill Spanish (es) translations (AI-generated, needs review)#41609

Open
rusackas wants to merge 1 commit into
masterfrom
feat/i18n-es-translations
Open

feat(i18n): backfill Spanish (es) translations (AI-generated, needs review)#41609
rusackas wants to merge 1 commit into
masterfrom
feat/i18n-es-translations

Conversation

@rusackas

@rusackas rusackas commented Jul 1, 2026

Copy link
Copy Markdown
Member

SUMMARY

Backfills the 97 remaining untranslated entries in the Spanish (es) catalog using scripts/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 (per docs/developer_docs/contributing/howtos.md).

All generated strings are marked #, fuzzy with a Machine-translated via backfill_po.py attribution comment, so they are excluded from compiled .mo output until a human reviewer confirms them.

Diff notes: the es catalog 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 by check_translation_regression.py as untranslated → 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 es succeeds (fuzzy entries are skipped, as intended).
  • Spanish native speakers: review the #, fuzzy entries; correct any msgstr and remove the #, fuzzy flag + attribution comment to promote them to confirmed translations.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…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>
@dosubot dosubot Bot added the i18n:spanish Translation related to Spanish language label Jul 1, 2026
@github-actions github-actions Bot added the i18n Namespace | Anything related to localization label Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.42%. Comparing base (3e88b48) to head (0bd5127).
⚠️ Report is 1 commits behind head on master.

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           
Flag Coverage Δ
hive 39.10% <ø> (ø)
mysql 57.65% <ø> (ø)
postgres 57.72% <ø> (ø)
presto 40.65% <ø> (ø)
python 59.13% <ø> (ø)
sqlite 57.35% <ø> (ø)
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +259 to +260
"%(prefix)sResultados truncados a %(row_count)s filas por limitaciones en "
"la memoria"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Fix in Cursor Fix in VSCode Claude

(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
👍 | 👎

Comment on lines +1031 to +1032
"Las claves API permiten el acceso programático con ámbito restringido a "
"Superset."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in VSCode Claude

(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 fix
👍 | 👎

@bito-code-review bito-code-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #3e581f

Actionable Suggestions - 3
  • superset/translations/es/LC_MESSAGES/messages.po - 3
Additional Suggestions - 2
  • superset/translations/es/LC_MESSAGES/messages.po - 2
    • CWE-707: Wrong translation assigned · Line 9024-9025
      Cross-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-18299
      Translation '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.

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

AI Code Review powered by Bito Logo

Comment on lines 1020 to 1022
msgid "API key name is required"
msgstr "El nombre del rol es obligatorio"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong translation cross-contaminated

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

Comment on lines +2837 to +2839
"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."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CWE-117: Translation Error on Security Concept

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic error: opposite-direction verb

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n:spanish Translation related to Spanish language i18n Namespace | Anything related to localization size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants