Browse Source

Adjust the params.

Mark Scherer 10 years ago
parent
commit
a13d06c45d
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/Shell/I18nShell.php

+ 3 - 4
src/Shell/I18nShell.php

@@ -81,10 +81,9 @@ class I18nShell extends Shell
         }
 
         $this->_paths = [APP];
-        if (!empty($this->params['plugin'])) {
-            $plugin = Inflector::camelize($this->params['plugin']);
+        if ($this->param('plugin')) {
+            $plugin = Inflector::camelize($this->param('plugin'));
             $this->_paths = [Plugin::classPath($plugin)];
-            $this->params['plugin'] = $plugin;
         }
 
         $response = $this->in('What folder?', null, rtrim($this->_paths[0], DS) . DS . 'Locale');
@@ -103,7 +102,7 @@ class I18nShell extends Shell
             $filename = $fileinfo->getFilename();
             $newFilename = $fileinfo->getBasename('.pot');
             $newFilename = $newFilename . '.po';
-            if (empty($this->params['force']) && is_file($targetFolder . $newFilename)) {
+            if (!$this->param('force') && is_file($targetFolder . $newFilename)) {
                 $this->err('File ' . $newFilename . ' exists, skipping. Use --force or -f to force overwriting');
                 continue;
             }