A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Polyconseil/vue-gettext/issues/80 below:

Handling of leading and trailing whitespace in templates inconsistent · Issue #80 · Polyconseil/vue-gettext · GitHub

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! :)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4