Bugzilla – Attachment 65894 Details for
Bug 15395
Internationalization: plural forms, context, and more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15395: Remove the use of Locale::Util's set_locale
Bug-15395-Remove-the-use-of-LocaleUtils-setlocale.patch (text/plain), 1.62 KB, created by
Julian Maurice
on 2017-08-11 10:44:27 UTC
(
hide
)
Description:
Bug 15395: Remove the use of Locale::Util's set_locale
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-08-11 10:44:27 UTC
Size:
1.62 KB
patch
obsolete
>From f843b3be109f37efae816905aa2118ccc92897f8 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 11 Aug 2017 12:43:33 +0200 >Subject: [PATCH] Bug 15395: Remove the use of Locale::Util's set_locale > >--- > Koha/I18N.pm | 21 ++++++++------------- > 1 file changed, 8 insertions(+), 13 deletions(-) > >diff --git a/Koha/I18N.pm b/Koha/I18N.pm >index 236454cc0e..95c82ff4f4 100644 >--- a/Koha/I18N.pm >+++ b/Koha/I18N.pm >@@ -24,8 +24,7 @@ use C4::Languages; > use C4::Context; > > use Encode; >-use Locale::Util qw(set_locale); >-use Locale::Messages qw(:locale_h :libintl_h nl_putenv); >+use Locale::Messages qw(:locale_h nl_putenv); > use Koha::Cache::Memory::Lite; > > use parent 'Exporter'; >@@ -57,18 +56,14 @@ sub init { > if ($region && length $region == 4) { > $region = $subtags[2]; > } >- my $locale = set_locale(LC_ALL, $language, $region, 'utf-8'); >- unless ($locale) { >- set_locale(LC_MESSAGES, ''); >- Locale::Messages->select_package('gettext_pp'); >- $locale = $language; >- if ($region) { >- $locale .= '_' . $region; >- } >- nl_putenv("LANGUAGE=$locale"); >- nl_putenv("LANG=$locale"); >- nl_putenv('OUTPUT_CHARSET=utf-8'); >+ Locale::Messages->select_package('gettext_pp'); >+ my $locale = $language; >+ if ($region) { >+ $locale .= '_' . $region; > } >+ nl_putenv("LANGUAGE=$locale"); >+ nl_putenv("LANG=$locale"); >+ nl_putenv('OUTPUT_CHARSET=utf-8'); > > my $directory = _base_directory(); > textdomain($textdomain); >-- >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 15395
:
45797
|
45798
|
45799
|
46337
|
50023
|
50024
|
50025
|
50026
|
61873
|
61874
|
61875
|
61876
|
61934
|
61935
|
61977
|
62008
|
62041
|
62326
|
62327
|
62328
|
62329
|
62330
|
62331
|
62332
|
62333
|
62335
|
62709
|
65894
|
70974
|
70975
|
70976
|
71940
|
71941
|
71942
|
71943
|
71944
|
71945
|
71946
|
71947
|
71948
|
71949
|
71950
|
71951
|
71952
|
73901
|
73902
|
73903
|
73904
|
73905
|
73906
|
73907
|
73908
|
73909
|
73910
|
73911
|
73912
|
73913
|
76328
|
76329
|
76330
|
77475
|
77476
|
81152
|
81153
|
81154
|
81155
|
81156
|
81157
|
81158
|
81159
|
81167
|
81734
|
81735
|
81736
|
81737
|
81738
|
81739
|
81741
|
81742
|
81743