Skip to content

Commit

Permalink
[FIX] fix display of english strings
Browse files Browse the repository at this point in the history
  • Loading branch information
huguesdk committed Oct 14, 2024
1 parent bc728ef commit b3ed920
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,19 @@ export class JSGanttRenderer extends Component {
this.setFieldVisible(mappingField, false);
}
}
this.chart.setCustomLang(langTerms);
if (this.chart.vLang === "en") {
// This is a workaround to allow to modify the english language
// terms. Just calling setCustomLang() does not work because it
// would start by deleting the current terms before iterating on
// them.
this.chart.vLang = "en_";
this.chart.setCustomLang(langTerms);
this.chart.vLangs.en = this.chart.vLangs.en_;
delete this.chart.vLangs.en_;
this.chart.vLang = "en";
} else {
this.chart.setCustomLang(langTerms);
}
this.fieldsMapping = fieldsMapping;
}

Expand Down

0 comments on commit b3ed920

Please sign in to comment.