Bugzilla – Attachment 81155 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: Do not use nl_putenv, use $ENV instead
Bug-15395-Do-not-use-nlputenv-use-ENV-instead.patch (text/plain), 1.41 KB, created by
Julian Maurice
on 2018-10-25 13:23:29 UTC
(
hide
)
Description:
Bug 15395: Do not use nl_putenv, use $ENV instead
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-10-25 13:23:29 UTC
Size:
1.41 KB
patch
obsolete
>From 0934f32837c537c44d9c1526138a8316011147a4 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 25 Oct 2018 11:22:24 +0200 >Subject: [PATCH] Bug 15395: Do not use nl_putenv, use $ENV instead > >nl_putenv is only useful on Windows systems >--- > Koha/I18N.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Koha/I18N.pm b/Koha/I18N.pm >index 44c47132ff..2152654d5a 100644 >--- a/Koha/I18N.pm >+++ b/Koha/I18N.pm >@@ -24,7 +24,7 @@ use C4::Languages; > use C4::Context; > > use Encode; >-use Locale::Messages qw(:locale_h nl_putenv setlocale LC_MESSAGES); >+use Locale::Messages qw(:locale_h setlocale LC_MESSAGES); > use Koha::Cache::Memory::Lite; > > use parent 'Exporter'; >@@ -54,7 +54,7 @@ sub init { > if (@system_locales) { > # LANG needs to be set to a valid locale, > # otherwise LANGUAGE is ignored >- nl_putenv('LANG=' . $system_locales[0]); >+ $ENV{LANG} = $system_locales[0]; > setlocale(LC_MESSAGES, ''); > > my $langtag = C4::Languages::getlanguage; >@@ -68,8 +68,8 @@ sub init { > $locale .= '_' . $region; > } > >- nl_putenv("LANGUAGE=$locale"); >- nl_putenv('OUTPUT_CHARSET=UTF-8'); >+ $ENV{LANGUAGE} = $locale; >+ $ENV{OUTPUT_CHARSET} = 'UTF-8'; > > my $directory = _base_directory(); > textdomain($textdomain); >-- >2.17.1
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