vue-i18n icon indicating copy to clipboard operation
vue-i18n copied to clipboard

Interpolations without provided value should remain in the translation result

Open rubenduiveman opened this issue 1 year ago • 1 comments
trafficstars

Clear and concise description of the problem

We're upgrading to v9.x. When translating a string, we want to perform some extra logic on the result, using special tags {tag} to be replaced in the translated result. In V8, the translated value still contained those values, but in V9 it doesn't anymore.

Input: { val: "I am a special {tag} string" }, calling t("val"). V8 result: I am a special {tag} string V9 result: I am a special string

Suggested solution

Let's add an option to createI18n to toggle between those behaviors globally if it's not there.

Alternative

No response

Additional context

No response

Validations

rubenduiveman avatar Nov 22 '23 13:11 rubenduiveman