Skip to content

fix(i18n): Wrapped default Chat Error message in t() to support translation#40504

Merged
hainenber merged 1 commit into
apache:masterfrom
sh011:sh011-fix(i18n)-wrap-default-ChartErrorMessage
May 29, 2026
Merged

fix(i18n): Wrapped default Chat Error message in t() to support translation#40504
hainenber merged 1 commit into
apache:masterfrom
sh011:sh011-fix(i18n)-wrap-default-ChartErrorMessage

Conversation

@sh011
Copy link
Copy Markdown
Contributor

@sh011 sh011 commented May 28, 2026

SUMMARY

This PR wraps the hardcoded DEFAULT_CHART_ERROR string in ChartErrorMessage.tsx with the t() translation function. This ensures that the generic "Data error" fallback message is properly localized when users switch languages in the Superset UI.

BEFORE/AFTER

Before: The fallback string "Data error" was hardcoded and would display in English regardless of the user's selected locale.
After: The string is now properly piped through the translation dictionary and translates correctly based on the active locale.

(Note: Due to local Windows WSL memory constraints which was causing repeated Docker OOM crashes during frontend build, I am unable to attach a localized UI screenshot post fix. There is a screenshot pre-fix which I'll attach here just to ensure that I ran the build locally earlier. I have verified via the test suite below).

TESTING INSTRUCTIONS

  1. Verified the React component successfully renders without crashing after applying the t() wrapper.
  2. Ran the unit test suite for ChartErrorMessage to verify the translation wrapper integration:
> superset@0.0.0-dev test
> cross-env NODE_ENV=test NODE_OPTIONS="--max-old-space-size=8192" jest --max-workers=80% --silent ChartErrorMessage.test.tsx

PASS src/components/Chart/ChartErrorMessage.test.tsx

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        446.527 s

ADDITIONAL INFORMATION

Has associated issue: #40406
Required feature flags:
Changes UI
Includes DB Migration (follow approval process)
Introduces new feature or API
Removes existing feature or API

image

@dosubot dosubot Bot added the i18n:general Related to translations label May 28, 2026
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 28, 2026

Code Review Agent Run #2527fc

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: d4bb68a..d4bb68a
    • superset-frontend/src/components/Chart/ChartErrorMessage.tsx
  • 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

@sh011 sh011 changed the title Wrapped default Chat Error message in t() to support translation fix(i18n): Wrapped default Chat Error message in t() to support translation May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.17%. Comparing base (9441240) to head (d4bb68a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #40504      +/-   ##
==========================================
- Coverage   64.17%   64.17%   -0.01%     
==========================================
  Files        2592     2592              
  Lines      139299   139299              
  Branches    32347    32347              
==========================================
- Hits        89395    89394       -1     
- Misses      48367    48368       +1     
  Partials     1537     1537              
Flag Coverage Δ
javascript 67.33% <100.00%> (-0.01%) ⬇️

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.

@hainenber
Copy link
Copy Markdown
Contributor

Thanks for your contribution @sh011. LGTM!

@hainenber hainenber merged commit f7e1f96 into apache:master May 29, 2026
69 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n:general Related to translations size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants