fix(i18n): Wrapped default Chat Error message in t() to support translation#40504
Conversation
Code Review Agent Run #2527fcActionable 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for your contribution @sh011. LGTM! |
SUMMARY
This PR wraps the hardcoded
DEFAULT_CHART_ERRORstring inChartErrorMessage.tsxwith thet()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
t()wrapper.ChartErrorMessageto verify the translation wrapper integration: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