ramp4-pcar4 / storylines-editor

An editor for RAMP Storylines
5 stars 13 forks source link

Highcharts Editor modal is only available in English #278

Open dan-bowerman opened 5 months ago

dan-bowerman commented 5 months ago

The Highcharts Editor modal is not localized and is displaying in English in the Editor, even in French context.

This will require a custom build of the Highcharts Editor. This will also likely require a bunch of translations.

https://github.com/highcharts/highcharts-editor/wiki/Localization

RyanCoulsonCA commented 4 months ago

Gave this one a shot but I'm running into a bunch of issues. I'm going to move this back to To Do, and I'll put some info below in case someone else wants to give this a shot.

  1. I dug through the Highcharts code and replaced a bunch of hardcoded English text with highed.getLocalizedStr('<translation.string>') (my code changes are in this repo). However, there's some English text in the editor that I can't find in the codebase. Not sure where it's coming from, maybe being pulled from elsewhere?
  2. The bigger issue is that I can't get the editor to build, both with my changes and without. Below are a few of the errors I'm running into:
    Error 1: gulp[17572]: c:\ws\src\node_contextify.cc:696: Assertion 'args[1]->IsString()' failed. [GitHub, StackOverflow]
    • I managed to get this working by running npm install natives and npm audit fix as recommended in the Stackoverflow thread above.
      Error 2: ReferenceError: primordials is not defined [StackOverflow]

    • Using the override recommendation in the thread fixed this.
      Error 3: Missing file highed.editor.config.json. I created the file and added {} to it to get past this issue. Not sure if this file is supposed to be included in the repo or whether what I did is what we're supposed to do.

After fixing these 3 errors the build ran successfully, however when I moved the files in to Storylines the chart editor was totally broken and wouldn't work. I've attempted building with 3 different node versions, v6.17.1, v11.0.0, and v18.3.0.

dan-bowerman commented 1 week ago

Related #371