Browse Source

yiic => yii additional corrections

tags/2.0.0-beta
Alexander Kochetov 12 years ago
parent
commit
8b311ecbe7
  1. 2
      build/controllers/LocaleController.php
  2. 4
      yii/console/Application.php
  3. 4
      yii/console/Controller.php
  4. 2
      yii/console/Request.php
  5. 2
      yii/console/controllers/AssetController.php
  6. 14
      yii/console/controllers/HelpController.php
  7. 2
      yii/console/controllers/MessageController.php
  8. 40
      yii/console/controllers/MigrateController.php
  9. 4
      yii/db/Migration.php
  10. 280
      yii/i18n/data/plurals.php

2
build/controllers/LocaleController.php

@ -93,7 +93,7 @@ class LocaleController extends Controller
/**
* Plural rules.
*
* This file is automatically generated by the "yiic locale/plural" command under the "build" folder.
* This file is automatically generated by the "yii locale/plural" command under the "build" folder.
* Do not modify it directly.
*
* The original plural rule data used for generating this file has the following copyright terms:

4
yii/console/Application.php

@ -30,7 +30,7 @@ use yii\base\InvalidRouteException;
* To run the console application, enter the following on the command line:
*
* ~~~
* yiic <route> [--param1=value1 --param2 ...]
* yii <route> [--param1=value1 --param2 ...]
* ~~~
*
* where `<route>` refers to a controller route in the form of `ModuleID/ControllerID/ActionID`
@ -42,7 +42,7 @@ use yii\base\InvalidRouteException;
* To use this command, simply type:
*
* ~~~
* yiic help
* yii help
* ~~~
*
* @author Qiang Xue <qiang.xue@gmail.com>

4
yii/console/Controller.php

@ -18,10 +18,10 @@ use yii\helpers\Console;
*
* A controller consists of one or several actions known as sub-commands.
* Users call a console command by specifying the corresponding route which identifies a controller action.
* The `yiic` program is used when calling a console command, like the following:
* The `yii` program is used when calling a console command, like the following:
*
* ~~~
* yiic <route> [--param1=value1 --param2 ...]
* yii <route> [--param1=value1 --param2 ...]
* ~~~
*
* @author Qiang Xue <qiang.xue@gmail.com>

2
yii/console/Request.php

@ -27,7 +27,7 @@ class Request extends \yii\base\Request
public function resolve()
{
$rawParams = $this->getRawParams();
array_shift($rawParams); // the 1st argument is the yiic script name
array_shift($rawParams); // the 1st argument is the yii script name
if (isset($rawParams[0])) {
$route = $rawParams[0];

2
yii/console/controllers/AssetController.php

@ -261,7 +261,7 @@ class AssetController extends Controller
file_put_contents($bundleFile, <<<EOD
<?php
/**
* This file is generated by the "yiic script" command.
* This file is generated by the "yii script" command.
* DO NOT MODIFY THIS FILE DIRECTLY.
* @version $version
*/

14
yii/console/controllers/HelpController.php

