Commit aa4d886b authored by sikeda's avatar sikeda
Browse files

[bug] [Submitted by X. Bachelot] Older version of Locale::Messages is...

[bug] [Submitted by X. Bachelot] Older version of Locale::Messages is available on several distributions (e.g. RHEL/CentOS 6/7), while Sympa requires 1.22 or later.  The patch tests the Locale::Message version and falls back to gettext_pp if the version is too old.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12831 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent dc3b3492
......@@ -28,7 +28,7 @@ use strict;
use warnings;
use base qw(Class::Singleton);
use Locale::Messages '1.22'; # virtually same as 1.23.
use Locale::Messages;
use POSIX qw();
use Sympa::Constants;
......@@ -39,7 +39,11 @@ BEGIN {
## map ll_RR with ll.
## libintl-perl 1.23 or later is required to use 'gettext_dumb' package
## which is independent from POSIX locale.
Locale::Messages->select_package('gettext_dumb');
if ( $Locale::Messages::VERSION >= 1.22 ) {
Locale::Messages->select_package('gettext_dumb');
} else {
Locale::Messages->select_package('gettext_pp');
}
## Workaround: Prevent from searching catalogs in /usr/share/locale.
undef $Locale::gettext_pp::__gettext_pp_default_dir;
......
......@@ -243,7 +243,7 @@ our %cpan_modules = (
'gettext_id' => 'set of various subroutines to handle scalar',
},
'Locale::Messages' => {
required_version => '1.22',
required_version => '1.20',
package_name => 'libintl-perl',
mandatory => 1,
'gettext_id' => 'internationalization functions',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment