[ticket/12656] Use lang keys for CLI command descriptions

PHPBB3-12656
This commit is contained in:
Dhruv 2014-07-23 00:35:09 +05:30
parent e11875527d
commit 4092b63be3
14 changed files with 30 additions and 19 deletions

View file

@ -35,10 +35,21 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.', 'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.',
'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.', 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.',
'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run', 'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run',
'CLI_DESCRIPTION_DB_MIGRATE' => 'Updates the database by applying migrations.',
'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.', 'CLI_DESCRIPTION_DELETE_CONFIG' => 'Deletes a configuration option',
'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).', 'CLI_DESCRIPTION_DISABLE_EXTENSION' => 'Disables the specified extension.',
'CLI_DESCRIPTION_ENABLE_EXTENSION' => 'Enables the specified extension.',
'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended on.',
'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option\'s value',
'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option\'s value',
'CLI_DESCRIPTION_LIST_EXTENSIONS' => 'Lists all extensions in the database and on the filesystem.',
'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).',
'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.',
'CLI_DESCRIPTION_PURGE_EXTENSION' => 'Purges the specified extension.',
'CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH' => 'Recalculates the user_email_hash column of the users table.',
'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option\'s value only if the old matches the current value',
'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option\'s value'
)); ));

View file

@ -59,7 +59,7 @@ class purge extends \phpbb\console\command\command
{ {
$this $this
->setName('cache:purge') ->setName('cache:purge')
->setDescription('Purge the cache.') ->setDescription($this->user->lang('PURGE_CACHE'))
; ;
} }

View file

@ -25,7 +25,7 @@ class delete extends command
{ {
$this $this
->setName('config:delete') ->setName('config:delete')
->setDescription('Deletes a configuration option') ->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG'))
->addArgument( ->addArgument(
'key', 'key',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -26,7 +26,7 @@ class get extends command
{ {
$this $this
->setName('config:get') ->setName('config:get')
->setDescription("Gets a configuration option's value") ->setDescription($this->user->lang('CLI_DESCRIPTION_GET_CONFIG'))
->addArgument( ->addArgument(
'key', 'key',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -26,7 +26,7 @@ class increment extends command
{ {
$this $this
->setName('config:increment') ->setName('config:increment')
->setDescription("Increments a configuration option's value") ->setDescription($this->user->lang('CLI_DESCRIPTION_INCREMENT_CONFIG'))
->addArgument( ->addArgument(
'key', 'key',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -26,7 +26,7 @@ class set extends command
{ {
$this $this
->setName('config:set') ->setName('config:set')
->setDescription("Sets a configuration option's value") ->setDescription($this->user->lang('CLI_DESCRIPTION_SET_CONFIG'))
->addArgument( ->addArgument(
'key', 'key',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -26,7 +26,7 @@ class set_atomic extends command
{ {
$this $this
->setName('config:set-atomic') ->setName('config:set-atomic')
->setDescription("Sets a configuration option's value only if the old matches the current value.") ->setDescription($this->user->lang('CLI_DESCRIPTION_SET_ATOMIC_CONFIG'))
->addArgument( ->addArgument(
'key', 'key',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -47,7 +47,7 @@ class migrate extends \phpbb\console\command\command
{ {
$this $this
->setName('db:migrate') ->setName('db:migrate')
->setDescription('Updates the database by applying migrations.') ->setDescription($this->user->lang('CLI_DESCRIPTION_DB_MIGRATE'))
; ;
} }

View file

@ -30,7 +30,7 @@ class migration_tips extends \phpbb\console\command\command
{ {
$this $this
->setName('dev:migration-tips') ->setName('dev:migration-tips')
->setDescription('Finds migrations that are not depended on.') ->setDescription($this->user->lang('CLI_DESCRIPTION_FIND_MIGRATIONS'))
; ;
} }

View file

@ -22,7 +22,7 @@ class disable extends command
{ {
$this $this
->setName('extension:disable') ->setName('extension:disable')
->setDescription('Disables the specified extension.') ->setDescription($this->user->lang('CLI_DESCRIPTION_DISABLE_EXTENSION'))
->addArgument( ->addArgument(
'extension-name', 'extension-name',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -22,7 +22,7 @@ class enable extends command
{ {
$this $this
->setName('extension:enable') ->setName('extension:enable')
->setDescription('Enables the specified extension.') ->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
->addArgument( ->addArgument(
'extension-name', 'extension-name',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -22,7 +22,7 @@ class purge extends command
{ {
$this $this
->setName('extension:purge') ->setName('extension:purge')
->setDescription('Purges the specified extension.') ->setDescription($this->user->lang('CLI_DESCRIPTION_PURGE_EXTENSION'))
->addArgument( ->addArgument(
'extension-name', 'extension-name',
InputArgument::REQUIRED, InputArgument::REQUIRED,

View file

@ -21,7 +21,7 @@ class show extends command
{ {
$this $this
->setName('extension:show') ->setName('extension:show')
->setDescription('Lists all extensions in the database and on the filesystem.') ->setDescription($this->user->lang('CLI_DESCRIPTION_LIST_EXTENSIONS'))
; ;
} }

View file

@ -31,7 +31,7 @@ class recalculate_email_hash extends \phpbb\console\command\command
{ {
$this $this
->setName('fixup:recalculate-email-hash') ->setName('fixup:recalculate-email-hash')
->setDescription('Recalculates the user_email_hash column of the users table.') ->setDescription($this->user->lang('CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH'))
; ;
} }