Bugzilla – Attachment 168194 Details for
Bug 36815
Add the option to 'Reset to default' in the notices editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36815: (follow-up) Use correct language for default
Bug-36815-follow-up-Use-correct-language-for-defau.patch (text/plain), 1.31 KB, created by
Martin Renvoize (ashimema)
on 2024-06-27 10:35:32 UTC
(
hide
)
Description:
Bug 36815: (follow-up) Use correct language for default
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-27 10:35:32 UTC
Size:
1.31 KB
patch
obsolete
>From a8bda0e2cdd088d874e8d061277af2eb51bde180 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 27 Jun 2024 11:25:26 +0100 >Subject: [PATCH] Bug 36815: (follow-up) Use correct language for default > >When 'default' language is set, we need to use the default as defined by >the OPACLanguages system preference. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Notice/Template.pm | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/Koha/Notice/Template.pm b/Koha/Notice/Template.pm >index 2377a84aecc..8d0184e7513 100644 >--- a/Koha/Notice/Template.pm >+++ b/Koha/Notice/Template.pm >@@ -41,8 +41,16 @@ Returns the default notice template content. > =cut > > sub get_default { >- my $self = shift; >- my $lang = $self->lang; >+ my $self = shift; >+ my $lang = $self->lang; >+ if ( $lang eq 'default' ) { >+ my $translated_languages = C4::Languages::getTranslatedLanguages( >+ 'opac', >+ C4::Context->preference('template') >+ ); >+ $lang = @{ @{$translated_languages}[0]->{sublanguages_loop} }[0]->{rfc4646_subtag}; >+ } >+ > my $defaulted_to_en = 0; > > my $file = C4::Context->config('intranetdir') . "/installer/data/mysql/$lang/mandatory/sample_notices.yml"; >-- >2.45.2
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 36815
:
166429
|
166430
|
166449
|
166450
|
166475
|
166476
|
166535
|
166678
|
166679
|
166680
|
166684
|
166685
|
166686
|
166689
|
166693
|
166694
|
166695
|
166696
|
166763
|
166764
|
166765
|
166766
|
168190
|
168191
|
168192
|
168193
| 168194