Make cli locale commands working outside of source tree

This commit is contained in:
Frédéric Guillot
2018-05-09 14:21:43 -07:00
parent f413ab20dd
commit fea684279c
2 changed files with 5 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ class LocaleComparatorCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$strings = array();
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('app'));
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(APP_DIR));
$it->rewind();
while ($it->valid()) {
@@ -44,7 +44,7 @@ class LocaleComparatorCommand extends BaseCommand
public function compare(array $strings)
{
$reference_file = 'app/Locale/'.self::REF_LOCALE.'/translations.php';
$reference_file = APP_DIR.DIRECTORY_SEPARATOR.'Locale'.DIRECTORY_SEPARATOR.self::REF_LOCALE.DIRECTORY_SEPARATOR.'translations.php';
$reference = include $reference_file;
echo str_repeat('#', 70).PHP_EOL;