hustcc / hustcc/gantt-for-react

Any idea about translation or at least date localization?

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.