Skip to content

Commit

Permalink
Item14266: Don't check LANGUAGE name
Browse files Browse the repository at this point in the history
if Internationalization has not yet been enabled.  This really should
never happen in a released foswiki.  Check was mainly needed for
trunk.foswiki.org.
  • Loading branch information
gac410 committed Jan 16, 2017
1 parent 4cbe297 commit aed1dc4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/lib/Foswiki/Configure/Checkers/LANGUAGE.pm
Expand Up @@ -40,12 +40,14 @@ sub check_current_value {
unless ( -r "$dir/$lang.po" );

# Code taken from Foswki::I18N
my $h = Foswiki::I18N->get_handle($lang);
my $name = eval { $h->maketext("_language_name") };
unless ($name) {
$reporter->ERROR(
if ( Foswiki::I18N->can('get_handle') ) {
my $h = Foswiki::I18N->get_handle($lang);
my $name = eval { $h->maketext("_language_name") };
unless ($name) {
$reporter->ERROR(
"Internal error: $lang is missing the '_language_name' from it's translation. Language will not be usable."
);
);
}
}
}

Expand Down

0 comments on commit aed1dc4

Please sign in to comment.