Translated itemtype description is not used in display of Holds queue
(In reply to Marc Véron from comment #0) > Translated itemtype description is not used in display of Holds queue Translated itemtype descriptions display OK, but there is a superfluous comment in circ/view_holdsqueue.pl
Created attachment 64726 [details] [review] Bug 18881: Remove comment about translated itemtype description in circ/view_holdsqueue.pl This patch removes a superfluous FIXME comment. To test: Compare code, verify that comment correctly is removed
(In reply to Marc Véron from comment #1) > (In reply to Marc Véron from comment #0) > > Translated itemtype description is not used in display of Holds queue > > Translated itemtype descriptions display OK, but there is a superfluous > comment in circ/view_holdsqueue.pl It is because your description is translated in the first place, or does switching languages actually give a valid translation for each language?
(In reply to M. Tompsett from comment #3) > (In reply to Marc Véron from comment #1) > > (In reply to Marc Véron from comment #0) > > > Translated itemtype description is not used in display of Holds queue > > > > Translated itemtype descriptions display OK, but there is a superfluous > > comment in circ/view_holdsqueue.pl > > It is because your description is translated in the first place, or does > switching languages actually give a valid translation for each language? To have translated item descriptions you can go to Home > Administration > Item types > Modify item type 'BK' There you have a link 'Translate into other languages' to create translations To test, you can even 'translate' for English to overwrite the original description.
(In reply to Marc Véron from comment #4) > To have translated item descriptions you can go to > Home > Administration > Item types > Modify item type 'BK' > > There you have a link 'Translate into other languages' to create translations > To test, you can even 'translate' for English to overwrite the original > description. But that is by overwriting the actual description. Not by just changing the language selected. I think the comment was about having a way to po-i-size it. Patch is okay, but it's really a commentary on having DB translations, not just templates, I think.
Did you check the description Marc gave? The value will change with switching the language if you have configured it. It doesn't make sense to have po files for configurable values that are different for each library. The new way to save the translations in a separate table works better, as every library can change it any time. I think Marc's patch is correct.
(In reply to M. Tompsett from comment #5) > (In reply to Marc Véron from comment #4) > > To have translated item descriptions you can go to > > Home > Administration > Item types > Modify item type 'BK' > > > > There you have a link 'Translate into other languages' to create translations > > To test, you can even 'translate' for English to overwrite the original > > description. > > But that is by overwriting the actual description. Not by just changing the > language selected. I think the comment was about having a way to po-i-size > it. Patch is okay, but it's really a commentary on having DB translations, > not just templates, I think. Maybe there is a misunderstanding. - Item types are defined by the library (or loaded together with the example values, in the language choosen for installation). - When defining an item type, the library can define translations for other (installed) languages as well. E.g. in Switzerland a library could define an item type with code 'BUCH' and the description "Buch" for German and the translated descriptions "Livre" for French and "Libro" for Italian - The (translated) description appears (is overlayed) depending on the language selected by the user. - You can not po-i-size that because the library defines the item types.
(In reply to Marc Véron from comment #7) > Maybe there is a misunderstanding. Perhaps. I'll just remove myself for the conversation. Please continue.
If we remove this comment, some day somebody wonders again why we do not use the translated description. So instead of removing I would opt for adding a legitimate reason why we really do not want a translation.
(In reply to Marcel de Rooy from comment #9) > If we remove this comment, some day somebody wonders again why we do not use > the translated description. > So instead of removing I would opt for adding a legitimate reason why we > really do not want a translation. The translation takes place by overlaying in the template, using the itemtype. The whole line is dead code. Changed bug title as appropriate.
Created attachment 64761 [details] [review] Bug 18881: Remove dead code in circ/view_holdsqueue.pl Remove a line of dead code from circ/view_holdsqueue.pl To test: - Apply patch - Go to Home > Circulation > Holds queue - Verify that description in Item type column displays as before - Create a translation for an item type: Home > Administration > Item types > Modify item type 'BK' There you have a link 'Translate into other languages' to create translations To test, you can even 'translate' for English to overwrite the original description. - Verify that the translated descriptions displays when changing the language as appropriate - For an explanation how translation of item types descriptions work and why it is not done with Pootle see comment #7
Applying: Bug 18881: Remove dead code in circ/view_holdsqueue.pl fatal: sha1 information is lacking or useless (circ/view_holdsqueue.pl). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
(In reply to Marcel de Rooy from comment #12) > Applying: Bug 18881: Remove dead code in circ/view_holdsqueue.pl > fatal: sha1 information is lacking or useless (circ/view_holdsqueue.pl). > Repository lacks necessary blobs to fall back on 3-way merge. > Cannot fall back to three-way merge. Re-tested, applies cleanly here (on top of Bug 18859).
*** Bug 18859 has been marked as a duplicate of this bug. ***
Created attachment 64769 [details] [review] Bug 18881: Remove dead code from view_holdsqueue.pl Aleisha spotted the typo in $itemtypes and proposed a correction on bug 18859. The description was not even used. Template calls GetDescription. To test: Verify that viewing the holds queue still works as expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64770 [details] [review] Bug 18881: [QA Follow-up] Remove even more Removing the commented section from the template: If it does not work, it should not be here. When it works again, put it back in. Since @itemtypesloop is not used, remove it from the script too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Taking the liberty to move this directly into PQA now
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.02 Dead code go to hell ;)
This won't get ported back to 16.11.x as it is an enhancement.