surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.02k stars 785 forks source link

Composite question types: Inherited localizable properties are duplicated in Survey Creator's Translation tab #8238

Closed JaneSjs closed 2 months ago

JaneSjs commented 2 months ago

Updated Serializer.getPropertiesByObj returns duplicated properties for "country" object instance. The issue is i the library.

View Demo

Survey.ComponentCollection.Instance.add({
    name: "country",
     defaultQuestionTitle: {
        en: "Default title",
        de: "Standardtitel",
        fr: "Titre par défaut"
    },
    inheritBaseProps: ["description"],
    questionJSON: {
        type: "dropdown",
        description:  {
            en: "Custom Question",
            de: "Aangepaste vraag",
            fr: "Question personnalisée"
        },
        placeholder: "Select a country...",
        choicesByUrl: {
            url: "https://surveyjs.io/api/CountriesExample",
        },
    },
});

If you inherit a description base property and define its translation, the description appears in a Translation tab and is duplicated. image

The original inquiry is T18038 - Compsite questions and translation. A customer asked how to enable translation for individual composite question's titles.