Bug 41422 - New FilterSearchResultsByLoggedInBranch doesn't fully translate
Summary: New FilterSearchResultsByLoggedInBranch doesn't fully translate
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 37883
Blocks:
  Show dependency treegraph
 
Reported: 2025-12-10 15:03 UTC by Katrin Fischer
Modified: 2025-12-11 10:47 UTC (History)
3 users (show)

See Also:
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:


Attachments
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch (3.42 KB, patch)
2025-12-10 17:20 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch (3.45 KB, patch)
2025-12-10 17:24 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch (3.50 KB, patch)
2025-12-10 19:04 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!