Bugzilla – Attachment 5905 Details for
Bug 7038
Contextual help is always in English
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-7038-Contextual-help-is-always-in-English.patch (text/plain), 2.42 KB, created by
Frédéric Demians
on 2011-10-16 20:09:13 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-10-16 20:09:13 UTC
Size:
2.42 KB
patch
obsolete
>From ccc0084a186eeb1665e4f70eeb1a61f5078dfb9b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Sun, 16 Oct 2011 21:50:24 +0200 >Subject: [PATCH] Bug 7038 Contextual help is always in English > >When another language than English is selected in pro interface, the software >strings are in this language, but when clicking ?, on the top right of any >page, the contextual help page which pop-up is always in English. > >This patch fixes this bug and another side bug affecting editing contextual >help when not in English. help.pl script were in sync with the recently >patched/improved theme/language/template selection. >--- > edithelp.pl | 8 +++----- > help.pl | 12 +++--------- > 2 files changed, 6 insertions(+), 14 deletions(-) > >diff --git a/edithelp.pl b/edithelp.pl >index 32db062..0cabf69 100755 >--- a/edithelp.pl >+++ b/edithelp.pl >@@ -97,12 +97,10 @@ elsif ( $type eq 'modify' ) { > } else { > (-w $file) or $error = > "WARNING: You will not be able save, because your webserver cannot write to '$file'. Contact your admin about help file permissions."; >- open (INFILE, $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked >+ open (my $fh, '<', $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked > my $help = ''; >- while ( my $inp = <INFILE> ) { >- unless ( $inp =~ /INCLUDE/ ) { >- $help .= $inp; >- } >+ while ( <$fh> ) { >+ $help .= /\[% INCLUDE .* %\](.*)$/ ? $1 : $_; > } > close INFILE; > $template->param( 'help' => $help ); >diff --git a/help.pl b/help.pl >index 69e8ab8..18d27dd 100755 >--- a/help.pl >+++ b/help.pl >@@ -32,15 +32,9 @@ our $refer = $query->param('url'); > $refer = $query->referer() if !$refer || $refer eq 'undefined'; > > $refer =~ /koha\/(.*)\.pl/; >-my $from = "modules/help/$1.tt"; >- >-my $htdocs = C4::Context->config('intrahtdocs'); >-my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); >-unless ( -e "$htdocs/$theme/$lang/$from" ) { >- $from = "modules/help/nohelp.tt"; >- ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); >-} >-my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); >+my $from = "help/$1.tt"; >+ >+my $template = C4::Templates::gettemplate($from, 'intranet', $query); > $template->param( referer => $refer ); > > output_html_with_http_headers $query, "", $template->output; >-- >1.7.6.1 >
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 7038
:
5905
|
5906
|
5909