[Bug 30352] New: "Not for loan" in result list doesn't translate in OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Bug ID: 30352 Summary: "Not for loan" in result list doesn't translate in OPAC Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org When there are items marked es "Not for loan" by the item type in the result list in OPAC, the "Not for loan" text doesn't translate. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Component|OPAC |I18N/L10N Version|20.11 |master Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The problem is somewhere around here: https://git.koha-community.org/Koha-community/Koha/src/branch/master/C4/XSLT... I think it was assumed that you'd usually have a description stemming from the authorised value, but this is not the case when the itemtype determines that the item is Not for loan. We need to have this string translatable. I am currently out of ideas on how to fix this :( -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hansulrich.frink@gmail.com --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 32008 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Severity|normal |major --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This got worse with the rewrites/changes in the newer versions. The string "Not for loan" is no longer in its own HTML element, so it's not longer a simple search and replace by jQuery as a workaround. It's now much more difficult as it has the library name in the same element. <span class="unavailable_Not for loan"><span class="ItemBranch">Bibliothek X: Not for loan</span> (1). </span> The problem is here: https://git.koha-community.org/Koha-community/Koha/src/branch/master/C4/XSLT... Can please someone help to fix this? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Will have a look here soon. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks Marcel, I tried, but I have run out of ideas and the code is a little complex. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Bumping here again on the lack of translated auth values .. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #7)
Bumping here again on the lack of translated auth values ..
But this is not coming from an authorised value in that case... It's the fallback text for the itemtype level setting that's failing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #8)
(In reply to Marcel de Rooy from comment #7)
Bumping here again on the lack of translated auth values ..
But this is not coming from an authorised value in that case... It's the fallback text for the itemtype level setting that's failing.
Sure. But it's the same code or direct context in the .xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Cleared up on IRC: the item type value will be translated, but the AV values will not. With this fix we can still have at least all translated one non-English language which often will help already. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Example display Availability: Items available for loan: Centerville (1)Call number: PERL A 1. Items available for reference: Centerville: NOT FOR LOAN (1)Call number: PERL A 4. Centerville: Staff collection (1)Call number: PERL A 5. Not available: Centerville: Damaged (1)Call number: PERL A 3. Centerville: Withdrawn (1)Call number: PERL A 2. # Toggling NFL statuses Availability: Items available for loan: Centerville (1)Call number: PERL A 1. Items available for reference: Centerville: NOT FOR LOAN (1)Call number: PERL A 4. Not available: Centerville: Damaged (1)Call number: PERL A 3. Centerville: Staff collection (1)Call number: PERL A 5. Centerville: Withdrawn (1)Call number: PERL A 2. # Toggling NFL statuses Availability: Items available for loan: Centerville (1)Call number: PERL A 1. Items available for reference: Centerville: Staff collection (1)Call number: PERL A 5. Not available: Centerville: Damaged (1)Call number: PERL A 3. Centerville: NOT FOR LOAN (1)Call number: PERL A 4. Centerville: Withdrawn (1)Call number: PERL A 2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Clarification: uc NOT FOR LOAN is the translation :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 149919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149919&action=edit Bug 30352: Allow translation of Not for loan in OPAC XSLT results Note: Test plan below can be followed in English. If you would like to see the vernacular results, you need to update PO files and translate 'Not for loan', and update templates (xslt files) accordingly. The bootstrap PO does not yet include that string without %s suffix in the current codebase. Test plan: [1] Apply this patch and make the following change in MARC21slim2OPACResults.xsl, line 1207. Change: <status english="Not for loan">Not for loan</status> to: <status english="Not for loan">NOT for loan</status> Important: Change text inside, not the attribute! Restart all. [2] Pick a biblio, add some items with different statuses: Checked out, Damaged, Not for loan, Staff collection. [3] Make it appear in a OPAC results display (not detail). [4] You should see the different statuses, including NOT for loan. The uppercase NOT serves to prove that the string has been translated. Also verify that you see Staff collection as-is. [5] Bonus: Toggle with values in Reference_NFL_Statuses to move results from Reference section to Not available section v.v. [6] Revert the change from step 1. Sign off :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 149920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149920&action=edit Bug 30352: Add a comment to the substatus translation The tric of combining the XPath union operator (|) with the value-of instruction works as a sort of ternary operation. The value-of only picks the string value of the first node from the union in document order. So, if there is a translation, it will be the first node. If there is no translation, the original substatus will be used. Note that there will be no translation for authorised values like Staff collection, etc. Test plan: None. Just comments. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33567 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149919|0 |1 is obsolete| | --- Comment #15 from David Nind <david@davidnind.com> --- Created attachment 150107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150107&action=edit Bug 30352: Allow translation of Not for loan in OPAC XSLT results Note: Test plan below can be followed in English. If you would like to see the vernacular results, you need to update PO files and translate 'Not for loan', and update templates (xslt files) accordingly. The bootstrap PO does not yet include that string without %s suffix in the current codebase. Test plan: [1] Apply this patch and make the following change in MARC21slim2OPACResults.xsl, line 1207. Change: <status english="Not for loan">Not for loan</status> to: <status english="Not for loan">NOT for loan</status> Important: Change text inside, not the attribute! Restart all. [2] Pick a biblio, add some items with different statuses: Checked out, Damaged, Not for loan, Staff collection. [3] Make it appear in a OPAC results display (not detail). [4] You should see the different statuses, including NOT for loan. The uppercase NOT serves to prove that the string has been translated. Also verify that you see Staff collection as-is. [5] Bonus: Toggle with values in Reference_NFL_Statuses to move results from Reference section to Not available section v.v. [6] Revert the change from step 1. Sign off :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149920|0 |1 is obsolete| | --- Comment #16 from David Nind <david@davidnind.com> --- Created attachment 150108 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150108&action=edit Bug 30352: Add a comment to the substatus translation The tric of combining the XPath union operator (|) with the value-of instruction works as a sort of ternary operation. The value-of only picks the string value of the first node from the union in document order. So, if there is a translation, it will be the first node. If there is no translation, the original substatus will be used. Note that there will be no translation for authorised values like Staff collection, etc. Test plan: None. Just comments. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #17 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. For step 1 of the test plan: . to edit file: vi koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl . line to edit for me was 1297 2. Second patch: I don't know enough to provide a useful comment, feel free to change the status back to needs signoff for someone else to comment if this is essential. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150107|0 |1 is obsolete| | Attachment #150108|0 |1 is obsolete| | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 150121 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150121&action=edit Bug 30352: Allow translation of Not for loan in OPAC XSLT results Note: Test plan below can be followed in English. If you would like to see the vernacular results, you need to update PO files and translate 'Not for loan', and update templates (xslt files) accordingly. The bootstrap PO does not yet include that string without %s suffix in the current codebase. Test plan: [1] Apply this patch and make the following change in MARC21slim2OPACResults.xsl, line 1207. Change: <status english="Not for loan">Not for loan</status> to: <status english="Not for loan">NOT for loan</status> Important: Change text inside, not the attribute! Restart all. [2] Pick a biblio, add some items with different statuses: Checked out, Damaged, Not for loan, Staff collection. [3] Make it appear in a OPAC results display (not detail). [4] You should see the different statuses, including NOT for loan. The uppercase NOT serves to prove that the string has been translated. Also verify that you see Staff collection as-is. [5] Bonus: Toggle with values in Reference_NFL_Statuses to move results from Reference section to Not available section v.v. [6] Revert the change from step 1. Sign off :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 150122 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150122&action=edit Bug 30352: Add a comment to the substatus translation The tric of combining the XPath union operator (|) with the value-of instruction works as a sort of ternary operation. The value-of only picks the string value of the first node from the union in document order. So, if there is a translation, it will be the first node. If there is no translation, the original substatus will be used. Note that there will be no translation for authorised values like Staff collection, etc. Test plan: None. Just comments. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks Marcel. I also verified that this is working by running the translation scripts and updating the po files. We now see a translated Not for loan according to selected language. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #20)
Thanks Marcel.
I also verified that this is working by running the translation scripts and updating the po files. We now see a translated Not for loan according to selected language.
Great, thx. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.05.00,22.11.06 |23.05.00,22.11.06,22.05.13 released in| | CC| |lucas@bywatersolutions.com --- Comment #24 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This was pushed to 21.11. And I think it broke search results display in 21.11.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30352 --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I have now reverted this two patches on 21.11, to be released as 21.11.22. If needed in 21.11, we can give it proper testing and make sure nothing is broken. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org