-
Notifications
You must be signed in to change notification settings - Fork 336
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
Decide prioritisation order for methods of passing in translation strings #2781
Comments
The only wrinkle here for me is that we have two different JS initialisation scenarios:
data attributes should definitely take precedence over [1], but [2] is potentially a bit trickier. I guess the deciding factor is that we want to favour data attributes in the Design System to avoid getting too technical. tldr: data-attributes > JavaScript initialisation |
I don't think we currently have any way of telling whether a JS config option has come from Creating and documenting that complexity is probably not in our interest or useful to users, so I'm in support of data-* attributes always trumping JS configuration. |
All makes sense to me. I also don't think we have any way at the minute to tell whether a component was initialised by |
OK, it looks like we're all agreed: config passed by data attributes always trumps config passed by JavaScript. |
What
Decide the priority order if all are provided by the user:
Why
We want to implement two ways of passing translation strings to component JS. We need to know how to handle a situation where a user uses both methods.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
The text was updated successfully, but these errors were encountered: