Skip to content

mergeLocalizationJSON() doesn't apply translations to item collections #10764

@andrewtelnov

Description

@andrewtelnov

Here is the example that doesn't work

const plainJSON = { elements: [{
    type: "slider",
    name: "q1",
    customLabels: [1, 5]
  }]};
const enJSON = { elements: [{
    type: "slider",
    name: "q1",
    customLabels: [{ text: "Very bad" }, { text: "Very good" }]
  }]};
const deJSON = { 
  locale: "de",
  elements: [{
    type: "slider",
    name: "q1",
    customLabels: [{ text: "Sehr schlecht"}, { text: "Sehr gut" }]
  }]};

const survey = new SurveyModel(plainJSON);
survey.mergeLocalizationJSON(enJSON);
survey.mergeLocalizationJSON(deJSON);

As result the custom labels will not contain the English text and/or German text

Metadata

Metadata

Assignees

Labels

buguser issueAn issue or bug reported by users

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions