Bug 36282 - OPAC - Remove trailing and leading blank space from translated strings
Summary: OPAC - Remove trailing and leading blank space from translated strings
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 36221
  Show dependency treegraph
 
Reported: 2024-03-08 11:40 UTC by Pedro Amorim
Modified: 2024-07-25 11:11 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:


Attachments
Bug 36282: [DO NOT PUSH] For test plan only (944 bytes, patch)
2024-03-08 11:49 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36282: Chomp whitespace around opac i18n strings (2.43 KB, patch)
2024-03-08 11:49 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36282: Chomp whitespace around opac i18n strings (2.48 KB, patch)
2024-03-09 18:18 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36282: Chomp whitespace around opac i18n strings (2.55 KB, patch)
2024-04-22 15:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-03-08 11:40:53 UTC

    
Comment 1 Pedro Amorim 2024-03-08 11:42:51 UTC
The 2 files have diverged in logic:
opac-tmpl/bootstrap/en/includes/i18n.inc
koha-tmpl/bootstrap/en/includes/i18n.inc

Adding bug 35716 as "See also" as this logic should ideally be DRY.
Comment 2 Pedro Amorim 2024-03-08 11:49:12 UTC
Created attachment 162955 [details] [review]
Bug 36282: [DO NOT PUSH] For test plan only
Comment 3 Pedro Amorim 2024-03-08 11:49:14 UTC
Created attachment 162956 [details] [review]
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
Comment 4 Lucas Gass (lukeg) 2024-03-09 18:18:35 UTC
Created attachment 163010 [details] [review]
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>
Comment 5 Martin Renvoize (ashimema) 2024-04-22 15:44:09 UTC
Created attachment 165321 [details] [review]
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>
Comment 6 Martin Renvoize (ashimema) 2024-04-22 15:44:36 UTC
Obvious code correction, no regressions. Passing QA
Comment 7 Katrin Fischer 2024-04-26 06:53:42 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-05-23 14:55:55 UTC
Pushed to 23.11.x for 23.11.06
Comment 9 Lucas Gass (lukeg) 2024-05-28 20:17:02 UTC
Backported to 23.05.x for upcoming 23.05.12