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.09k stars 795 forks source link

When using `survey-react` instead of `survey-knockout`, survey creator localization does not work correctly. #3126

Open vitexikora opened 3 years ago

vitexikora commented 3 years ago

Are you requesting a feature, reporting a bug or asking a question?

Reporting a BUG

What is the current behavior?

When using survey-react instead of survey-knockout, survey localization does not work correctly - languages to translate are not limited & default is english.

What is the expected behavior?

To limit the number of locales to ['cs', 'en'] with 'cs' as default.

How would you reproduce the current behavior (if this is a bug)?

Run the test snippet & inspect Translation tab - languages to translate are not limited & default is english. If you replace survey-react with survey-knockout, it works correctly

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://codesandbox.io/s/surveyjs-localization-error-84ctc?file=/src/SurveyCreatorComponent.jsx

Specify your

andrewtelnov commented 3 years ago

@vitexikora Survey Creator V1, currently avaiable, is written in knockout and as result using survey knockout version inside itself. It means that you have to use survey-knockout. We are working on Creator V2, it has different versions, including Creator react. V2 is using survey-react version and your code will work correctly in V2. However, in V1 you have to modify localization in survey-knockout.

Thank you, Andrew