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.
Signed-off-by: Laurence Lefaucheur <laurence.lefaucheur@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2706884a1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9fa3b18924)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
This commit is contained in:
parent
6edc09cfef
commit
bf9994fb34
|
|
@ -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*$|;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue