Closed tcitworld closed 2 years ago
@tcitworld I believe the issue is that indexName
is already in the translation context (binding.instance
), which means you could use the directive without manually passing it:
<p v-translate>
<strong>%{indexName}</strong> something
</p>
or rename the parameter:
<p v-translate="{ name: indexName }" >
<strong>%{name}</strong> something
</p>
So I don't really consider this a bug, but I see how it can be confusing. I'll try to update the documentation.
As a heads up: I'll probably deprecate (but not remove) the directive and components soon. I will document the reasons when it comes to that.
That's correct, thanks!
vue3-gettext
version:2.0.0-alpha.3
vue
version:3.2.27
Gives
The trace points to https://github.com/jshmrtn/vue3-gettext/blob/65e55810133dec332d004a19aa8d7fd7fc4ea849/src/directive.ts#L33