From ff7189971e6685118f41e3567cefae7c333202de Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 21 Jun 2015 12:35:01 -0400 Subject: Move the script sync-locales.php to cli command --- scripts/sync-locales.php | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 scripts/sync-locales.php (limited to 'scripts') diff --git a/scripts/sync-locales.php b/scripts/sync-locales.php deleted file mode 100755 index 472a6b2b..00000000 --- a/scripts/sync-locales.php +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env php - $value) { - - if (! empty($outdated[$key])) { - //$output .= " '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $value)."',\n"; - $output .= " '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $outdated[$key])."',\n"; - } - else { - //$output .= " // '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $value)."',\n"; - $output .= " // '".str_replace("'", "\'", $key)."' => '',\n"; - } - } - - $output .= ");\n"; - return $output; -} - - -foreach (new DirectoryIterator('app/Locale') as $fileInfo) { - - if (! $fileInfo->isDot() && $fileInfo->isDir() && $fileInfo->getFilename() !== $reference_lang) { - - $filename = 'app/Locale/'.$fileInfo->getFilename().'/translations.php'; - - echo $fileInfo->getFilename().' ('.$filename.')'.PHP_EOL; - - file_put_contents($filename, update_missing_locales($reference, $filename)); - } -} -- cgit v1.2.3