-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Leading and trailing whitespaces are stripped with vue-gettext@2.1.1 and easygettext@2.7.0
only if a translation is available. This is an inconsistency which can be a problem together with some styling.
example
We have code like
<a href="https://vuejs.org/">Vue.js</a>
<translate> is nice</translate>
Case 1:
If there is no translation available, this get expanded to something like
<a href="https://vuejs.org/">Vue.js</a>
<span data-v-26f5cf0f> is nice</span>
which in our style sheet formats with space as expected like Vue.js is nice
.
Case 2
there is a translation, this becomes
<a href="https://vuejs.org/">Vue.js</a>
<span data-v-26f5cf0f>ist nett</span>
which in our style sheet formats without space between like Vue.jsist nett
.
Inconsistency
Case 1 and 2 are inconsistent, the behaviour should be the same
and not depending on if there is a translation available for a language or not,
because it is reasonable to leave the default translation untranslated in the .po file.
formatting problem
My expectation would be that the rendering of
<a href="https://vuejs.org/">Vue.js</a>
<translate>is nice</translate>
is as similiar to those of
<a href="https://vuejs.org/">Vue.js</a>
is nice
as possible.
But now of course I go looking into our style sheet to see where the difference
comes from.
Thanks for creating vue-gettext as Free Software! :)