feat: supports selecting the overwrite order of merge messages #1896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I added this code to provide users facing this situation with more options: whether to replace the existing message on the i18n instance with the passed message.
And this way of writing can keep the function calls in the vue-i18n npm package unaffected.
The background reason is that I have an npm package and a Vue3 code base. When app.use this npm package, I passed the i18n instance of the Vue3 code base to the install function of the npm package, and then called mergeLocaleMessage, which caused the message of the npm package to overwrite the value of the same key in the Vue3 code base, but I hope that the message in the Vue3 code base has a higher priority, so I thought of this way.
I hope it can be adopted, thank you.