Skip to content

Commit cf37f70

Browse files
sadpandajoeclaude
andcommitted
fix(plugin-chart-echarts): drop locales not shipped by echarts 5.6.0
Greek (langEL) and Latvian (langLV) i18n bundles were added in echarts 6, so the static locale import map fails to resolve them once the dependency is pinned back to 5.6.0, breaking every webpack build. Both locales now fall back to English, which loadLocale already handles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 1d8a63f commit cf37f70

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • superset-frontend/plugins/plugin-chart-echarts/src/components

superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,11 @@ use([
130130
// code-split exactly the locales listed here. Keys are Superset locales
131131
// uppercased (see LANGUAGES in superset/config.py); values point at the
132132
// echarts bundle, whose naming differs for some locales (Slovenian is
133-
// langSI, Brazilian Portuguese is langPT-br). Superset locales absent
134-
// from this map fall back to English.
133+
// langSI, Brazilian Portuguese is langPT-br). Only locales that echarts
134+
// 5.6.0 ships a bundle for are listed — Greek (langEL) and Latvian
135+
// (langLV) were added in echarts 6 and must stay out until this
136+
// dependency is upgraded again. Superset locales absent from this map
137+
// fall back to English.
135138
type EChartsLocaleOption = Parameters<typeof registerLocale>[1];
136139

137140
const LOCALE_LOADERS: Record<
@@ -141,7 +144,6 @@ const LOCALE_LOADERS: Record<
141144
AR: () => import('echarts/i18n/langAR.js'),
142145
CS: () => import('echarts/i18n/langCS.js'),
143146
DE: () => import('echarts/i18n/langDE.js'),
144-
EL: () => import('echarts/i18n/langEL.js'),
145147
EN: () => import('echarts/i18n/langEN.js'),
146148
ES: () => import('echarts/i18n/langES.js'),
147149
FA: () => import('echarts/i18n/langFA.js'),
@@ -151,7 +153,6 @@ const LOCALE_LOADERS: Record<
151153
IT: () => import('echarts/i18n/langIT.js'),
152154
JA: () => import('echarts/i18n/langJA.js'),
153155
KO: () => import('echarts/i18n/langKO.js'),
154-
LV: () => import('echarts/i18n/langLV.js'),
155156
NL: () => import('echarts/i18n/langNL.js'),
156157
PL: () => import('echarts/i18n/langPL.js'),
157158
RO: () => import('echarts/i18n/langRO.js'),

0 commit comments

Comments
 (0)