[Bug 10049] New: Comments tab shows ( ) instead of ( 0 ) on translated templates
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Bug ID: 10049 Summary: Comments tab shows ( ) instead of ( 0 ) on translated templates Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: minor Priority: P5 - low Component: Templates Assignee: katrin.fischer@bsz-bw.de Reporter: katrin.fischer@bsz-bw.de Created attachment 17423 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17423&action=edit screenshot To reproduce: 1) Make sure comments/reviews are activated 2) Find a record with 0 comments/reviews in the opac 3) The tab shows: Comments ( 0 ) 4) Switch to any other languages. 5) Tab now shows: <translation of Comments> ( ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9952 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 17424 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17424&action=edit Bug 10049: Comments tab shows ( ) instad of ( 0 ) for translated templates To test: 1) Make sure comments/reviews are activated 2) Find a record with 0 comments/reviews in the opac 3) The tab shows: Comments ( 0 ) 4) Switch to any other languages. 5) Tab now shows: <translation of Comments> ( ) 6) Apply patch 7) Check English templates stil work correctly 8) Rerun 'perl translate install <langcode> 9) Check display is now correct. 10) Also check that number shows correctly for records with comments. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 17455 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17455&action=edit Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates This patch is an alternate solution to the problem of "0" not appearing on the comment tab in translated templates. It uses the Template Toolkit option of specifying a default value for a variable: [% reviews.size || 0 %] This syntax is already in use elsewhere in the template. Same test plan: 1) Make sure comments/reviews are activated 2) Find a record with 0 comments/reviews in the opac 3) The tab shows: Comments ( 0 ) 4) Switch to any other languages. 5) Tab now shows: <translation of Comments> ( ) 6) Apply patch 7) Check English templates stil work correctly 8) Rerun 'perl translate install <langcode> 9) Check display is now correct. 10) Also check that number shows correctly for records with comments. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17424|0 |1 is obsolete| | Attachment #17455|0 |1 is obsolete| | --- Comment #3 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 17496 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17496&action=edit [SIGNED-OFF] Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates This patch is an alternate solution to the problem of "0" not appearing on the comment tab in translated templates. It uses the Template Toolkit option of specifying a default value for a variable: [% reviews.size || 0 %] This syntax is already in use elsewhere in the template. Same test plan: 1) Make sure comments/reviews are activated 2) Find a record with 0 comments/reviews in the opac 3) The tab shows: Comments ( 0 ) 4) Switch to any other languages. 5) Tab now shows: <translation of Comments> ( ) 6) Apply patch 7) Check English templates stil work correctly 8) Rerun 'perl translate install <langcode> 9) Check display is now correct. 10) Also check that number shows correctly for records with comments. Signed-off-by: Magnus Enger <magnus@enger.priv.no> Tested with nb-NO. English still works after the patch. Norwegian was showing "Comments" untranslated, which had me a bit unnerved. Turns out the string to be translated changed from "Comments ( %s%s%s%s )" to "Comments ( %s )", so to make sure all was well, I had to update the nb-NO translation, fix the number of %s's in the Norwegian string, make sure it was not marked as fuzzy and then install nb-NO. And it works! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: Same as Magnus here, translate install is not enough but update + translation + install works ! Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17496|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 17544 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17544&action=edit Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates This patch is an alternate solution to the problem of "0" not appearing on the comment tab in translated templates. It uses the Template Toolkit option of specifying a default value for a variable: [% reviews.size || 0 %] This syntax is already in use elsewhere in the template. Same test plan: 1) Make sure comments/reviews are activated 2) Find a record with 0 comments/reviews in the opac 3) The tab shows: Comments ( 0 ) 4) Switch to any other languages. 5) Tab now shows: <translation of Comments> ( ) 6) Apply patch 7) Check English templates stil work correctly 8) Rerun 'perl translate install <langcode> 9) Check display is now correct. 10) Also check that number shows correctly for records with comments. Signed-off-by: Magnus Enger <magnus@enger.priv.no> Tested with nb-NO. English still works after the patch. Norwegian was showing "Comments" untranslated, which had me a bit unnerved. Turns out the string to be translated changed from "Comments ( %s%s%s%s )" to "Comments ( %s )", so to make sure all was well, I had to update the nb-NO translation, fix the number of %s's in the Norwegian string, make sure it was not marked as fuzzy and then install nb-NO. And it works! Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10049 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org