fix(i18n-es): correct stranded translations in API key and semantic layer catalogs - #43080
Draft
glaterza wants to merge 1 commit into
Draft
fix(i18n-es): correct stranded translations in API key and semantic layer catalogs#43080glaterza wants to merge 1 commit into
glaterza wants to merge 1 commit into
Conversation
…ayer catalogs
Two recently-added features shipped with near-totally stranded Spanish
catalogs. `pybabel update`'s fuzzy matcher copied translations from
unrelated entries, so the Spanish says something the English does not.
Every entry corrected here is `#, fuzzy`, and both the frontend and
backend builds compile with `--use-fuzzy`, so all of these are live in
the UI today.
The corrections are not judgement calls: the correct terminology already
exists in this catalog on non-fuzzy entries, and the fuzzy entries
contradict it.
"An error occurred while fetching semantic layers"
-> "...las capas semanticas" (not fuzzy, correct)
"Semantic Layer" -> "Capa de anotacion" ("Annotation layer")
"%s Semantic View" -> "%s Vista semantica" (not fuzzy, correct)
"Semantic view does not exist" -> "El conjunto de datos no existe"
"API keys allow scoped programmatic access to Superset."
-> "Las claves API..." (not fuzzy, correct)
"API Keys" -> "Clave privada" ("Private key")
Worst of the set, all user-facing:
"Inactive" -> "Activo" (inverted)
"Semantic" -> "Correo electronico" ("Email")
"Create API Key" -> "Creado por" ("Created by")
"Expired" -> "Explorar" ("Explore")
"Last Used" -> "Listar usuarios" ("List users")
"Definition" -> "desviacion" ("deviation")
"Revoked" -> "Trazado" ("Plotted")
"Mapbox (API key required)" -> "El correo electronico es obligatorio"
"Are you sure you want to revoke this API key? ..."
-> "Seguro que quieres eliminar las anotaciones seleccionadas?"
The API key status column is headed "Estado" and renders one of Active /
Inactive / Expired / Revoked. "Active" -> "Activo" is shared with the
alert and report list, so it is fixed masculine; the other three agree
with it rather than with the feminine "clave".
Scope is limited to msgids used only within these two features, so no
wording changes elsewhere in the app. Entries carrying a backfill_po.py
attribution comment are excluded: those are machine-translated drafts
awaiting a separate review step, and their problem is register rather
than meaning.
Also folds in "Client ID" and "Slice Id", raised in review of apache#42808.
Both were stranded from "Line width" ("Anchura de la linea"), alongside
the "Client Secret" that apache#42808 already corrected.
Only one of the 64 entries contains a format placeholder, and its
specifier set is unchanged, so clearing the fuzzy flags introduces no new
msgfmt format errors: the blanket un-fuzzy check reports the same 4
pre-existing fatal errors as master.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #43080 +/- ##
==========================================
- Coverage 66.57% 66.57% -0.01%
==========================================
Files 2866 2866
Lines 162322 162322
Branches 37353 37353
==========================================
- Hits 108067 108064 -3
- Misses 52188 52190 +2
- Partials 2067 2068 +1
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Two recently-added features — API keys and semantic layers / views — shipped with near-totally stranded Spanish catalogs.
pybabel update's fuzzy matcher copies a translation from a similar-lookingmsgid; when it guesses wrong, the Spanish ends up saying something the English never said.Every entry corrected here is flagged
#, fuzzy. Both the frontend and backend builds compile with--use-fuzzy, so all of these are live in the UI today — the flag means "needs review", not "withheld".This is the same defect class as #42808, applied to two feature clusters deliberately left out of it: correcting one toast to say capa semántica while 33 neighbours still said capa de anotación would have read worse than being consistently wrong.
These are not judgement calls about my Spanish. The correct terminology already exists in this catalog on non-fuzzy entries, and the fuzzy entries contradict it:
An error occurred while fetching semantic layers→ "…las capas semánticas"Semantic Layer→ "Capa de anotación"%s Semantic View→ "%s Vista semántica"Semantic view does not exist→ "El conjunto de datos no existe"API keys allow scoped programmatic access to Superset.→ "Las claves API…"API Keys→ "Clave privada"Physical→ "Físico"Semantic→ "Correo electrónico"So the change is verifiable by a reviewer who does not read Spanish: it makes the fuzzy entries agree with the reviewed entries already in the file.
The worst of the set, all user-facing:
InactiveSemanticCreate API KeyExpiredLast UsedDefinitionRevokedAPI KeysMapbox (API key required)Failed to fetch API keysAdd %s view(s)Semantic layer does not existAre you sure you want to revoke this API key? This action cannot be undone.Inactive→ "Activo" is the one I would most like a second pair of eyes on: it is a status badge asserting the opposite of the truth.On gender. The API key status column is headed Estado and renders one of Active / Inactive / Expired / Revoked.
Active→ "Activo" is shared with the alert & report list, so it is effectively fixed masculine; the other three agree with it (and with estado) rather than with the feminine clave. Mixing genders down one column would be worse than either choice made consistently.Scope. 64 entries: 63 get a corrected
msgstr, and one (API key name is required) was already correct Spanish carrying a stale fuzzy flag. Every msgid was checked to be used only insidefeatures/apiKeys/,features/semanticViews/, orfeatures/semanticLayers/, so nothing here changes wording elsewhere in the app.Deliberately excluded:
backfill_po.pyattribution comment (12 in these clusters). Those are machine-translated drafts awaiting the review step indocs/developer_docs/contributing/howtos.md; their problem is register, not meaning, and mixing them in would blur two different claims.features/semanticLayers/label.ts, which swaps "dataset" → "datasource" and "database" → "data connection" when the flag is on. All eight alternate labels currently collapse to the single string "Conexiones de la base de datos" regardless of case or number, so lower case mid-sentence uses render capitalised and plural. That is a real defect, but a different one (case/number correctness rather than stranding), so it is left for a follow up.On how these were found, including what the method misses. #42808 used a similarity heuristic: a fuzzy entry whose
msgstris byte-identical to another entry's, where the twomsgids are dissimilar. That heuristic is structurally blind to the case where a legitimate synonym shares the stranded translation —Revoke→ "Eliminar" never surfaces, becauseRemove→ "Eliminar" is correct and so the pair scores as similar. Lowering the threshold does not help; a synonym is supposed to score similar.Roughly a fifth of the entries here — including
Inactive,Expired,Last Used,DefinitionandDone— were found instead by enumerating everyt()call in these three feature directories and diffing that set against the catalog, then opening the running UI and reading the screens. Neither the msgid text nor the similarity score would have flagged them.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Both features are behind default-off flags, so enable them first:
Set the language to Spanish, then visit Settings → API Keys (
/user_info/) and the Semantic Layer entry on the database connections page.The catalog still compiles, and the entry counts move by exactly the 64 touched:
Only one of the 64 entries (
Add %s view(s)) contains a format placeholder, and its specifier set is unchanged.msgfmtonly checks format strings on non-fuzzy entries, so the check that proves clearing the flags introduced nothing is a blanket un-fuzzy of the whole file:That reports 4 fatal errors on this branch and 4 on master — the same pre-existing ones (
%s column,%s item,Added to 1 dashboard,%(suggestion)s instead of …), untouched here.ADDITIONAL INFORMATION