Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(issue): 30131 #31751

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

fix(issue): 30131 #31751

wants to merge 10 commits into from

Conversation

jpchev
Copy link
Contributor

@jpchev jpchev commented Jan 8, 2025

SUMMARY

this is to propagate the current locale up to the echarts configuration.

fixes: #30131

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

switch the locale and verify that charts have the correct locale (for example in months name and in buttons)

this is to propagate the current locale up to the echarts configuration.
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Functionality Unsafe Dynamic Module Import ▹ view
Functionality Missing Locale Fallback ▹ view
Error Handling Missing locale state fallback ▹ view

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Feedback and Support

@@ -123,10 +127,14 @@ function Echart(
getEchartInstance: () => chartRef.current,
}));

const localeObj = useSelector((state: ExplorePageState) => state?.common?.locale);
const lang = require('echarts/lib/i18n/lang' + localeObj.toUpperCase()).default;

This comment was marked as resolved.

@@ -123,10 +127,14 @@
getEchartInstance: () => chartRef.current,
}));

const localeObj = useSelector((state: ExplorePageState) => state?.common?.locale);

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -123,10 +127,14 @@
getEchartInstance: () => chartRef.current,
}));

const localeObj = useSelector((state: ExplorePageState) => state?.common?.locale);

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

fixes suggested by bot
@jpchev jpchev changed the title fixes for https://github.com/apache/superset/issues/30131 fix(issue): 30131 Jan 8, 2025
jpchev and others added 3 commits January 8, 2025 13:58
removing trailing whitespaces
prettier changes
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this PR @jpchev , you beat me to it :)
With just a few small changes, this is working well for me.

Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

👍 This change is working great! Thank you @jpchev :)

translate.echarts.mp4

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

Successfully merging this pull request may close these issues.

Changing languages doesn't affect echarts charts.
4 participants