Repository navigation
[full-ci] Vue 3: Use vue3-gettext - #8257
Conversation
19e2c76 to
323475d
Compare
323475d to
0b2ef85
Compare
0b2ef85 to
a97d466
Compare
| import translations from '../l10n/translations.json' | ||
|
|
||
| const config = { | ||
| language: 'en', // TODO BEFORE MERGE: Access current locale |
There was a problem hiding this comment.
I like that we removed this TODO BEFORE MERGE from master 😂
a97d466 to
63629b3
Compare
79c31cd to
17550ac
Compare
e8252f5 to
656628e
Compare
fschade
left a comment
There was a problem hiding this comment.
I only found a few things that are absolutely optional, just more to my personal taste :)
good work 🎸 !
| target: 'test' | ||
| }, | ||
| global: { | ||
| plugins: [...defaultPlugins()] |
There was a problem hiding this comment.
why spreading? unnecessary [Symbol.iterator]call.
defaultPlugins()
There was a problem hiding this comment.
Basically all tests have it this way, just because it is easier to add more plugins. We think the overhead can be neglect in the test suite.
| target: 'test' | ||
| }, | ||
| global: { | ||
| plugins: [...defaultPlugins()] |
| data | ||
| }, | ||
| global: { | ||
| plugins: [...defaultPlugins()], |
| sortDir: sortDirOld | ||
| }, | ||
| global: { | ||
| plugins: [...defaultPlugins()], |
| store: Store<any> | ||
| }): Promise<void> => { | ||
| }): Promise<any> => { | ||
| const store = new Store({ ...storeOptions }) |
There was a problem hiding this comment.
if storeOptions are deep i would prefer to use Object.assign (shallow clone)
There was a problem hiding this comment.
... is shallow as well AFAIK. We just moved this part basically, it was like this before as well.
| createGettext({ | ||
| defaultLanguage: navigator.language.substring(0, 2), | ||
| silent: true, | ||
| ...options |
There was a problem hiding this comment.
can you put the options spreading upfront? My personal taste :)
There was a problem hiding this comment.
In this case we want options to possibly overwrite the defaults, so we need it in this order. The other cases above are valid though, I adjusted it 👍
|
Kudos, SonarCloud Quality Gate passed! |










Description
Use
vue3-gettextand get rid of the old version.We also removed the store from the
defaults.jsfile as we now handle this inannounceStore(). This was not necessary for this PR, but since we touched that code anyways we thought it would be nicer.#7948
Types of changes