[Bug 34043] New: Improve translation of CSV header templates
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Bug ID: 34043 Summary: Improve translation of CSV header templates Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Depends on: 21156 Koha has several templates which are used to define the headers for CSV export files, but they are not structured well for easy translation. For example, this is how the translation tool presents csv_headers/catalogue/itemsearch.tt in the .po file: #: koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt:1 #, c-format msgid "%s %s %s %s \"Title\" %s \"Publication date\" %s \"Publisher\" %s \"Collection\" %s \"Barcode\" %s \"Serial enumeration\" %s \"Call number\" %s \"Home library\" %s \"Current library\" %s \"Shelving location\" %s \"Item type\" %s \"Inventory number\" %s \"Not for loan status\" %s \"Lost status\" %s \"Withdrawn status\" %s \"Checkouts\" %s \"Due date\" %s " These files can be restructured to make the translation process easier. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21156 [Bug 21156] Internationalization: plural forms, context, and more for JS files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |String patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 152558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152558&action=edit Bug 34043: Improve translation of CSV header templates This patch reformats serverl CSV header templates so that it's easier to translate the English strings. The templates now use the [% t(" ") %] construction to ensure that each string is managed separately. To test, apply the patch and go to Acquisitions. - Locate a vendor with a basket and view the basket. - Click the "Export as CSV" button. The CSV file you get should be well-formatted. - Go to basket groups for that vendor and click the "Closed" tab. - Click the "Export as CSV" button for one of the baskets. The CSV file should be correct. - Go to Acquisitions -> Late orders. - Check some checkboxes in the list of late orders. Click "Export as CSV" at the bottom of the page. The CSV file should be correct. - Go to the catalog's item search page. - Perform a search which will return results. On the result page, choose "Export all results to -> CSV" and check the resulting CSV file. - Go to Reports -> Statistics Wizards -> Cash register - Select "To a file" under "Output" and submit. Check the resulting CSV file. - Go to Reports -> Orders by funds. - Choose "To a file" under "Output" and submit. Check the resulting CSV file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We need to make sure that this is also tested with a translation/other language, because we keep having problems with the translation tools and CSV (translation kills line breaks for example). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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=34043 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152558|0 |1 is obsolete| | --- Comment #3 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 154483 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154483&action=edit Bug 34043: Improve translation of CSV header templates This patch reformats serverl CSV header templates so that it's easier to translate the English strings. The templates now use the [% t(" ") %] construction to ensure that each string is managed separately. To test, apply the patch and go to Acquisitions. - Locate a vendor with a basket and view the basket. - Click the "Export as CSV" button. The CSV file you get should be well-formatted. - Go to basket groups for that vendor and click the "Closed" tab. - Click the "Export as CSV" button for one of the baskets. The CSV file should be correct. - Go to Acquisitions -> Late orders. - Check some checkboxes in the list of late orders. Click "Export as CSV" at the bottom of the page. The CSV file should be correct. - Go to the catalog's item search page. - Perform a search which will return results. On the result page, choose "Export all results to -> CSV" and check the resulting CSV file. - Go to Reports -> Statistics Wizards -> Cash register - Select "To a file" under "Output" and submit. Check the resulting CSV file. - Go to Reports -> Orders by funds. - Choose "To a file" under "Output" and submit. Check the resulting CSV file. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #4 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I translated in fr-CA and it worked for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Tested the item search export: there are too many unnecessary spaces "Title", "Publication date", "Publisher", "Collection", "Barcode", "Serial enumeration", "Call number", "Home library", "Current library", "Shelving location", "Item type", "Inventory number", "Not for loan status", "Lost status", "Withdrawn status", "Checkouts", "Due date" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. 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=34043 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 155197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155197&action=edit Bug 34043: Remove incorrect spaces This bug looked cool and safe, but tests highlighted that the (introduced) newlines were translated into spaces, which is not correct in the CSV format (i.e. q{"Column 1" , "Column 2"} is not really correct). Also, the double quotes were forcibly introduced (semi-correct) but the tests weren't adjusted. We should really stop using templates for generating CSV, and use a library for the task instead of manually crafting them. But that's for another bug report. This patch: * Removes extra spaces in TT-generated CSV headers * Adjusts the tests to the new format introduced by this report Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Sorry, I didn't mean to PQA here, I let a comment about a problem. Additionally I think this breaks t/db_dependent/Acquisition/GetBasketAsCSV.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #8)
Sorry, I didn't mean to PQA here, I let a comment about a problem.
Additionally I think this breaks t/db_dependent/Acquisition/GetBasketAsCSV.t
As well as t/db_dependent/Acquisition/GetBasketGroupAsCSV.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- And... I was behind. Should be fixed with Tomas's follow-up! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33339 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34043 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34845 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34845 [Bug 34845] GetBasketGroupAsCSV.t is failing if the DB has been upgraded -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org