Skip to content

feat(i18n): add Swedish (sv) locale [Beta]#18263

Merged
max-datahub merged 3 commits into
masterfrom
max/sv-i18n-locale
Jul 9, 2026
Merged

feat(i18n): add Swedish (sv) locale [Beta]#18263
max-datahub merged 3 commits into
masterfrom
max/sv-i18n-locale

Conversation

@max-datahub

Copy link
Copy Markdown
Collaborator

Summary

Adds a complete Swedish (sv) UI locale, labeled Svenska (Beta), mirroring the recently added French (#18221) and Italian (#18222) locales. Swedish joins as the 6th non-English locale.

  • 67 namespace files, ~4,697 keys — 100% parity with en
  • Remirror editor bundle (src/i18n/remirror/sv.json, 129 keys)
  • Wired into the 5 locale registration sites (no backend change — locale is a free BCP-47 string in CorpUserLocaleSettings.language)

Wiring

Site Change
src/app/i18n/types.ts 'sv' added to the SupportedLanguage union
src/app/i18n/constants.ts SV_LOCALE_CONFIG (antd sv_SE, dayjs sv, label Svenska (Beta)) added to LOCALE_MAP + LANGUAGE_OPTIONS
src/i18n/remirror/index.ts sv added to REMIRROR_LOCALE_LOADERS
src/utils/dayjs.ts sv added to DAYJS_LOCALE_LOADERS (kept in sync with LOCALE_MAP)
src/i18n/remirror/sv.json new editor bundle (all 129 Remirror keys, ICU/{hue} placeholders preserved)

Translation approach

Terminology follows a maximal-English hybrid tuned to how Swedish data teams actually work (Swedish tech is heavily anglicized):

  • Kept English: core entities and settled anglicisms — Dataset, Dashboard, Chart, Tag, Lineage, Pipeline, Job, Container, Notebook, Query, Run, Ingestion, Analytics, Owner (+ role labels), Task, Monitoring, Observability, Upstream/Downstream, Glossary, Browse, Data Contract, named product surfaces (DataHub Actions, Smart Assertions, Data Health, Remote Executor).
  • Translated to Swedish: governance/metadata nouns with no English habit — Domän, Behörighet, Beskrivning, Kolumn, Datakvalitet, Datakälla, Dataprodukt, Prenumeration, Avisering, Åtkomstbegäran, Godkännande, Konsekvensanalys, and all status/lifecycle labels.
  • Register: modern professional du-form (never formal ni), with the imperative for action labels (Spara, Ta bort, Lägg till). This is standard Swedish UI convention post-du-reformen.
  • Grammar/orthography: native compounds written solid (Datakvalitet, Åtkomstbegäran); loan/acronym seams hyphenated (API-nyckel, ML-modell); å ä ö throughout; sentence case (not Title Case); genitive -s with no apostrophe.

Verification

Gate Result
check-translations.mjs --lang sv ✅ 100% coverage, 0 missing
check-i18n-parity.mjs --lang sv (I18N_PARITY_MODE=fail) ✅ 0 issues (keys + placeholders in sync with en)
yarn test src/i18n/remirror ✅ 6/6
yarn test src/app/i18n ✅ 23/23
yarn type-check ✅ clean
eslint (wiring files) ✅ clean
Consistency audit du throughout (0 formal-ni), 0 mixed-language strings, placeholders/emojis preserved, terminology standardized

⚠️ Beta — terminology decisions for native-speaker sign-off

The Beta label covers the contested calls below. Each shipped a documented default; a native Swedish data practitioner should confirm or flip before the label is dropped.

# English Shipped (default) Alternative Rationale
1 Owner (+ Data/Technical/Business Owner, Data Steward) Owner / role labels EN Ägare Kept EN per the maximal-English policy; Swedish data orgs routinely keep these English
2 Chart Chart Diagram Diagram is natural Swedish; kept EN for entity-label consistency with Dashboard/Dataset
3 Dashboard Dashboard Instrumentpanel Instrumentpanel reads dated; modern Swedish keeps Dashboard
4 Lineage Lineage Spårbarhet / Datahärkomst No dominant Swedish term; kept EN
5 Assertion Kontroll keep Assertion EN Deliberate rename — Swedish DQ practitioners say kontroller (checks); no usable cognate
6 Asset tillgång (native) keep asset EN Idiomatic Swedish; note German keeps Asset. Standardized (subagents had split usage)
7 Freshness Aktualitet Färskhet Aktualitet reads more professional; Färskhet carries a food connotation
8 Policy Policy (EN) Princip (MS-Swedish) Kept EN (widely used); Princip is the Microsoft-Swedish precedent
9 Subscription / Notification Prenumeration / Avisering Abonnemang / Notis Standard Swedish SaaS terms; Abonnemang carries a paid connotation
10 Task, Monitoring, Upstream/Downstream, Glossary, Browse kept EN Uppgift, Övervakning, Uppströms/Nedströms, Ordlista, Utforska Kept EN per maximal-English; clean native alternatives exist
11 Retained-loan plurals invariant / English -s Swedish declension Loanword plurals are unsettled in Swedish; entity names never Swedish-declined

Notes

🤖 Generated with Claude Code

Add a complete Swedish (`sv`) UI locale, labeled `Svenska (Beta)`,
mirroring the recently added French (#18221) and Italian (#18222) locales.

- 67 namespace translation files (~4,697 keys, 100% parity with en)
- Remirror editor bundle (remirror/sv.json, 129 keys)
- Wired into the SupportedLanguage union, LOCALE_MAP / LANGUAGE_OPTIONS,
  the remirror locale loaders, and the dayjs locale loaders

Terminology follows a maximal-English hybrid tuned to how Swedish data
teams actually work: core entities and settled anglicisms stay English
(Dataset, Dashboard, Chart, Lineage, Owner, Task, Monitoring, Query,
Upstream/Downstream, ...), while governance and metadata nouns are
translated (Domän, Behörighet, Datakvalitet, Åtkomstbegäran, ...).
Register is the modern professional du-form with imperative action
labels; native compounds are written solid (Datakvalitet), loan seams
hyphenated (API-nyckel).

Contested terminology ships as documented defaults for native-speaker
sign-off, which the Beta label covers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the product PR or Issue related to the DataHub UI/UX label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Initial JS bundle size ➡️

Gzipped
Base (3fc7182) 3.15 MB
This PR 3.15 MB
Diff +1 KB (+0.0%)

Eager entry chunks (dist/assets/index-*.js) only. Codecov reports total bundle including lazy chunks — these intentionally differ.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 349.51kB (1.12%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 31.65MB 349.51kB (1.12%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 13.39kB 8.51MB 0.16%
assets/EditorImpl-*.js 75 bytes 554.58kB 0.01%
assets/sv-*.js (New) 7.95kB 7.95kB 100.0% 🚀
assets/sv-*.js (New) 1.59kB 1.59kB 100.0% 🚀
assets/sv-*.js (New) 326.51kB 326.51kB 100.0% 🚀

Files in assets/index-*.js:

  • ./src/app/i18n/constants.ts → Total Size: 1.17kB

Files in assets/sv-*.js:

  • ./src/i18n/locales/sv/entity.profile.view.json → Total Size: 515 bytes

  • ./src/i18n/locales/sv/entity.profile.access.json → Total Size: 550 bytes

  • ./src/i18n/locales/sv/auth.json → Total Size: 1.76kB

  • ./src/i18n/locales/sv/entity.profile.stats.json → Total Size: 6.97kB

  • ./src/i18n/locales/sv/entity.profile.tabs.json → Total Size: 4.57kB

  • ./src/i18n/locales/sv/alchemy.json → Total Size: 3.87kB

  • ./src/i18n/locales/sv/common.labels.json → Total Size: 1.1kB

  • ./src/i18n/locales/sv/entity.ownership.json → Total Size: 1.62kB

  • ./src/i18n/locales/sv/analytics.json → Total Size: 713 bytes

  • ./src/i18n/locales/sv/entity.profile.validations.json → Total Size: 44.75kB

  • ./src/i18n/locales/sv/entity.shared.actions.json → Total Size: 2.15kB

  • ./src/i18n/locales/sv/entity.profile.tests.json → Total Size: 651 bytes

  • ./src/i18n/locales/sv/entity.shared.components.json → Total Size: 7.12kB

  • ./src/i18n/locales/sv/entity.profile.queries.json → Total Size: 2.27kB

  • ./src/i18n/locales/sv/entity.profile.incident.json → Total Size: 5.05kB

  • ./src/i18n/locales/sv/entity.shared.containers.json → Total Size: 16.73kB

  • ./src/i18n/locales/sv/entity.profile.schema.json → Total Size: 10.46kB

  • ./src/i18n/locales/sv/entity.identity.json → Total Size: 10.61kB

  • ./src/i18n/locales/sv/entity.shared.emptyStates.json → Total Size: 2.46kB

  • ./src/i18n/locales/sv/common.counts.json → Total Size: 882 bytes

  • ./src/i18n/locales/sv/entity.profile.timeline.json → Total Size: 221 bytes

  • ./src/i18n/locales/sv/common.feedback.json → Total Size: 575 bytes

  • ./src/i18n/locales/sv/entity.preview.json → Total Size: 4.54kB

  • ./src/i18n/locales/sv/common.actions.json → Total Size: 3.23kB

  • ./src/i18n/locales/sv/entity.profile.documentation.json → Total Size: 2.6kB

  • ./src/i18n/locales/sv/entity.profile.editor.json → Total Size: 829 bytes

  • ./src/i18n/locales/sv/entity.form.json → Total Size: 2.52kB

  • ./src/i18n/locales/sv/entity.profile.summary.json → Total Size: 2.14kB

@alwaysmeticulous

alwaysmeticulous Bot commented Jul 8, 2026

Copy link
Copy Markdown

✅ Meticulous spotted 0 visual differences across 1774 screens tested: view results.

Meticulous evaluated ~10 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit ed551e5 docs(i18n): add Swedish to the multi-language support guide. This comment will update as new commits are pushed.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

i18n locale parity

Status: ⚠️ drift detected (warn-only) — 5 issue(s) across 6 locale(s)

Locale Missing Stale Placeholder
de 1 0 0
es 1 0 0
fr 1 0 0
it 1 0 0
pt-BR 1 0 0
sv 0 0 0
de
❌ modules.json — 1 missing key(s):
      - outputPorts.moduleName
es
❌ modules.json — 1 missing key(s):
      - outputPorts.moduleName
fr
❌ modules.json — 1 missing key(s):
      - outputPorts.moduleName
it
❌ modules.json — 1 missing key(s):
      - outputPorts.moduleName
pt-BR
❌ modules.json — 1 missing key(s):
      - outputPorts.moduleName

@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Jul 8, 2026
@max-datahub
max-datahub merged commit 22cf16e into master Jul 9, 2026
49 checks passed
@max-datahub
max-datahub deleted the max/sv-i18n-locale branch July 9, 2026 04:44
max-datahub added a commit that referenced this pull request Jul 9, 2026
Resolves additive conflicts from the Swedish locale (#18263): union nb+sv in
SupportedLanguage, LOCALE_MAP, LANGUAGE_OPTIONS, the remirror loader map, and
the multi-language-support doc list.

Adds 3 nb keys for master's new deprecation strings to keep 100% parity:
entity.shared.components (deprecation.reasonLabel) and
entity.shared.entityDropdown (deprecation.markedDeprecatedSuccess,
deprecation.markedUnDeprecatedSuccess).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants