Skip to content

Commit

Permalink
Adjustments as per comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Jun 24, 2015
1 parent a13d06c commit dce3f1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/Shell/I18nShell.php
Expand Up @@ -102,12 +102,8 @@ public function init($language = null) {
$filename = $fileinfo->getFilename();
$newFilename = $fileinfo->getBasename('.pot');
$newFilename = $newFilename . '.po';
if (!$this->param('force') && is_file($targetFolder . $newFilename)) {
$this->err('File ' . $newFilename . ' exists, skipping. Use --force or -f to force overwriting');
continue;
}

copy($sourceFolder . $filename, $targetFolder . $newFilename);
$this->createFile($targetFolder . $newFilename, file_get_contents($sourceFolder . $filename));
$count++;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/I18nShellTest.php
Expand Up @@ -78,7 +78,7 @@ public function testInit()
$this->shell->params['verbose'] = true;
$this->shell->init();

$this->assertTrue(file_exists($deDir . 'default.po'));
$this->assertTrue(file_exists($deDir . 'cake.po'));
$this->assertFileExists($deDir . 'default.po');
$this->assertFileExists($deDir . 'cake.po');
}
}

0 comments on commit dce3f1f

Please sign in to comment.