Bug 41422

Summary: New FilterSearchResultsByLoggedInBranch doesn't fully translate
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Staff interfaceAssignee: Lucas Gass (lukeg) <lucas>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, lucas
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the translatability of the text shown when the FilterSearchResultsByLoggedInBranch system preference is enabled, and also the check and what is shown only works when not translated.
Version(s) released in:
Circulation function:
Bug Depends on: 37883    
Bug Blocks:    
Attachments: Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch

Description Katrin Fischer 2025-12-10 15:03:38 UTC
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:                $('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only");


This is problematic for multiple reasons:
* Displayed text is not translatable
* The check will only work while things are not translatable...
Comment 1 Lucas Gass (lukeg) 2025-12-10 17:20:20 UTC
Created attachment 190402 [details] [review]
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch

To test:
1. Apply patch
2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'.
3. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
6. Play more with the search results and ensure everything is accurate.
7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch anymore.
Comment 2 Lucas Gass (lukeg) 2025-12-10 17:24:38 UTC
Created attachment 190403 [details] [review]
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch

To test:
1. Apply patch
2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'.
3. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
6. Play more with the search results and ensure everything is accurate.
7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch anymore.
Comment 3 David Nind 2025-12-10 19:04:07 UTC
Created attachment 190416 [details] [review]
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch

To test:
1. Apply patch
2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'.
3. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
6. Play more with the search results and ensure everything is accurate.
7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch anymore.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-12-10 19:19:01 UTC
Everything seems to work as expected.

One issue noted, but not related to this bug, as this is the case before the patch:  in the search results location column there is a space before the comma in the sentence about availability, for example: 1 local item , None available.

Created Bug 41426 for this.

Attempted a release note, not sure I got it right.
Comment 5 Katrin Fischer 2025-12-11 10:47:30 UTC
Thanks for the quick fix! Much appreciated!