@ -25,7 +25,7 @@ use yii\helpers\StringHelper;
* This command can be used as follows on command line:
*
* ~~~
* yiic help [command name]
* yii help [command name]
* ~~~
*
* In the above, if the command name is not provided, all
@ -41,8 +41,8 @@ class HelpController extends Controller
* about a particular command. For example,
*
* ~~~
* yiic help # list available commands
* yiic help message # display help info about "message"
* yii help # list available commands
* yii help message # display help info about "message"
* ~~~
*
* @param string $command The name of the command to show help about.
@ -148,7 +148,7 @@ class HelpController extends Controller
echo "* $command\n";
}
echo "\nTo see the help of each command, enter:\n";
echo "\n yiic help <command-name>\n\n";
echo "\n yii help <command-name>\n\n";
} else {
echo "\nNo commands are found.\n";
}
@ -188,7 +188,7 @@ class HelpController extends Controller
echo "\n";
}
echo "\n\nTo see the detailed information about individual sub-commands, enter:\n";
echo "\n yiic help <sub-command>\n\n";
echo "\n yii help <sub-command>\n\n";
}
}
@ -259,9 +259,9 @@ class HelpController extends Controller
echo "\nUSAGE\n\n";
if ($action->id === $controller->defaultAction) {
echo 'yiic ' . $controller->getUniqueId();
echo 'yii ' . $controller->getUniqueId();
} else {
echo "yiic " . $action->getUniqueId();
echo "yii " . $action->getUniqueId();
}
list ($required, $optional) = $this->getArgHelps($method, isset($tags['param']) ? $tags['param'] : array());
if (!empty($required)) {

2
yii/console/controllers/MessageController.php

@ -194,7 +194,7 @@ class MessageController extends Controller
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* This file is automatically generated by 'yii message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*

40
yii/console/controllers/MigrateController.php

@ -42,13 +42,13 @@ use yii\helpers\ArrayHelper;
*
* ~~~
* # creates a new migration named 'create_user_table'
* yiic migrate/create create_user_table
* yii migrate/create create_user_table
*
* # applies ALL new migrations
* yiic migrate
* yii migrate
*
* # reverts the last applied migration
* yiic migrate/down
* yii migrate/down
* ~~~
*
* @author Qiang Xue <qiang.xue@gmail.com>
@ -135,8 +135,8 @@ class MigrateController extends Controller
* For example,
*
* ~~~
* yiic migrate # apply all new migrations
* yiic migrate 3 # apply the first 3 new migrations
* yii migrate # apply all new migrations
* yii migrate 3 # apply the first 3 new migrations
* ~~~
*
* @param integer $limit the number of new migrations to be applied. If 0, it means
@ -184,8 +184,8 @@ class MigrateController extends Controller
* For example,
*
* ~~~
* yiic migrate/down # revert the last migration
* yiic migrate/down 3 # revert the last 3 migrations
* yii migrate/down # revert the last migration
* yii migrate/down 3 # revert the last 3 migrations
* ~~~
*
* @param integer $limit the number of migrations to be reverted. Defaults to 1,
@ -231,8 +231,8 @@ class MigrateController extends Controller
* them again. For example,
*
* ~~~
* yiic migrate/redo # redo the last applied migration
* yiic migrate/redo 3 # redo the last 3 applied migrations
* yii migrate/redo # redo the last applied migration
* yii migrate/redo 3 # redo the last 3 applied migrations
* ~~~
*
* @param integer $limit the number of migrations to be redone. Defaults to 1,
@ -284,8 +284,8 @@ class MigrateController extends Controller
* them again. For example,
*
* ~~~
* yiic migrate/to 101129_185401 # using timestamp
* yiic migrate/to m101129_185401_create_user_table # using full name
* yii migrate/to 101129_185401 # using timestamp
* yii migrate/to m101129_185401_create_user_table # using full name
* ~~~
*
* @param string $version the version name that the application should be migrated to.
@ -332,8 +332,8 @@ class MigrateController extends Controller
* No actual migration will be performed.
*
* ~~~
* yiic migrate/mark 101129_185401 # using timestamp
* yiic migrate/mark m101129_185401_create_user_table # using full name
* yii migrate/mark 101129_185401 # using timestamp
* yii migrate/mark m101129_185401_create_user_table # using full name
* ~~~
*
* @param string $version the version at which the migration history should be marked.
@ -398,9 +398,9 @@ class MigrateController extends Controller
* so far. For example,
*
* ~~~
* yiic migrate/history # showing the last 10 migrations
* yiic migrate/history 5 # showing the last 5 migrations
* yiic migrate/history 0 # showing the whole history
* yii migrate/history # showing the last 10 migrations
* yii migrate/history 5 # showing the last 5 migrations
* yii migrate/history 0 # showing the whole history
* ~~~
*
* @param integer $limit the maximum number of migrations to be displayed.
@ -432,9 +432,9 @@ class MigrateController extends Controller
* For example,
*
* ~~~
* yiic migrate/new # showing the first 10 new migrations
* yiic migrate/new 5 # showing the first 5 new migrations
* yiic migrate/new 0 # showing all new migrations
* yii migrate/new # showing the first 10 new migrations
* yii migrate/new 5 # showing the first 5 new migrations
* yii migrate/new 0 # showing all new migrations
* ~~~
*
* @param integer $limit the maximum number of new migrations to be displayed.
@ -469,7 +469,7 @@ class MigrateController extends Controller
* skeleton by filling up the actual migration logic.
*
* ~~~
* yiic migrate/create create_user_table
* yii migrate/create create_user_table
* ~~~
*
* @param string $name the name of the new migration. This should only contain

4
yii/db/Migration.php

@ -10,14 +10,14 @@ namespace yii\db;
/**
* Migration is the base class for representing a database migration.
*
* Migration is designed to be used together with the "yiic migrate" command.
* Migration is designed to be used together with the "yii migrate" command.
*
* Each child class of Migration represents an individual database migration which
* is identified by the child class name.
*
* Within each migration, the [[up()]] method should be overwritten to contain the logic
* for "upgrading" the database; while the [[down()]] method for the "downgrading"
* logic. The "yiic migrate" command manages all available migrations in an application.
* logic. The "yii migrate" command manages all available migrations in an application.
*
* If the database supports transactions, you may also overwrite [[safeUp()]] and
* [[safeDown()]] so that if anything wrong happens during the upgrading or downgrading,

280
yii/i18n/data/plurals.php

@ -2,7 +2,7 @@
/**
* Plural rules.
*
* This file is automatically generated by the "yiic locale/plural" command under the "build" folder.
* This file is automatically generated by the "yii locale/plural" command under the "build" folder.
* Do not modify it directly.
*
* The original plural rule data used for generating this file has the following copyright terms:
@ -16,7 +16,7 @@
* @license http://www.yiiframework.com/license/
*/
return array (
'ar' =>
'ar' =>
array (
0 => '$n==0',
1 => '$n==1',
@ -24,569 +24,569 @@ return array (
3 => 'in_array(fmod($n,100),range(3,10))',
4 => 'in_array(fmod($n,100),range(11,99))',
),
'asa' =>
'asa' =>
array (
0 => '$n==1',
),
'af' =>
'af' =>
array (
0 => '$n==1',
),
'bem' =>
'bem' =>
array (
0 => '$n==1',
),
'bez' =>
'bez' =>
array (
0 => '$n==1',
),
'bg' =>
'bg' =>
array (
0 => '$n==1',
),
'bn' =>
'bn' =>
array (
0 => '$n==1',
),
'brx' =>
'brx' =>
array (
0 => '$n==1',
),
'ca' =>
'ca' =>
array (
0 => '$n==1',
),
'cgg' =>
'cgg' =>
array (
0 => '$n==1',
),
'chr' =>
'chr' =>
array (
0 => '$n==1',
),
'da' =>
'da' =>
array (
0 => '$n==1',
),
'de' =>
'de' =>
array (
0 => '$n==1',
),
'dv' =>
'dv' =>
array (
0 => '$n==1',
),
'ee' =>
'ee' =>
array (
0 => '$n==1',
),
'el' =>
'el' =>
array (
0 => '$n==1',
),
'en' =>
'en' =>
array (
0 => '$n==1',
),
'eo' =>
'eo' =>
array (
0 => '$n==1',
),
'es' =>
'es' =>
array (
0 => '$n==1',
),
'et' =>
'et' =>
array (
0 => '$n==1',
),
'eu' =>
'eu' =>
array (
0 => '$n==1',
),
'fi' =>
'fi' =>
array (
0 => '$n==1',
),
'fo' =>
'fo' =>
array (
0 => '$n==1',
),
'fur' =>
'fur' =>
array (
0 => '$n==1',
),
'fy' =>
'fy' =>
array (
0 => '$n==1',
),
'gl' =>
'gl' =>
array (
0 => '$n==1',
),
'gsw' =>
'gsw' =>
array (
0 => '$n==1',
),
'gu' =>
'gu' =>
array (
0 => '$n==1',
),
'ha' =>
'ha' =>
array (
0 => '$n==1',
),
'haw' =>
'haw' =>
array (
0 => '$n==1',
),
'he' =>
'he' =>
array (
0 => '$n==1',
),
'is' =>
'is' =>
array (
0 => '$n==1',
),
'it' =>
'it' =>
array (
0 => '$n==1',
),
'jmc' =>
'jmc' =>
array (
0 => '$n==1',
),
'kaj' =>
'kaj' =>
array (
0 => '$n==1',
),
'kcg' =>
'kcg' =>
array (
0 => '$n==1',
),
'kk' =>
'kk' =>
array (
0 => '$n==1',
),
'kl' =>
'kl' =>
array (
0 => '$n==1',
),
'ksb' =>
'ksb' =>
array (
0 => '$n==1',
),
'ku' =>
'ku' =>
array (
0 => '$n==1',
),
'lb' =>
'lb' =>
array (
0 => '$n==1',
),
'lg' =>
'lg' =>
array (
0 => '$n==1',
),
'mas' =>
'mas' =>
array (
0 => '$n==1',
),
'ml' =>
'ml' =>
array (
0 => '$n==1',
),
'mn' =>
'mn' =>
array (
0 => '$n==1',
),
'mr' =>
'mr' =>
array (
0 => '$n==1',
),
'nah' =>
'nah' =>
array (
0 => '$n==1',
),
'nb' =>
'nb' =>
array (
0 => '$n==1',
),
'nd' =>
'nd' =>
array (
0 => '$n==1',
),
'ne' =>
'ne' =>
array (
0 => '$n==1',
),
'nl' =>
'nl' =>
array (
0 => '$n==1',
),
'nn' =>
'nn' =>
array (
0 => '$n==1',
),
'no' =>
'no' =>
array (
0 => '$n==1',
),
'nr' =>
'nr' =>
array (
0 => '$n==1',
),
'ny' =>
'ny' =>
array (
0 => '$n==1',
),
'nyn' =>
'nyn' =>
array (
0 => '$n==1',
),
'om' =>
'om' =>
array (
0 => '$n==1',
),
'or' =>
'or' =>
array (
0 => '$n==1',
),
'pa' =>
'pa' =>
array (
0 => '$n==1',
),
'pap' =>
'pap' =>
array (
0 => '$n==1',
),
'ps' =>
'ps' =>
array (
0 => '$n==1',
),
'pt' =>
'pt' =>
array (
0 => '$n==1',
),
'rof' =>
'rof' =>
array (
0 => '$n==1',
),
'rm' =>
'rm' =>
array (
0 => '$n==1',
),
'rwk' =>
'rwk' =>
array (
0 => '$n==1',
),
'saq' =>
'saq' =>
array (
0 => '$n==1',
),
'seh' =>
'seh' =>
array (
0 => '$n==1',
),
'sn' =>
'sn' =>
array (
0 => '$n==1',
),
'so' =>
'so' =>
array (
0 => '$n==1',
),
'sq' =>
'sq' =>
array (
0 => '$n==1',
),
'ss' =>
'ss' =>
array (
0 => '$n==1',
),
'ssy' =>
'ssy' =>
array (
0 => '$n==1',
),
'st' =>
'st' =>
array (
0 => '$n==1',
),
'sv' =>
'sv' =>
array (
0 => '$n==1',
),
'sw' =>
'sw' =>
array (
0 => '$n==1',
),
'syr' =>
'syr' =>
array (
0 => '$n==1',
),
'ta' =>
'ta' =>
array (
0 => '$n==1',
),
'te' =>
'te' =>
array (
0 => '$n==1',
),
'teo' =>
'teo' =>
array (
0 => '$n==1',
),
'tig' =>
'tig' =>
array (
0 => '$n==1',
),
'tk' =>
'tk' =>
array (
0 => '$n==1',
),
'tn' =>
'tn' =>
array (
0 => '$n==1',
),
'ts' =>
'ts' =>
array (
0 => '$n==1',
),
'ur' =>
'ur' =>
array (
0 => '$n==1',
),
'wae' =>
'wae' =>
array (
0 => '$n==1',
),
've' =>
've' =>
array (
0 => '$n==1',
),
'vun' =>
'vun' =>
array (
0 => '$n==1',
),
'xh' =>
'xh' =>
array (
0 => '$n==1',
),
'xog' =>
'xog' =>
array (
0 => '$n==1',
),
'zu' =>
'zu' =>
array (
0 => '$n==1',
),
'ak' =>
'ak' =>
array (
0 => '($n==0||$n==1)',
),
'am' =>
'am' =>
array (
0 => '($n==0||$n==1)',
),
'bh' =>
'bh' =>
array (
0 => '($n==0||$n==1)',
),
'fil' =>
'fil' =>
array (
0 => '($n==0||$n==1)',
),
'tl' =>
'tl' =>
array (
0 => '($n==0||$n==1)',
),
'guw' =>
'guw' =>
array (
0 => '($n==0||$n==1)',
),
'hi' =>
'hi' =>
array (
0 => '($n==0||$n==1)',
),
'ln' =>
'ln' =>
array (
0 => '($n==0||$n==1)',
),
'mg' =>
'mg' =>
array (
0 => '($n==0||$n==1)',
),
'nso' =>
'nso' =>
array (
0 => '($n==0||$n==1)',
),
'ti' =>
'ti' =>
array (
0 => '($n==0||$n==1)',
),
'wa' =>
'wa' =>
array (
0 => '($n==0||$n==1)',
),
'ff' =>
'ff' =>
array (
0 => '($n>=0&&$n<=2)&&$n!=2',
),
'fr' =>
'fr' =>
array (
0 => '($n>=0&&$n<=2)&&$n!=2',
),
'kab' =>
'kab' =>
array (
0 => '($n>=0&&$n<=2)&&$n!=2',
),
'lv' =>
'lv' =>
array (
0 => '$n==0',
1 => 'fmod($n,10)==1&&fmod($n,100)!=11',
),
'iu' =>
'iu' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'kw' =>
'kw' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'naq' =>
'naq' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'se' =>
'se' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'sma' =>
'sma' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'smi' =>
'smi' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'smj' =>
'smj' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'smn' =>
'smn' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'sms' =>
'sms' =>
array (
0 => '$n==1',
1 => '$n==2',
),
'ga' =>
'ga' =>
array (
0 => '$n==1',
1 => '$n==2',
2 => 'in_array($n,array(3,4,5,6))',
3 => 'in_array($n,array(7,8,9,10))',
),
'ro' =>
'ro' =>
array (
0 => '$n==1',
1 => '$n==0||$n!=1&&in_array(fmod($n,100),range(1,19))',
),
'mo' =>
'mo' =>
array (
0 => '$n==1',
1 => '$n==0||$n!=1&&in_array(fmod($n,100),range(1,19))',
),
'lt' =>
'lt' =>
array (
0 => 'fmod($n,10)==1&&!in_array(fmod($n,100),range(11,19))',
1 => 'in_array(fmod($n,10),range(2,9))&&!in_array(fmod($n,100),range(11,19))',
),
'be' =>
'be' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'bs' =>
'bs' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'hr' =>
'hr' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'ru' =>
'ru' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'sh' =>
'sh' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'sr' =>
'sr' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'uk' =>
'uk' =>
array (
0 => 'fmod($n,10)==1&&fmod($n,100)!=11',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => 'fmod($n,10)==0||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(11,12,13,14))',
),
'cs' =>
'cs' =>
array (
0 => '$n==1',
1 => 'in_array($n,array(2,3,4))',
),
'sk' =>
'sk' =>
array (
0 => '$n==1',
1 => 'in_array($n,array(2,3,4))',
),
'pl' =>
'pl' =>
array (
0 => '$n==1',
1 => 'in_array(fmod($n,10),array(2,3,4))&&!in_array(fmod($n,100),array(12,13,14))',
2 => '$n!=1&&in_array(fmod($n,10),array(0,1))||in_array(fmod($n,10),array(5,6,7,8,9))||in_array(fmod($n,100),array(12,13,14))',
),
'sl' =>
'sl' =>
array (
0 => 'fmod($n,100)==1',
1 => 'fmod($n,100)==2',
2 => 'in_array(fmod($n,100),array(3,4))',
),
'mt' =>
'mt' =>
array (
0 => '$n==1',
1 => '$n==0||in_array(fmod($n,100),range(2,10))',
2 => 'in_array(fmod($n,100),range(11,19))',
),
'mk' =>
'mk' =>
array (
0 => 'fmod($n,10)==1&&$n!=11',
),
'cy' =>
'cy' =>
array (
0 => '$n==0',
1 => '$n==1',
@ -594,33 +594,33 @@ return array (
3 => '$n==3',
4 => '$n==6',
),
'lag' =>
'lag' =>
array (
0 => '$n==0',
1 => '($n>=0&&$n<=2)&&$n!=0&&$n!=2',
),
'shi' =>
'shi' =>
array (
0 => '($n>=0&&$n<=1)',
1 => 'in_array($n,range(2,10))',
),
'br' =>
'br' =>
array (
0 => 'fmod($n,10)==1&&!in_array(fmod($n,100),array(11,71,91))',
1 => 'fmod($n,10)==2&&!in_array(fmod($n,100),array(12,72,92))',
2 => 'in_array(fmod($n,10),array(3,4,9))&&!in_array(fmod($n,100),array_merge(range(10,19),range(70,79),range(90,99)))',
3 => 'fmod($n,1000000)==0&&$n!=0',
),
'ksh' =>
'ksh' =>
array (
0 => '$n==0',
1 => '$n==1',
),
'tzm' =>
'tzm' =>
array (
0 => '($n==0||$n==1)||in_array($n,range(11,99))',
),
'gv' =>
'gv' =>
array (
0 => 'in_array(fmod($n,10),array(1,2))||fmod($n,20)==0',
),

Loading…
Cancel
Save