Bugzilla – Attachment 44089 Details for
Bug 14100
Add base to make item types, branch names, sysprefs values and authorised values translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14100: Fix some missing occurrences
Bug-14100-Fix-some-missing-occurrences.patch (text/plain), 6.02 KB, created by
Jonathan Druart
on 2015-10-27 15:19:01 UTC
(
hide
)
Description:
Bug 14100: Fix some missing occurrences
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-27 15:19:01 UTC
Size:
6.02 KB
patch
obsolete
>From 5530c76a2c6e353e2dc364d835e7906bed587c1e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 14 Oct 2015 09:38:05 +0100 >Subject: [PATCH] Bug 14100: Fix some missing occurrences > >This patch fixes: >- reports/bor_issues_top.pl >- sort order >- adv search and search results >- opac-topissues.pl > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Search.pm | 6 +++--- > catalogue/search.pl | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc | 2 +- > opac/opac-search.pl | 4 ++-- > opac/opac-topissues.pl | 1 + > reports/bor_issues_top.pl | 2 +- > 6 files changed, 9 insertions(+), 8 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 31e2484..5c11862 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -570,7 +570,7 @@ sub getRecords { > { > $facet_label_value = > $itemtypes->{$one_facet} >- ->{'description'}; >+ ->{translated_description}; > } > } > >@@ -1948,7 +1948,7 @@ sub searchResults { > > # edition information, if any > $oldbiblio->{edition} = $oldbiblio->{editionstatement}; >- $oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description}; >+ $oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{translated_description}; > # Build summary if there is one (the summary is defined in the itemtypes table) > # FIXME: is this used anywhere, I think it can be commented out? -- JF > if ( $itemtypes{ $oldbiblio->{itemtype} }->{summary} ) { >@@ -2060,7 +2060,7 @@ sub searchResults { > foreach my $code ( keys %subfieldstosearch ) { > $item->{$code} = $field->subfield( $subfieldstosearch{$code} ); > } >- $item->{description} = $itemtypes{ $item->{itype} }{description}; >+ $item->{description} = $itemtypes{ $item->{itype} }{translated_description}; > > # OPAC hidden items > if ($is_opac) { >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 0bd2cc6..c3ec804 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -262,7 +262,7 @@ foreach my $advanced_srch_type (@advanced_search_types) { > if ($advanced_srch_type eq 'itemtypes') { > # itemtype is a special case, since it's not defined in authorized values > my @itypesloop; >- foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { >+ foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes ) { > my %row =( number=>$cnt++, > ccl => "$itype_or_itemtype,phr", > code => $thisitemtype, >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc >index 0a211d5..7324e08 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc >@@ -41,7 +41,7 @@ > [% ELSE %] > <option value="[% itemtype.itemtype %]"> > [% END %] >- [% itemtype.description %] >+ [% itemtype.translated_description %] > </option> > [% END %] > </select> >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 7d21354..896a799 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -236,13 +236,13 @@ foreach my $advanced_srch_type (@advanced_search_types) { > if ($advanced_srch_type eq 'itemtypes') { > # itemtype is a special case, since it's not defined in authorized values > my @itypesloop; >- foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { >+ foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes ) { > next if $hidingrules->{itype} && any { $_ eq $thisitemtype } @{$hidingrules->{itype}}; > next if $hidingrules->{itemtype} && any { $_ eq $thisitemtype } @{$hidingrules->{itemtype}}; > my %row =( number=>$cnt++, > ccl => "$itype_or_itemtype,phr", > code => $thisitemtype, >- description => $itemtypes->{$thisitemtype}->{'description'}, >+ description => $itemtypes->{$thisitemtype}->{translated_description}, > imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), > cat => $itemtypes->{$thisitemtype}->{'iscat'}, > hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'}, >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index 8e4e6db..ac240df 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -25,6 +25,7 @@ use warnings; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Context; >+use C4::Languages; > use C4::Search; > use C4::Output; > use C4::Koha; >diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl >index eb5482d..485095e 100755 >--- a/reports/bor_issues_top.pl >+++ b/reports/bor_issues_top.pl >@@ -125,7 +125,7 @@ my $itemtypes = GetItemTypes; > my @itemtypeloop; > foreach (sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description}} keys %$itemtypes) { > my %row = (value => $_, >- description => $itemtypes->{$_}->{translated_description}, >+ translated_description => $itemtypes->{$_}->{translated_description}, > ); > push @itemtypeloop, \%row; > } >-- >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 14100
:
38727
|
40917
|
40965
|
41654
|
41659
|
41660
|
42525
|
42526
|
43110
|
43111
|
43365
|
43366
|
43367
|
43368
|
43369
|
43370
|
43394
|
43395
|
43396
|
43577
|
43602
|
43603
|
43604
|
43605
|
43606
|
43613
|
44085
|
44086
|
44087
|
44088
| 44089 |
44090
|
44094
|
44108
|
44109
|
44119
|
44151