gantt-for-react
gantt-for-react copied to clipboard
Any idea about translation or at least date localization?
If none of this is possible, can we at the very minimum add translation for months?
I am thinking something of the sorts:
const {
onClick,
onDateChange,
onProgressChange,
onViewChange,
customPopupHtml,
tasks,
viewMode,
**language**
} = this.props;
which could then be passed to frappe gantt:
this.ganttInst = new GanttJS(this.ganttRef, tasks, {
on_click: onClick || noop,
on_date_change: onDateChange || noop,
on_progress_change: onProgressChange || noop,
on_view_change: onViewChange || noop,
custom_popup_html: customPopupHtml || null
**language: language || null**
});
However, I don't believe frappe gantt has a way of modifying month translations (adding extra languages), as date_utils is kind of static and does not accept props. Therefore, I am thinking we should at least try to implement date format options, so we can avoid month names by using numerical style, e.g. 01.2019 instead of January 2019.
Any thoughts?
And, of course, just stumbled upon this, might be useful:
https://github.com/frappe/gantt/pull/117