Bugzilla – Attachment 93903 Details for
Bug 23765
After TranslateNotices is set to 'Don't allow', email settings still show multiple languages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23765: After TranslateNotices is set to 'Don't allow', email settings still show multiple languages
Bug-23765-After-TranslateNotices-is-set-to-Dont-al.patch (text/plain), 1.92 KB, created by
Katrin Fischer
on 2019-10-08 20:41:14 UTC
(
hide
)
Description:
Bug 23765: After TranslateNotices is set to 'Don't allow', email settings still show multiple languages
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-10-08 20:41:14 UTC
Size:
1.92 KB
patch
obsolete
>From 73953245ed8615415ec216e12739ea4cc44fdf3e Mon Sep 17 00:00:00 2001 >From: Bin Wen <bin.wen@inlibro.com> >Date: Tue, 8 Oct 2019 11:46:58 -0400 >Subject: [PATCH] Bug 23765: After TranslateNotices is set to 'Don't allow', > email settings still show multiple languages > >To test: >1. Enable multi-languages >2. Set the preference 'TranslateNotices' on 'Allow' >3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. >4. Set the preference TranslateNotices on 'Don't allow'. >5. Go to: tools==>Notices & slips==>Edit ,the template still shows all the languages. >6. Apply the patch. >7. Repeat the steps 4 and 5 >8. Success. It only shows the default template when TranslateNotices is 'Dont allow'. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > tools/letter.pl | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/tools/letter.pl b/tools/letter.pl >index a673fa96a9..a7ae9c93a1 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -205,12 +205,17 @@ sub add_form { > > my $lang = $letter->{lang}; > my $mtt = $letter->{message_transport_type}; >- $letters{ $lang }{templates}{$mtt} = { >- message_transport_type => $letter->{message_transport_type}, >- is_html => $letter->{is_html}, >- title => $letter->{title}, >- content => $letter->{content} // '', >- }; >+ if( $lang ne 'default' && !C4::Context->preference('TranslateNotices')) { >+ next; >+ } >+ else { >+ $letters{ $lang }{templates}{$mtt} = { >+ message_transport_type => $letter->{message_transport_type}, >+ is_html => $letter->{is_html}, >+ title => $letter->{title}, >+ content => $letter->{content} // '', >+ }; >+ } > } > } > else { >-- >2.11.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 23765
:
93887
|
93903
|
95136
|
95306
|
95375