[Bug 18694] New: Translatability: Get rid of exposing [%% FOREACH in csv/ cash_register_stats.tt
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Bug ID: 18694 Summary: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt 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: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr The file csv/cash_register_stats.tt exposes two FOREACH loops to translation. Translators should not be confronted with code internals. -- 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=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial -- 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=18694 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 63835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63835&action=edit Bug 18694: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt Code exposed is: %s %s %s [%%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END %%] %s TOTAL [%%- FOREACH field IN total; field; sep IF !loop.last; END %%] To test: - Apply patch - In staff client, verify that Cash register statistics work as before (Home > Reports > Cash register statistics) - Bonus test: Create a "language" aa-AA (perl translate create aa-AA from folder misc/translator, verify that lines mentioned above do no longer appear in aa-AA-staff-prog.po - Run QA tools (newest version with test for newlines in tt directives) -- 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=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- 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=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63835|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 63836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63836&action=edit Bug 18694: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt Code exposed is: %s %s %s [%%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END %%] %s TOTAL [%%- FOREACH field IN total; field; sep IF !loop.last; END %%] Similar for: csv/orders_by_budget.tt To test: - Apply patch - In staff client, verify that Cash register statistics work as before (Home > Reports > Cash register statistics) - Verify the same for Home > Reports > Orders by fund (triggers orders_by_budget.tt) - Bonus test: Create a "language" aa-AA (perl translate create aa-AA from folder misc/translator, verify that lines mentioned above do no longer appear in aa-AA-staff-prog.po ) - Run QA tools (newest version with test for newlines in tt directives) -- 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=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |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=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It does not work, the funds are all displayed on the same line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |normal --- Comment #4 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #3)
It does not work, the funds are all displayed on the same line.
Oh, that is a problem for translations, because in the target language the result of the translation process is the same one-liner as in my patch. Setting importance to normal because it is not only a string change, but functionality in target languages seems to be broken. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18734 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18734 [Bug 18734] Internal server error in cash_register_stats.pl when exporting to file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #4)
(In reply to Jonathan Druart from comment #3)
It does not work, the funds are all displayed on the same line.
Oh, that is a problem for translations, because in the target language the result of the translation process is the same one-liner as in my patch.
I only tested on the non-translated interface. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #6 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #3)
It does not work, the funds are all displayed on the same line.
Hi Jonathan I took some time to re-test on Home > Reports > Orders by fund, but I can not recreate the issue. The funds display properly if I choose Output > To screen The funds are properly imported from csv to LibreOffice Calc if I choose Ooutput > To a file. Where do you see the funds in one line? Can you pls. provide steps to reproduce and/or a screen shot? Thanks Marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Marc, make sure the string is not 'fuzzy' but actually translated. I have filed a bug a bit ago for the CSV export on item search being broken again (all in one line) once the header line is actually translated. When we tested the new fix, I think that was missed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #8 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #7)
Hi Marc,
make sure the string is not 'fuzzy' but actually translated. I have filed a bug a bit ago for the CSV export on item search being broken again (all in one line) once the header line is actually translated. When we tested the new fix, I think that was missed.
The problem Jonathan reports is in the untranslated (English) version, see comment #5, but I can not reproduce. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ah sorry, missed that, it sounded so familiar. - Might still be worth a test. -- You are receiving this mail because: You are watching all bug changes.
Hi Marc,
make sure the string is not 'fuzzy' but actually translated (...) Hi Katrin If you do for a 'language' aa-AA:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #10 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #7) perl translate create aa-AA ...you won't get strings marked as fuzzy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- But will they not still be untranslated? My point was that if you don't properly translate, sometimes the results are not what you would expect. Running the install step will not create the same file output for an untranslated vs a translated file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #12 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #11)
But will they not still be untranslated? My point was that if you don't properly translate, sometimes the results are not what you would expect. Running the install step will not create the same file output for an untranslated vs a translated file.
Maybe there is a misunderstandig about the intention of: perl translate create aa-AA It is simply a test to verify that unwanted strings no longer are picked by the translation process (no longer appear in the related aa-AA*.po file). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It makes sense, I was just trying to explain something I found out recently that explains why sometimes the CSV exports tests ok, when indeed they are still broken. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #14 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #3)
It does not work, the funds are all displayed on the same line.
Hi Jonathan I'd like to move forward this bug, but I still can not reproduce this issue (see my comment #6 ) Can you provide steps to reproduce and/or a screenshot? Thanks a lot Marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The patch does no longer apply, I cannot retest. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #16 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #15)
The patch does no longer apply, I cannot retest.
Patch applies cleanly here on current master I did git pull HEAD is at: a38ffe2 Bug 18656 - Require confirmation of deletion of files from patron record git bz apply 18694 63836 - Bug 18694: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt Yes -> applies cleanly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #16)
(In reply to Jonathan Druart from comment #15) Yes -> applies cleanly
No it does not, this bug report is marked as dependent on bug 18734 and both patches conflict. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63836|0 |1 is obsolete| | --- Comment #18 from Marc Véron <veron@veron.ch> --- Created attachment 64209 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64209&action=edit Bug 18694: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt Code exposed is: %s %s %s [%%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END %%] %s TOTAL [%%- FOREACH field IN total; field; sep IF !loop.last; END %%] Similar for: csv/orders_by_budget.tt To test: - Apply patch - In staff client, verify that Cash register statistics work as before (Home > Reports > Cash register statistics) - Verify the same for Home > Reports > Orders by fund (triggers orders_by_budget.tt) - Bonus test: Create a "language" aa-AA (perl translate create aa-AA from folder misc/translator, verify that lines mentioned above do no longer appear in aa-AA-staff-prog.po ) - Run QA tools (newest version with test for newlines in tt directives) Rebased on top of Bug 18734 2017-12-06 / mv -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64209|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64231&action=edit Bug 18694: Translatability: Get rid of exposing [%% FOREACH in csv/cash_register_stats.tt Code exposed is: %s %s %s [%%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END %%] %s TOTAL [%%- FOREACH field IN total; field; sep IF !loop.last; END %%] Similar for: csv/orders_by_budget.tt To test: - Apply patch - In staff client, verify that Cash register statistics work as before (Home > Reports > Cash register statistics) - Verify the same for Home > Reports > Orders by fund (triggers orders_by_budget.tt) - Bonus test: Create a "language" aa-AA (perl translate create aa-AA from folder misc/translator, verify that lines mentioned above do no longer appear in aa-AA-staff-prog.po ) - Run QA tools (newest version with test for newlines in tt directives) Rebased on top of Bug 18734 2017-12-06 / mv Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sorry, it is actually broken for translated language, with and without your patch. Skipping QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18331 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18331 [Bug 18331] CSV exports need to be fixed once and for all -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #22 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.09. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18694 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #24 from Mason James <mtj@kohaaloha.com> --- depends on bug 6934, Blocked by Enhancement, skipping for 16.05.x branch -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org