fix(i18n-es): correct case/number collapse in the semantic-layer labels - #43311
fix(i18n-es): correct case/number collapse in the semantic-layer labels#43311glaterza wants to merge 1 commit into
Conversation
`features/semanticLayers/label.ts` and `semantic_layers/labels.py` export
cased and numbered variants of each label so they read correctly both as
headings and mid-sentence. The Spanish catalog collapsed each family onto a
single string, so the distinction the source deliberately draws was lost:
"Datasources", "datasource" and "datasources" all rendered "Fuente de datos",
and five members of the "data connection" family all rendered "Conexiones de
la base de datos" -- which belongs to the legacy menu label
"Database Connections".
The legacy side of the same file already models the convention correctly
("Dataset"/"dataset"/"Datasets"), so the fix follows the pattern the catalog
itself establishes.
Also corrects two strandings that render on the same screens:
- "New" was a byte-copy of "Now" -> "Ahora". It is a standalone button label
at all five call sites, so no agreement constraint applies.
- "Copied!" and "Code Copied!" both held "SQL copiado", whose own msgid is no
longer in the catalog, leaving both copies orphaned.
translated 3996 -> 4009, fuzzy 913 -> 900, untranslated unchanged at 197.
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 #43311 +/- ##
=======================================
Coverage 66.66% 66.66%
=======================================
Files 2876 2876
Lines 164029 164029
Branches 37846 37846
=======================================
+ Hits 109345 109348 +3
+ Misses 52537 52535 -2
+ Partials 2147 2146 -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:
|
Code Review Agent Run #c4b47fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
The Spanish catalog collapsed several families of labels that the source code
deliberately keeps distinct, so one Spanish string was serving four English
msgids differing only in case or number.
Two files —
superset-frontend/src/features/semanticLayers/label.tsandsuperset/semantic_layers/labels.py— do one job: swap vocabulary when theSEMANTIC_LAYERSflag is on (dataset → datasource, database → dataconnection). Between them they contain exactly 19 translatable strings, and
each is exported in a cased/numbered variant so labels read correctly both as
headings and mid-sentence:
10 of those 19 were broken. Six msgids all rendered "Conexiones de la base de
datos" — which is the legitimate translation of a seventh, the legacy menu label
Database Connections. Three all rendered "Fuente de datos". One was capitalisedwhere the source asks for lower case. The remaining 9 were already correct and are
untouched.
datasetsdatasourceDatasourcesdatasourcesdatabasesData connectiondata connectionData connectionsdata connectionsData ConnectionsProof a reviewer can check without reading Spanish: the legacy half of the same
file already models the convention correctly —
Dataset/dataset/Datasetsare "Conjunto de datos" / "conjunto de datos" / "Conjuntos de datos". This change
makes the semantic half follow the pattern the catalog itself already establishes.
Data ConnectionsandData connectionsboth map to "Conexiones de datos". That isintentional: Spanish does not title-case headings, so the English difference between
them is styling rather than meaning.
Scope
Three further entries are included because they are visibly wrong on the same
screens a reviewer will open to check the above. They are not part of the 19,
and are called out here rather than folded silently into the claim:
NewCopied!Code Copied!Newwas a byte-copy ofNow's translation. It is a standalone button label atall five call sites (
DatasetList,DatabaseList,NewItemDropdown), nevercomposed with a following noun, so no agreement constraint applies.
Copied!andCode Copied!both held "SQL copiado", whose own msgid is no longerin the catalog — both copies were orphaned. The catalog is inconsistent about
whether to carry an English trailing
!; these two keep it, in the full¡…!form Spanish requires.Every one of the 13 msgids was checked tree-wide for its call site, not its bare
text, over
superset-frontend/{src,packages,plugins}andsuperset/(5,210 files).The ten label entries appear only in the two files named above.
msgfmtstatistics move by exactly the entry count and nothing else:translated 3996 → 4009, fuzzy 913 → 900, untranslated unchanged at 197.
BEFORE/AFTER SCREENSHOTS
Before

After

Before

After

TESTING INSTRUCTIONS
Two of the entries (
datasets,databases) render in a default install. The restneed the
SEMANTIC_LAYERSfeature flag, which ships default-off — which isprecisely why these strings rotted unnoticed.
Switch the UI to Spanish, then:
/tablemodelview/list/— the nav item and page title read "Fuentes de datos"(were "Fuente de datos"); the create button reads "+ Nuevo" (was "+ Ahora"); the
filter and column header read "Conexión de datos" (were "Conexiones de la base de
datos"). Hovering the import icon shows "Importar fuentes de datos".
/databaseview/list/— the page title and the Settings → Data Connections menulink both read "Conexiones de datos".
/sqllab/— the connection selector placeholder reads "Selecciona conexión dedatos o escribe para buscar conexiones de datos", exercising the singular and the
plural in one sentence.
datos", exercising the lower-case singular mid-sentence.
the dataset-list import tooltip reads "Importar conjuntos de datos"; both were
capitalised mid-sentence before.
Catalog checks:
Not verified in a running UI, and flagged as such:
Copied!andCode Copied!(bothneed a clipboard write or a saved-query/query-history row) and the lower-case
data connection, which renders only inside the delete-connection confirmation modal.ADDITIONAL INFORMATION
SEMANTIC_LAYERS(for 8 of the 13 entries; the restrender in a default install)