Bugzilla – Attachment 36769 Details for
Bug 13748
Acquisition wizard: some strings not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13748: Acquisition wizard: some strings not translatable
Bug-13748-Acquisition-wizard-some-strings-not-tran.patch (text/plain), 8.83 KB, created by
Bernardo Gonzalez Kriegel
on 2015-03-10 15:10:25 UTC
(
hide
)
Description:
Bug 13748: Acquisition wizard: some strings not translatable
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-03-10 15:10:25 UTC
Size:
8.83 KB
patch
obsolete
>From f599d0a7e76b3645194e9b7caacf081a5d4c20dc Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Tue, 10 Mar 2015 11:28:39 -0300 >Subject: [PATCH] Bug 13748: Acquisition wizard: some strings not translatable > >This patch removes all instances of CGI::scrolling_list from >reports/acquisitions_stats.pl, which prevented proper translation > >To test: >1) Install and enable a language (es-ES or de-DE are good choices) >2) On Acquisitons wizard, some pulldown labels are not translated >3) Apply the patch >4) Update and install again the language >5) Check labels are translated and all pulldown works > >This does not solve the 'Collection code' problem, >is more strange >--- > .../prog/en/modules/reports/acquisitions_stats.tt | 40 +++++++- > reports/acquisitions_stats.pl | 105 +++++++------------- > 2 files changed, 71 insertions(+), 74 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >index 512f8c1..2d80961 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >@@ -220,14 +220,28 @@ > <td>Item type</td> > <td><input type="radio" name="Line" value="biblioitems.itemtype" /></td> > <td><input type="radio" name="Column" value="biblioitems.itemtype" /></td> >- <td>[% CGIItemType %]</td> >+ <td> >+ <select name="Filter" size="1" id="itemtypes"> >+ <option value="">All item types</option> >+ [% FOREACH value IN ItemTypes.values %] >+ <option value="[% value %]">[% ItemTypes.labels.$value %]</option> >+ [% END %] >+ </select> >+ </td> > </tr> > > <tr> > <td>Fund</td> > <td><input type="radio" name="Line" value="aqbudgets.budget_code" /></td> > <td><input type="radio" name="Column" value="aqbudgets.budget_code" /></td> >- <td>[% CGIBudget %]</td> >+ <td> >+ <select name="Filter" size="1" id="budget"> >+ <option value="">All funds</option> >+ [% FOREACH value IN Budgets.values %] >+ <option value="[% value %]">[% Budgets.labels.$value %]</option> >+ [% END %] >+ </select> >+ </td> > </tr> > > [% IF ( hassort1 ) %] >@@ -235,7 +249,14 @@ > <td>Sort1</td> > <td><input type="radio" name="Line" value="aqorders.sort1" /></td> > <td><input type="radio" name="Column" value="aqorders.sort1" /></td> >- <td>[% CGISort1 %] </td> >+ <td> >+ <select name="Filter" size="1" id="sort1"> >+ <option value="">All</option> >+ [% FOREACH value IN Sort1.values %] >+ <option value="[% value %]">[% Sort1.labels.$value %]</option> >+ [% END %] >+ </select> >+ </td> > </tr> > [% END %] > [% IF ( hassort2 ) %] >@@ -243,7 +264,14 @@ > <td>Sort2</td> > <td><input type="radio" name="Line" value="aqorders.sort2" /></td> > <td><input type="radio" name="Column" value="aqorders.sort2" /></td> >- <td>[% CGISort2 %] </td> >+ <td> >+ <select name="Filter" size="1" id="sort2"> >+ <option value="">All</option> >+ [% FOREACH value IN Sort2.values %] >+ <option value="[% value %]">[% Sort2.labels.$value %]</option> >+ [% END %] >+ </select> >+ </td> > </tr> > [% END %] > </tbody> >@@ -281,7 +309,9 @@ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label> <input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application</label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ <option value="CSV">CSV</option> >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl >index fd30926..99a4aa3 100755 >--- a/reports/acquisitions_stats.pl >+++ b/reports/acquisitions_stats.pl >@@ -122,78 +122,58 @@ else { > > $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); > $req->execute; >- my @select; >- my %select; >- push @select, ""; >- $select{''} = "All item types"; >+ my @iselect; >+ my %iselect; > while ( my ( $value, $desc ) = $req->fetchrow ) { >- push @select, $value; >- $select{$value} = $desc; >+ push @iselect, $value; >+ $iselect{$value} = $desc; > } >- my $CGIItemTypes = CGI::scrolling_list( >- -name => 'Filter', >- -id => 'itemtypes', >- -values => \@select, >- -labels => \%select, >- -size => 1, >- -multiple => 0 >- ); >+ my $ItemTypes = { >+ values => \@iselect, >+ labels => \%iselect, >+ }; > > $req = $dbh->prepare("SELECT DISTINCTROW budget_code, budget_name FROM aqbudgets ORDER BY budget_name"); > $req->execute; >- undef @select; >- undef %select; >- push @select, ""; >- $select{''} = "All funds"; >+ my @bselect; >+ my %bselect; > > while ( my ( $value, $desc ) = $req->fetchrow ) { >- push @select, $value; >- $select{$value} = $desc; >+ push @bselect, $value; >+ $bselect{$value} = $desc; > } >- my $CGIBudget = CGI::scrolling_list( >- -name => 'Filter', >- -id => 'budget', >- -values => \@select, >- -labels => \%select, >- -size => 1, >- -multiple => 0 >- ); >+ my $Budgets = { >+ values => \@bselect, >+ labels => \%bselect, >+ }; > > $req = > $dbh->prepare( > "SELECT DISTINCTROW sort1 FROM aqorders WHERE sort1 IS NOT NULL ORDER BY sort1" > ); > $req->execute; >- undef @select; >- undef %select; >- push @select, ""; >- $select{''} = "All"; >+ my @s1select; >+ my %s1select; > my $hassort1; > while ( my ($value) = $req->fetchrow ) { > if ($value) { > $hassort1 = 1; >- push @select, $value; >- $select{$value} = $value; >+ push @s1select, $value; >+ $s1select{$value} = $value; > } > } >- my $CGISort1 = CGI::scrolling_list( >- -name => 'Filter', >- -id => 'sort1', >- -values => \@select, >- -labels => \%select, >- -size => 1, >- -multiple => 0 >- ); >+ my $Sort1 = { >+ values => \@s1select, >+ labels => \%s1select, >+ }; > > $req = > $dbh->prepare( > "SELECT DISTINCTROW sort2 FROM aqorders WHERE sort2 IS NOT NULL ORDER BY sort2" > ); > $req->execute; >- undef @select; >- undef %select; >- push @select, ""; >- $select{''} = "All"; >+ my @s2select; >+ my %s2select; > my $hassort2; > my $hglghtsort2; > >@@ -201,26 +181,14 @@ else { > if ($value) { > $hassort2 = 1; > $hglghtsort2 = !($hassort1); >- push @select, $value; >- $select{$value} = $value; >+ push @s2select, $value; >+ $s2select{$value} = $value; > } > } >- my $CGISort2 = CGI::scrolling_list( >- -name => 'Filter', >- -id => 'sort2', >- -values => \@select, >- -labels => \%select, >- -size => 1, >- -multiple => 0 >- ); >- >- my $CGIextChoice = CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 >- ); >+ my $Sort2 = { >+ values => \@s2select, >+ labels => \%s2select, >+ }; > > my $CGIsepChoice = GetDelimiterChoices; > >@@ -240,13 +208,12 @@ else { > > $template->param( > booksellers => $booksellers, >- CGIItemType => $CGIItemTypes, >- CGIBudget => $CGIBudget, >+ ItemTypes => $ItemTypes, >+ Budgets => $Budgets, > hassort1 => $hassort1, > hassort2 => $hassort2, >- CGISort1 => $CGISort1, >- CGISort2 => $CGISort2, >- CGIextChoice => $CGIextChoice, >+ Sort1 => $Sort1, >+ Sort2 => $Sort2, > CGIsepChoice => $CGIsepChoice, > branches => \@branches, > ccode_label => $ccode_label, >-- >1.7.9.5
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 13748
:
36768
|
36769
|
36775
|
36904