[Bug 11668] New: Untranslatable "Total" in borrowers stats report
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Bug ID: 11668 Summary: Untranslatable "Total" in borrowers stats report Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@pttk.fi QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr When saving borrowers_stats output into CSV, there will be hard-coded, untranslatable, "Total" and "TOTAL" texts. reports/borrowers_stats.pl: print "Total\n"; -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #1 from paxed <pasi.kallinen@pttk.fi> --- It would also be good to have the field names translatable (eg. "zipcode/branchcode" in the output) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Depends on| |11848 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 27936 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27936&action=edit Bug 11668: make hardcoded strings in reports/borrowers_stats.pl translatable To test: [1] Generate the PO files for the language of your choice. [2] Supply translations for the "Total" and "TOTAL" strings in the $LANG-messages.op file. [3] Install the translation. [4] Change the staff interface to the chosen language. [5] Run the borrowers statistics report and export the results to CSV. [5] Verfiy that the strings "Total" and "TOTAL" are replaced with the translation made in step 2. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 31425 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31425&action=edit [Signed-off] Bug 11668: make hardcoded strings in reports/borrowers_stats.pl translatable To test: [1] Generate the PO files for the language of your choice. [2] Supply translations for the "Total" and "TOTAL" strings in the $LANG-messages.op file. [3] Install the translation. [4] Change the staff interface to the chosen language. [5] Run the borrowers statistics report and export the results to CSV. [5] Verfiy that the strings "Total" and "TOTAL" are replaced with the translation made in step 2. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Patch behaves as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch Patch complexity|--- |String patch Severity|enhancement |trivial -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27936|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #4 from Marc Véron <veron@veron.ch> --- (In reply to paxed from comment #1)
It would also be good to have the field names translatable (eg. "zipcode/branchcode" in the output)
I propose to move this request to a new bug. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #5 from Marc Véron <veron@veron.ch> --- Fixed by first patch (Signed-off): reports/borrowers_stats.pl: print "Total\n"; reports/borrowers_stats.pl: print "TOTAL"; There are more hardcoded "Total" in reports (git grep 'print "T'): reports/acquisitions_stats.pl: print "Total\n"; reports/acquisitions_stats.pl: print "TOTAL"; reports/bor_issues_top.pl: print "TOTAL"; reports/borrowers_out.pl: print "Total\n"; reports/borrowers_out.pl: print "TOTAL"; reports/cat_issues_top.pl: print "Total\n"; reports/cat_issues_top.pl: print "TOTAL"; reports/catalogue_stats.pl: print "Total\n"; reports/catalogue_stats.pl: print "TOTAL"; reports/issues_avg_stats.pl: print "Total\n"; reports/issues_avg_stats.pl: print "TOTAL"; reports/issues_stats.pl: print "Total\n"; reports/issues_stats.pl: print "TOTAL"; reports/reserves_stats.pl: print "Total\n"; reports/reserves_stats.pl: print "TOTAL"; -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 31438 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31438&action=edit [Follow-up] Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl To test follow test plan from first patch as appropiate. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #7 from Marc Véron <veron@veron.ch> --- Second patch needs Sign-off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Untranslatable "Total" in |Untranslatable "Total" in |borrowers stats report |borrowers stats and other | |reports -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- I tried testing this with reports/acquisitions_stats.pl and got an error instead of a CSV file: Undefined subroutine main::gettext called at kohaclone/reports/acquisitions_stats.pl line 97. I see that the first patch adds "use Koha::I18N;" and the follow-ups don't. Looks like it might be required. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 31512 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31512&action=edit Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl To test follow test plan from first patch as appropiate. http://bugs.koha-community.org/show_bug.cgi?id=11668 (Missing use Koha::I18N; added) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31438|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31512|0 |1 is obsolete| | --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 31513 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31513&action=edit Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl reports/reserves_stats.pl To test follow test plan from first patch as appropiate. http://bugs.koha-community.org/show_bug.cgi?id=11668 (Missing use Koha::I18N; added) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #11 from Marc Véron <veron@veron.ch> --- Still applies on current master: 3.17.00.029 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 32698 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32698&action=edit Bug 11668: Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl reports/reserves_stats.pl To test follow test plan from first patch as appropiate. (Missing use Koha::I18N; added) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Chris Cormack <chris@bigballofwax.co.nz> 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=11668 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31513|0 |1 is obsolete| | Attachment #32698|0 |1 is obsolete| | --- Comment #13 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 32699 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32699&action=edit Bug 11668: Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl reports/reserves_stats.pl To test follow test plan from first patch as appropiate. (Missing use Koha::I18N; added) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 32711 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32711&action=edit [PASSED QA] Bug 11668: make hardcoded strings in reports/borrowers_stats.pl translatable To test: [1] Generate the PO files for the language of your choice. [2] Supply translations for the "Total" and "TOTAL" strings in the $LANG-messages.op file. [3] Install the translation. [4] Change the staff interface to the chosen language. [5] Run the borrowers statistics report and export the results to CSV. [5] Verfiy that the strings "Total" and "TOTAL" are replaced with the translation made in step 2. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Patch behaves as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 32712 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32712&action=edit [PASSED QA] Bug 11668: Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl reports/reserves_stats.pl To test follow test plan from first patch as appropiate. (Missing use Koha::I18N; added) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 32713 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32713&action=edit Bug 11668: Follow-up - fix POD The QA script complained about some POD errors. I fixed those. I left the tabs for now, as the files are all tabs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31425|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32699|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure about this patch. It works as described, but it introduces a new po file (po/de-DE-messages.po) that the translation manager will have to add to Pootle. Adding Bernardo for his opinion. Also, it looks like we have a bit of a mix, some TOTAL are in the normal po file and some are in the new file. On the other hand, we introduced this new technique and so it seems valid to use it :) Maybe we need to think about when we want to insist on adding strings to the template and when we prefer the new gettext(). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #18 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Katrin Fischer from comment #17)
I am not sure about this patch.
I'm also not sure. It does not work in the same way as normal translations, but until we have a better way it's better than nothing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |tomascohen@gmail.com --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm not sure about the approach. We've been making an effort to remove the whole strings from the code, and there's no current workflow for including this .po on the translation processs... I'll mark it as In-Discussion, and probably try to post a counter-patch that avoids Koha::i18n. I'm open to discuss it on a dev meeting soon. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 --- Comment #20 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 36794 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36794&action=edit Bug 11668: another approach In this patch I pass the messages to be printed as hidden parameters that are set using JQuery, and translated in the usual way. To test: 1) Apply the patch 2) Update and install de-DE (works with this lang) 3) Go to Reports > Patron statistics 4) Select Patron category in row, Library as column (just an example), export as CSV 5) Switch to German and repeat 4 6) Check translated 'Total/TOTAL' in german CSV Just a idea, if you like it, can be extended to the other cases -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|veron@veron.ch |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11668 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11387 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org