Permalink
Browse files

Item14266: Don't check LANGUAGE name

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 aed1dc434a850fbbc1fdac60125f23055828cdd4
Showing with 7 additions and 5 deletions.
  1. +7 −5 core/lib/Foswiki/Configure/Checkers/LANGUAGE.pm
@@ -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."
- );
+ );
+ }
}
}

0 comments on commit aed1dc4

Please sign in to comment.