-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set default for completedHtml and similar properties #5405
Comments
@SamMousa It is a localizable property with predefine translation for all locales. const enTranslations = Survey.surveyLocalization.getLocaleStrings("en")
const frTranslations = Survey.surveyLocalization.getLocaleStrings("fr")
enTranslations.completingSurvey = "test-en";
frTranslations.completingSurvey = "test-fr"; Thank you, |
Should we not unify this from the perspective of a developer? Essentially what you're saying is that for each property I need to change defaults in different ways. If I add a new property that is localizable I can set the default in the property definition, which makes it inconsistent.
Now the survey JSON contains this value. To make matters worse, now running the survey in a different language will not use the built in translations because it is seen as a user value (and the user value does not contain translations in this example). In conclusion: this is bad for both DX and UX. I'm not sure how we could improve this to simplify the code while at the same time improving DX and UX. |
@SamMousa It is not understadable when to use the default value. Should we use it for "en" locale only or for all locales? Thank you, |
I agree with your points, so let's implement this in the DX!
The idea is that we need to rely less on people "knowing" stuff, or worse, asking every time, but more on implementing this properly in the code. |
Are you requesting a feature, reporting a bug or ask a question?
Bug
What is the current behavior?
Changing the default value for
completedHtml
does not work.What is the expected behavior?
Changing the default value should work.
How would you reproduce the current behavior (if this is a bug)?
Complete the survey in the preview tab in the link below.
Provide the test code and the tested page URL (if applicable)
Tested page URL: https://codesandbox.io/p/sandbox/priceless-germain-g3fcht
Test code
The text was updated successfully, but these errors were encountered: