Bugzilla – Attachment 12997 Details for
Bug 8954
Languages list in advanced search always in english
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Bug 8954: Make languages list in advanced search translatable
0007-TraductionListeLangue.patch (text/plain), 3.26 KB, created by
Mathieu Saby
on 2012-10-22 14:58:04 UTC
(
hide
)
Description:
[PATCH] Bug 8954: Make languages list in advanced search translatable
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2012-10-22 14:58:04 UTC
Size:
3.26 KB
patch
obsolete
>From 362e987f112cba76c5ebe1c62299533f50a6bf1e Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Sun, 21 Oct 2012 22:44:21 +0200 >Subject: [PATCH] Bug 8954: Make languages list in advanced search translatable > >In opac-search.pl and search.pl, this patch moves the $lang variable from the end to the begining of the script, and use it as a parameter of getAllLanguages method. >To test, set your opac and staff interface in english and in other languages and check search.pl and opac-search.pl : >- If language names in your languages_description table are translated in the same language you use for your GUI, the language names in dropdown list will be translated in this language (+native name). >- If your GUI is in english, or in a language into whitch languages names are not translated in languages_description, the dropdown list will stay in english (+native name). > > >--- > catalogue/search.pl | 5 ++--- > opac/opac-search.pl | 5 ++--- > 2 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 8b1234b..d1a3ca2 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -158,7 +158,7 @@ use CGI qw('-no_undef_params'); > my $cgi = new CGI; > > my ($template,$borrowernumber,$cookie); >- >+my $lang = C4::Templates::getlanguage($cgi, 'intranet'); > # decide which template to use > my $template_name; > my $template_type; >@@ -334,7 +334,7 @@ if ( $template_type eq 'advsearch' ) { > search_boxes_loop => \@search_boxes_array); > > # load the language limits (for search) >- my $languages_limit_loop = getAllLanguages(); >+ my $languages_limit_loop = getAllLanguages($lang); > $template->param(search_languages_loop => $languages_limit_loop,); > > # Expanded search options in advanced search: >@@ -472,7 +472,6 @@ my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit > my @results; > > ## I. BUILD THE QUERY >-my $lang = C4::Templates::getlanguage($cgi, 'intranet'); > ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by,$scan,$lang); > > ## parse the query_cgi string and put it into a form suitable for <input>s >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 7677d86..73d2c53 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -71,7 +71,7 @@ BEGIN { > } > > my ($template,$borrowernumber,$cookie); >- >+my $lang = C4::Templates::getlanguage($cgi, 'opac'); > # decide which template to use > my $template_name; > my $template_type = 'basic'; >@@ -178,7 +178,7 @@ $template->param( > ); > > # load the language limits (for search) >-my $languages_limit_loop = getAllLanguages(); >+my $languages_limit_loop = getAllLanguages($lang); > $template->param(search_languages_loop => $languages_limit_loop,); > > # load the Type stuff >@@ -418,7 +418,6 @@ my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_ > my @results; > > ## I. BUILD THE QUERY >-my $lang = C4::Templates::getlanguage($cgi, 'opac'); > ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by, 0, $lang); > > sub _input_cgi_parse { >-- >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 8954
:
12997
|
13127
|
13332
|
13371
|
13502
|
13558
|
13860