Bugzilla – Attachment 40177 Details for
Bug 14264
Export of CSV from late orders form does only work in English
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14264: Fix export of late orders when translated
Bug-14264-Fix-export-of-late-orders-when-translate.patch (text/plain), 2.94 KB, created by
Jonathan Druart
on 2015-06-16 11:09:40 UTC
(
hide
)
Description:
Bug 14264: Fix export of late orders when translated
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-06-16 11:09:40 UTC
Size:
2.94 KB
patch
obsolete
>From c90835a58f3daf012697ae2253819a87722bbef6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@koha-community.org> >Date: Sun, 24 May 2015 17:52:25 +0200 >Subject: [PATCH] Bug 14264: Fix export of late orders when translated > >Bug 7298 tried to fix this issue, but it was not correct. >We have 3 files in acqui/csv: >basketgroup.tt, basket.tt and lateorders.tt >The first 2 don't contain translatable string, and are not modified on >translating the templates (`translate install`) >On the contrary, lateorders.tt has some strings to translate ('Author:', >'Published by:', etc.). After being translated, all carriage returns >between TT tags are removed. > >Test plan: >1/ choose a language and update + translate the templates >for instance: > cd misc/translate; > ./translate update es-ES; ./translate install es-ES >2/ Go to acqui/lateorders.pl using this language >3/ Generate a csv for 1+ late orders and confirm the first line only >contains the headers. >--- > acqui/lateorders-export.pl | 4 +++- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt | 4 ++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/acqui/lateorders-export.pl b/acqui/lateorders-export.pl >index 96a1824..2028eda 100755 >--- a/acqui/lateorders-export.pl >+++ b/acqui/lateorders-export.pl >@@ -62,4 +62,6 @@ print $input->header( > -attachment => 'lateorders.csv', > ); > $template->param( orders => \@orders ); >-print $template->output; >+for my $line ( split '\n', $template->output ) { >+ print "$line\n" unless $line =~ m|^\s*$|; >+} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt >index 34d9db0..2e24b67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt >@@ -1,5 +1,5 @@ > [% USE KohaDates %][% INCLUDE csv_headers/acqui/lateorders.tt %] >-[% FOREACH o IN orders %]"[% o.orderdate %] ([% o.latesince %] days)","[% o.estimateddeliverydate | $KohaDates %]","[% o.supplier (o.supplierid) %]","[% o.title %] [% IF o.author %]Author: [% o.author %].[% END %][% IF o.publisher %]Published by: [% o.publisher %].[% END %]","[% o.unitpricesupplier %] x [% o.quantity_to_receive %] = [% o.subtotal %] ([% o.budget %])","[% o.basketname %] ([% o.basketno %])","[% o.claims_count %]","[% o.claimed_date %]" >+[% FOREACH o IN orders %][% INCLUDE 'empty_line.inc' %]"[% o.orderdate %] ([% o.latesince %] days)","[% o.estimateddeliverydate | $KohaDates %]","[% o.supplier (o.supplierid) %]","[% o.title %] [% IF o.author %]Author: [% o.author %].[% END %][% IF o.publisher %]Published by: [% o.publisher %].[% END %]","[% o.unitpricesupplier %] x [% o.quantity_to_receive %] = [% o.subtotal %] ([% o.budget %])","[% o.basketname %] ([% o.basketno %])","[% o.claims_count %]","[% o.claimed_date %]" > [% END %] >- >+[% INCLUDE 'empty_line.inc' %] > ,,Total orders in late, [% orders.size %] >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14264
:
39464
|
40177
|
45046