Apache Echarts supports internationalization and can take a locale as a option when rendering charts.
https://echarts.apache.org/handbook/en/basics/release-note/v5-feature/#internationalization
There are numerous supported locales, though it's much less than what Wikimedia uses, but I am sure more can be added:
https://github.com/apache/echarts/tree/release/src/i18n
Acceptance Criteria:
- Charts are rendered in the language (locale) of the wiki if the locale is available in echarts
- If the locale is not available, then have some fallback
- @aude reviews/merges https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Chart/ /1099827
- @aude upstreams https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Chart/ /1099827 changes to charts service and @Jdlrobson-WMF reviews/merges
- Support the removal of type inference from the client e.g. @aude adds data-x-axis-type and data-y-axis-type attributes to chart markup which will allows us to remove the logic from the client and @Jdlrobson-WMF reviews/merges
Notes:
Localization will help enable RTL languages to work better and other language-specific things.
Sign off
- A variant of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Chart/ /1099833 can be deployed next year => TO be done in T382042