From 558f9d4252778e8e9f6455894cd7bbc23c0ee6ee 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=EF=BF=BD=EF=BF=BDd=EF=BF=BD=EF=BF=BDric=20Buclin=20=20r=3Dbkor=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webtools/bugzilla/Bugzilla.pm | 14 +++-- webtools/bugzilla/Bugzilla/Bug.pm | 46 +++++++++------ webtools/bugzilla/Bugzilla/BugMail.pm | 56 ++++++++++++++----- webtools/bugzilla/Bugzilla/Install.pm | 8 ++- webtools/bugzilla/Bugzilla/Template.pm | 16 +++--- webtools/bugzilla/Bugzilla/User/Setting.pm | 21 +++++-- webtools/bugzilla/editparams.cgi | 14 +++++ .../en/default/global/setting-descs.none.tmpl | 1 + 8 files changed, 128 insertions(+), 48 deletions(-) diff --git a/webtools/bugzilla/Bugzilla.pm b/webtools/bugzilla/Bugzilla.pm index 32f731859cd..f278adb2e93 100644 --- a/webtools/bugzilla/Bugzilla.pm +++ b/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