From 5e5a4a71200dea51c0eacb476be78996d97a85b6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Sep 2013 17:07:09 +0200 Subject: [PATCH] Bug 10935: CSV are broken using other language than english. To reproduce: - cd misc/translator - ./translate update LANG - ./translate install LANG - go to the Koha mainpage and change the language. - go to acqui/basketgroup.pl?booksellerid=XX and try to export a basketgroup. The headers is followed by the first basketgroup information. There is no carriage return. It looks like it is caused by a routine used by the translator script (TmplTokenizer::string_canon). To test this patch: - apply it - cd misc/translator - ./translate -f update LANG - translate headers in your po file - ./translate -f install LANG - go to acqui/basketgroup.pl?booksellerid=XX and try to export a basketgroup. - verify that the csv looks good now. - same thing for basket. --- .../intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt | 1 + .../intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt | 3 +-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt new file mode 100644 index 0000000..efcf292 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt @@ -0,0 +1 @@ +Contract name,Order number,Entry date,ISBN,Author,Title,Publication year,Publisher code,Collection title,Notes,Quantity,RRP,Delivery place,Billing place diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt new file mode 100644 index 0000000..d7650c1 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt @@ -0,0 +1 @@ +Account number,Basket name,Order number,Author,Title,Publisher code,Publication year,Collection title,ISBN,Quantity,RRP,Discount,Estimated cost,Notes,Entry date,Bookseller name,Bookseller physical address,Bookseller postal address,Contract number,Contract name,Basket group delivery place,Basket group billing place,Basket delivery place,Basket billing place diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt index 2d5c2df..1d244a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt @@ -1,3 +1,2 @@ -Contract name,Order number,Entry date,ISBN,Author,Title,Publication year,Publisher code,Collection title,Notes,Quantity,RRP,Delivery place,Billing place -[% FOREACH r IN rows %]"[% r.contractname %]",[% r.ordernumber %],[% r.entrydate %],[% r.isbn %],"[% r.author %]","[% r.title %]",[% r.publicationyear %],"[% r.publishercode %]","[% r.collectiontitle %]","[% r.notes %]",[% r.quantity %],[% r.rrp %],"[% r.deliveryplace %]","[% r.billingplace %]" +[% INCLUDE csv_headers/acqui/basket.tt %][% FOREACH r IN rows %]"[% r.contractname %]",[% r.ordernumber %],[% r.entrydate %],[% r.isbn %],"[% r.author %]","[% r.title %]",[% r.publicationyear %],"[% r.publishercode %]","[% r.collectiontitle %]","[% r.notes %]",[% r.quantity %],[% r.rrp %],"[% r.deliveryplace %]","[% r.billingplace %]" [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt index 2db2c5f..7197e45 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt @@ -1,3 +1,2 @@ -Account number,Basket name,Order number,Author,Title,Publisher code,Publication year,Collection title,ISBN,Quantity,RRP,Discount,Estimated cost,Notes,Entry date,Bookseller name,Bookseller physical address,Bookseller postal address,Contract number,Contract name,Basket group delivery place,Basket group billing place,Basket delivery place,Basket billing place -[% FOREACH r IN rows %][% r.clientnumber %],"[% r.basketname %]",[% r.ordernumber %],"[% r.author %]","[% r.title %]","[% r.publishercode %]",[% r.publicationyear %],"[% r.collectiontitle %]",[% r.isbn %],[% r.quantity %],[% r.rrp %],[% r.discount %],[% r.ecost %],"[% r.notes %]",[% r.entrydate %],"[% r.booksellername %]","[% r.bookselleraddress %]","[% r.booksellerpostal %]",[% r.contractnumber %],"[% r.contractname %]","[% r.basketgroupdeliveryplace %]","[% r.basketgroupbillingplace %]","[% r.basketdeliveryplace %]","[% r.basketbillingplace %]" +[% INCLUDE csv_headers/acqui/basketgroup.tt %][% FOREACH r IN rows %][% r.clientnumber %],"[% r.basketname %]",[% r.ordernumber %],"[% r.author %]","[% r.title %]","[% r.publishercode %]",[% r.publicationyear %],"[% r.collectiontitle %]",[% r.isbn %],[% r.quantity %],[% r.rrp %],[% r.discount %],[% r.ecost %],"[% r.notes %]",[% r.entrydate %],"[% r.booksellername %]","[% r.bookselleraddress %]","[% r.booksellerpostal %]",[% r.contractnumber %],"[% r.contractname %]","[% r.basketgroupdeliveryplace %]","[% r.basketgroupbillingplace %]","[% r.basketdeliveryplace %]","[% r.basketbillingplace %]" [% END %] -- 1.7.10.4