Skip to content

fix(chart): fix label and description translation on UI and enhance french translations#40229

Merged
rusackas merged 3 commits into
apache:masterfrom
AliGouta:fix/translation-issue-40207-option2
May 22, 2026
Merged

fix(chart): fix label and description translation on UI and enhance french translations#40229
rusackas merged 3 commits into
apache:masterfrom
AliGouta:fix/translation-issue-40207-option2

Conversation

@AliGouta
Copy link
Copy Markdown
Contributor

SUMMARY

This PR should fix the translation to other languages many static labels and descriptions in the UI.

Fixes SC #40207 Partial UI Translation for Superset Components.

Root cause: Control labels and description(e.g. "Sort ascending") were defined as label: t('...') — strings evaluated at module load time, before the async language pack had finished loading. As a result, Most labels and Description always displayed in English regardless of the selected language.

Fix: Converted to lazy functions: label: () => t('...') — t() is now evaluated at render time, when i18n is already initialized. All controlPanel.ts files across the filter plugins (Select, Range, Time, etc.) were updated accordingly, along with enriched language translations.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before (screen1):
before

After (screen1):
after

Before (screen2):
before 2

After (screen2):
after2

TESTING INSTRUCTIONS

Building a new image:

docker build --build-arg BUILD_TRANSLATIONS=true -t superset:fix-40207 .

Deploy and run the image

ADDITIONAL INFORMATION

[ X] Has associated issue: 40207
Required feature flags:
Changes UI
Includes DB Migration (follow approval process in #13351)
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

@AliGouta AliGouta requested a review from sfirke as a code owner May 18, 2026 20:06
@dosubot dosubot Bot added change:frontend Requires changing the frontend i18n:general Related to translations labels May 18, 2026
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 18, 2026

Bito Automatic Review Skipped - Large PR

Bito didn't auto-review this change because the pull request exceeded the line limit. No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.

@github-actions github-actions Bot added i18n Namespace | Anything related to localization i18n:french Translation related to French language labels May 18, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit d253f9c
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a106d7128530c00082f03dc
😎 Deploy Preview https://deploy-preview-40229--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.20%. Comparing base (c945ef6) to head (1aac28f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #40229      +/-   ##
==========================================
+ Coverage   64.19%   64.20%   +0.01%     
==========================================
  Files        2592     2592              
  Lines      139080   139115      +35     
  Branches    32299    32302       +3     
==========================================
+ Hits        89281    89318      +37     
+ Misses      48267    48265       -2     
  Partials     1532     1532              
Flag Coverage Δ
hive 39.28% <ø> (ø)
javascript 67.31% <100.00%> (+0.01%) ⬆️
mysql 58.79% <ø> (ø)
postgres 58.87% <ø> (ø)
presto 40.95% <ø> (ø)
python 60.42% <ø> (ø)
sqlite 58.51% <ø> (ø)
unit 100.00% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@AliGouta AliGouta force-pushed the fix/translation-issue-40207-option2 branch 2 times, most recently from 216bade to 3c55047 Compare May 19, 2026 10:04
@AliGouta AliGouta changed the title Fix/translation issue 40207 option2 fix(chart): fix labels and description translation and enhance french translations May 19, 2026
@AliGouta
Copy link
Copy Markdown
Contributor Author

@hainenber Kindly trigger the CI if possible. I managed to update the PR. My understanding is that it should be triggered manually if the PR is updated

@AliGouta AliGouta changed the title fix(chart): fix labels and description translation and enhance french translations fix(chart): fix label and description translation on UI and enhance french translations May 20, 2026
@AliGouta AliGouta force-pushed the fix/translation-issue-40207-option2 branch from 3c55047 to 3fbb69d Compare May 20, 2026 09:42
@AliGouta AliGouta force-pushed the fix/translation-issue-40207-option2 branch from 3fbb69d to 85d5981 Compare May 20, 2026 17:51
@AliGouta AliGouta force-pushed the fix/translation-issue-40207-option2 branch from 85d5981 to 043f020 Compare May 21, 2026 15:31
@AliGouta AliGouta requested a review from rusackas as a code owner May 21, 2026 15:31
@AliGouta
Copy link
Copy Markdown
Contributor Author

@rusackas Would it be possible to review this PR ? Also, I do not know why the CI does not trigger automatically : s

@rusackas
Copy link
Copy Markdown
Member

I do not know why the CI does not trigger automatically

Just a safety thing, so some rando doesn't come along and do dangerous things with CI.

Once your first PR is merged, it'll be automatic on your second and subsequent PRs.

Reviewing now....

Copy link
Copy Markdown
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@rusackas rusackas merged commit 42149f6 into apache:master May 22, 2026
72 checks passed
@rusackas
Copy link
Copy Markdown
Member

@AliGouta opened a follow-up PR to this (linked above) if you want to give that a look. Once it's merged, it should be easy to continue sweeping up if needed.

@hainenber hainenber linked an issue May 23, 2026 that may be closed by this pull request
3 tasks
@bito-code-review
Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

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

Labels

change:frontend Requires changing the frontend i18n:french Translation related to French language i18n:general Related to translations i18n Namespace | Anything related to localization size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Partial UI Translation for Superset Components

2 participants