AliGouta opened a new pull request, #40229: URL: https://github.com/apache/superset/pull/40229
### SUMMARY This PR should fix the translation to other languages many static labels and descriptions in the UI. Fixes SC https://github.com/apache/superset/issues/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): <img width="1685" height="282" alt="before" src="https://github.com/user-attachments/assets/d2185b19-5cba-447e-9413-f3489d1595c7" /> After (screen1): <img width="1740" height="288" alt="after" src="https://github.com/user-attachments/assets/38ead63f-79b4-4a07-800f-b674c724d504" /> Before (screen2): <img width="1247" height="666" alt="before 2" src="https://github.com/user-attachments/assets/8620d7bf-34ae-4885-929d-c631d1de2fa8" /> After (screen2): <img width="1606" height="678" alt="after2" src="https://github.com/user-attachments/assets/ae8e4d84-0ab9-478f-9351-cb69be7a4d87" /> ### 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 https://github.com/apache/superset/issues/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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
