Open dy opened 4 years ago
Hi @dy,
.vue
files were added recently to ttag-cli https://github.com/ttag-org/ttag-cli/pull/93. @eavae probably can help here, because I haven't used ttag and vue still.
Ok, I see @eavae's method, it implies passing all strings as data:
<template>
<div id="app">
<p>{{ messageHello }}</p>
</div>
</template>
<script>
import { t } from "ttag";
export default {
data() {
return {
messageHello: t`Hello World`
};
}
};
</script>
which is a bit of overhead, similar to vue-i18n:
<template>
<div id="app">
<p>{{ $t("message.hello") }}</p>
</div>
</template>
I wonder if there's a way to make vue + ttag as natural as just
<template>
<div id="app">
<p>{{ t`String to translate` }}</p>
</div>
</template>
What's the right way to use ttag with vue templates? Would be useful to be able to just
But for now
.vue
files are not even taken to consideration.