diff options
Diffstat (limited to 'scripts/sync-locales.php')
-rwxr-xr-x | scripts/sync-locales.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/sync-locales.php b/scripts/sync-locales.php index 00d6c897..472a6b2b 100755 --- a/scripts/sync-locales.php +++ b/scripts/sync-locales.php @@ -2,7 +2,7 @@ <?php $reference_lang = 'fr_FR'; -$reference_file = 'app/Locales/'.$reference_lang.'/translations.php'; +$reference_file = 'app/Locale/'.$reference_lang.'/translations.php'; $reference = include $reference_file; @@ -15,7 +15,7 @@ function update_missing_locales(array $reference, $outdated_file) foreach ($reference as $key => $value) { - if (isset($outdated[$key])) { + if (! empty($outdated[$key])) { //$output .= " '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $value)."',\n"; $output .= " '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $outdated[$key])."',\n"; } @@ -30,11 +30,11 @@ function update_missing_locales(array $reference, $outdated_file) } -foreach (new DirectoryIterator('app/Locales') as $fileInfo) { +foreach (new DirectoryIterator('app/Locale') as $fileInfo) { if (! $fileInfo->isDot() && $fileInfo->isDir() && $fileInfo->getFilename() !== $reference_lang) { - $filename = 'app/Locales/'.$fileInfo->getFilename().'/translations.php'; + $filename = 'app/Locale/'.$fileInfo->getFilename().'/translations.php'; echo $fileInfo->getFilename().' ('.$filename.')'.PHP_EOL; |