From 682be710f0b95a65e2aaf07e9bbbc50cac68ac4e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Mon, 11 Dec 2006 18:00:46 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20297186:=20Send=20emails=20in=20the=20reci?= =?UTF-8?q?pient's=20locale,=20not=20the=20current=20user's=20-=20Patch=20?= =?UTF-8?q?by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dbkor=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@216853 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla.pm | 14 +++-- mozilla/webtools/bugzilla/Bugzilla/Bug.pm | 46 +++++++++------ mozilla/webtools/bugzilla/Bugzilla/BugMail.pm | 56 ++++++++++++++----- mozilla/webtools/bugzilla/Bugzilla/Install.pm | 8 ++- .../webtools/bugzilla/Bugzilla/Template.pm | 16 +++--- .../bugzilla/Bugzilla/User/Setting.pm | 21 +++++-- mozilla/webtools/bugzilla/editparams.cgi | 14 +++++ .../en/default/global/setting-descs.none.tmpl | 1 + 8 files changed, 128 insertions(+), 48 deletions(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla.pm b/mozilla/webtools/bugzilla/Bugzilla.pm index 32f731859cd..f278adb2e93 100644 --- a/mozilla/webtools/bugzilla/Bugzilla.pm +++ b/mozilla/webtools/bugzilla/Bugzilla.pm @@ -146,14 +146,17 @@ init_page() if !$ENV{MOD_PERL}; sub template { my $class = shift; + request_cache()->{language} = ""; request_cache()->{template} ||= Bugzilla::Template->create(); return request_cache()->{template}; } sub template_inner { - my $class = shift; - $class->request_cache->{template_inner} ||= Bugzilla::Template->create(); - return $class->request_cache->{template_inner}; + my ($class, $lang) = @_; + $lang = defined($lang) ? $lang : (request_cache()->{language} || ""); + request_cache()->{language} = $lang; + request_cache()->{"template_inner_$lang"} ||= Bugzilla::Template->create(); + return request_cache()->{"template_inner_$lang"}; } sub cgi { @@ -497,7 +500,10 @@ The current C