Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any idea about translation or at least date localization? #13

Open
phtmgt opened this issue Apr 30, 2019 · 1 comment
Open

Any idea about translation or at least date localization? #13

phtmgt opened this issue Apr 30, 2019 · 1 comment

Comments

@phtmgt
Copy link

phtmgt commented Apr 30, 2019

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?

@phtmgt
Copy link
Author

phtmgt commented Apr 30, 2019

And, of course, just stumbled upon this, might be useful:

frappe/gantt#117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant