Reported directly: both Gantt board views showed English month names in
every language. Neither library reads WeKan's translations: Frappe Gantt
takes a `language` tag it hands to Intl.DateTimeFormat, and DHTMLX Gantt
takes a locale object and only bundles a fixed set (~40) of them,
defaulting to English.
New client/lib/ganttLocale.js (pure, unit-tested) feeds both:
- intlLocaleFor() maps WeKan's language tag to one Intl accepts - the
underscore tags ('ru_RU', 'ca_ES', 'zh_SG', ...) make Intl throw
RangeError, and an unknown tag falls back to its primary subtag, then
English, so nothing can throw inside a library's render loop. Every tag
under imports/i18n/data resolves (pinned by the test).
- intlDateNames() builds month_full/month_short/day_full/day_short from
Intl for any language, in dhtmlx's shape (weeks starting Sunday).
- dhtmlxLocaleFor() uses the locale dhtmlx bundles for the language when
there is one (it also translates dhtmlx's own labels), and otherwise
keeps the English labels with the Intl date names.
frappeGantt.js passes `language`; dhtmlxGantt.js calls
gantt.i18n.setLocale() on each reactive run before init/parse so a
language change takes effect. The Frappe view-mode dropdown's own
"Day/Week/Month/Year" labels are the library's and stay as they are.
Thanks to xet7 !