projects
/
koha-equinox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ee0c8f3
)
Bug 15395: Use POSIX::setlocale
author
Jonathan Druart
<jonathan.druart@bugs.koha-community.org>
Wed, 31 Oct 2018 14:02:56 +0000 (11:02 -0300)
committer
Nick Clemens
<nick@bywatersolutions.com>
Thu, 8 Nov 2018 16:40:05 +0000 (16:40 +0000)
To keep compatibility with jessie (that have Message::Locales 1.23, so
without setlocale)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/I18N.pm
patch
|
blob
|
history
diff --git
a/Koha/I18N.pm
b/Koha/I18N.pm
index
2152654
..
7206223
100644
(file)
--- a/
Koha/I18N.pm
+++ b/
Koha/I18N.pm
@@
-24,7
+24,8
@@
use C4::Languages;
use C4::Context;
use Encode;
-use Locale::Messages qw(:locale_h setlocale LC_MESSAGES);
+use Locale::Messages qw(:locale_h LC_MESSAGES);
+use POSIX qw( setlocale );
use Koha::Cache::Memory::Lite;
use parent 'Exporter';
@@
-55,7
+56,7
@@
sub init {
# LANG needs to be set to a valid locale,
# otherwise LANGUAGE is ignored
$ENV{LANG} = $system_locales[0];
- setlocale(LC_MESSAGES, '');
+ POSIX::setlocale(LC_MESSAGES, '');
my $langtag = C4::Languages::getlanguage;
my @subtags = split /-/, $langtag;