Our state of the art Gantt chart


Post by stevend »

I'm following this guide https://bryntum.com/docs/gantt/#guides/customization/localization.md on how to change the locale in a React app. So basically I added these lines to App.js

import Nl from './gantt.locale.Nl.js'
import {LocaleManager} from "@bryntum/gantt/gantt.umd";

LocaleManager.locale = Nl;

But I get the following errors during startup

./src/gantt.locale.Nl.js
  Line 10:1:    Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 11:5:    Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 11:117:  'define' is not defined                                                no-undef
  Line 11:130:  'define' is not defined                                                no-undef
  Line 27:13:   Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 64:17:   Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 98:17:   Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 107:17:  Expected an assignment or function call and instead saw an expression  no-unused-expressions

Search for the keywords to learn more about each error.

Am I missing something?


Post by pmiklashevich »

Thanks for the report! Reproduced. There is an error in the guide, we will get it fixed. No need to copy anything. Just use it as following:

import { LocaleManager } from '@bryntum/gantt/gantt.umd';
import Nl from '@bryntum/gantt/locales/gantt.locale.Nl';

LocaleManager.locale = Nl;

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply