Bug 36282: Chomp whitespace around opac i18n strings

Same logic as bug 26816 but to OPAC

Test plan:
1) Apply test plan patch only
2) Visit opac home:
<opac_url>/cgi-bin/koha/opac-main.pl
3) Notice there's a space between 'Translated string' and ':', even though the markup does not contain a whitespace
4) Apply 2nd patch
5) Notice the white space is gone

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b9f97ec015)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5559ebc3bf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2024-03-08 11:49:26 +00:00 committed by Lucas Gass
parent 8f521bdb3c
commit c82a677a4c

View file

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