Browse Source

Bug 26816: Chomp whitespace around i18n strings

This patch adds the chomp shorthand [%- -%] to the output of i18n.inc to
prevent extra spaces from being inserted.

To test, apply the patch and perform a catalog search in the staff
interface which will return results with multiple items.

In the items column, the availability information should not have
unwanted spaces:

3 items, 3 available:

...instead of

3 items , 3 available:

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Owen Leonard 3 years ago
committed by Jonathan Druart
parent
commit
190f7155f1
  1. 18
      koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc

18
koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc

@ -2,37 +2,37 @@
[% USE raw %]
[% MACRO t(msgid) BLOCK %]
[% I18N.t(msgid) | $raw %]
[%- I18N.t(msgid) | $raw -%]
[% END %]
[% MACRO tx(msgid, vars) BLOCK %]
[% I18N.tx(msgid, vars) | $raw %]
[%- I18N.tx(msgid, vars) | $raw -%]
[% END %]
[% MACRO tn(msgid, msgid_plural, count) BLOCK %]
[% I18N.tn(msgid, msgid_plural, count) | $raw %]
[%- I18N.tn(msgid, msgid_plural, count) | $raw -%]
[% END %]
[% MACRO tnx(msgid, msgid_plural, count, vars) BLOCK %]
[% I18N.tnx(msgid, msgid_plural, count, vars) | $raw %]
[%- I18N.tnx(msgid, msgid_plural, count, vars) | $raw -%]
[% END %]
[% MACRO txn(msgid, msgid_plural, count, vars) BLOCK %]
[% I18N.txn(msgid, msgid_plural, count, vars) | $raw %]
[%- I18N.txn(msgid, msgid_plural, count, vars) | $raw -%]
[% END %]
[% MACRO tp(msgctxt, msgid) BLOCK %]
[% I18N.tp(msgctxt, msgid) | $raw %]
[%- I18N.tp(msgctxt, msgid) | $raw -%]
[% END %]
[% MACRO tpx(msgctxt, msgid, vars) BLOCK %]
[% I18N.tpx(msgctxt, msgid, vars) | $raw %]
[%- I18N.tpx(msgctxt, msgid, vars) | $raw -%]
[% END %]
[% MACRO tnp(msgctxt, msgid, msgid_plural, count) BLOCK %]
[% I18N.tnp(msgctxt, msgid, msgid_plural, count) | $raw %]
[%- I18N.tnp(msgctxt, msgid, msgid_plural, count) | $raw -%]
[% END %]
[% MACRO tnpx(msgctxt, msgid, msgid_plural, count, vars) BLOCK %]
[% I18N.tnpx(msgctxt, msgid, msgid_plural, count, vars) | $raw %]
[%- I18N.tnpx(msgctxt, msgid, msgid_plural, count, vars) | $raw -%]
[% END %]

Loading…
Cancel
Save