Bug 36282

Summary: OPAC - Remove trailing and leading blank space from translated strings
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: TemplatesAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to main --- QA Contact: Martin Renvoize <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, m.de.rooy, martin.renvoize, oleonard, paul.derscheid
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35716
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26816
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on:    
Bug Blocks: 36221    
Attachments: Bug 36282: [DO NOT PUSH] For test plan only
Bug 36282: Chomp whitespace around opac i18n strings
Bug 36282: Chomp whitespace around opac i18n strings
Bug 36282: Chomp whitespace around opac i18n strings

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