Files
wekan/client/lib
Lauri Ojansivu 10c58867a6 Translate the Frappe Gantt and DHTMLX Gantt month and weekday names.
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 !
2026-09-11 10:15:44 +03:00
..
2026-01-28 12:55:22 +02:00
2020-05-24 12:46:39 +02:00
2026-09-06 18:35:33 +03:00
2025-10-21 15:19:19 +03:00
2026-08-28 11:45:50 +03:00
2020-05-24 12:46:39 +02:00