diff --git a/scripts/compile-font-repo.php b/scripts/compile-font-repo.php index 1c4fcf11..03b467c0 100644 --- a/scripts/compile-font-repo.php +++ b/scripts/compile-font-repo.php @@ -6,6 +6,11 @@ * @file */ +namespace UniversalLanguageSelector; + +use FormatJson; +use Maintenance; + // Standard boilerplate to define $IP if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { $IP = getenv( 'MW_INSTALL_PATH' ); @@ -46,5 +51,5 @@ JAVASCRIPT; } } -$maintClass = 'CompileFontRepo'; +$maintClass = 'UniversalLanguageSelector\CompileFontRepo'; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/scripts/generate-font-test-page.php b/scripts/generate-font-test-page.php index 5f851969..bae28b59 100644 --- a/scripts/generate-font-test-page.php +++ b/scripts/generate-font-test-page.php @@ -6,6 +6,12 @@ * @file */ +namespace UniversalLanguageSelector; + +use FormatJson; +use Html; +use Maintenance; + // Standard boilerplate to define $IP if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { $IP = getenv( 'MW_INSTALL_PATH' ); @@ -35,6 +41,9 @@ class GenerateFontTestPage extends Maintenance { $body = ''; foreach ( $list['languages'] as $code => $fonts ) { + if ( !isset( $corpus[$code] ) ) { + continue; + } foreach ( $fonts as $fontname ) { if ( $fontname === 'system' ) { continue; @@ -93,5 +102,5 @@ HTML; } } -$maintClass = 'GenerateFontTestPage'; +$maintClass = 'UniversalLanguageSelector\GenerateFontTestPage'; require_once RUN_MAINTENANCE_IF_MAIN;