mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12656] Use lang keys for all CLI strings
PHPBB3-12656
This commit is contained in:
@@ -29,7 +29,7 @@ class delete extends command
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
"The configuration option's name"
|
||||
$this->user->lang('CLI_CONFIG_OPTION_NAME')
|
||||
)
|
||||
;
|
||||
}
|
||||
@@ -53,11 +53,11 @@ class delete extends command
|
||||
{
|
||||
$this->config->delete($key);
|
||||
|
||||
$output->writeln("<info>Successfully deleted config $key</info>");
|
||||
$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key) . '</info>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<error>Config $key does not exist</error>");
|
||||
$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>'');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -30,13 +30,13 @@ class get extends command
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
"The configuration option's name"
|
||||
$this->user->lang('CLI_CONFIG_OPTION_NAME')
|
||||
)
|
||||
->addOption(
|
||||
'no-newline',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'Set this option if the value should be printed without a new line at the end.'
|
||||
$this->user->lang('CLI_CONFIG_PRINT_WITHOUT_NEWLINE')
|
||||
)
|
||||
;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ class get extends command
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<error>Could not get config $key</error>");
|
||||
$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -30,18 +30,18 @@ class increment extends command
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
"The configuration option's name"
|
||||
$this->user->lang('CLI_CONFIG_OPTION_NAME')
|
||||
)
|
||||
->addArgument(
|
||||
'increment',
|
||||
InputArgument::REQUIRED,
|
||||
'Amount to increment by'
|
||||
$this->user->lang('CLI_CONFIG_INCREMENT_BY')
|
||||
)
|
||||
->addOption(
|
||||
'dynamic',
|
||||
'd',
|
||||
InputOption::VALUE_NONE,
|
||||
'Set this option if the configuration option changes too frequently to be efficiently cached.'
|
||||
$this->user-lang('CLI_CONFIG_CANNOT_CACHED')
|
||||
)
|
||||
;
|
||||
}
|
||||
@@ -65,6 +65,6 @@ class increment extends command
|
||||
|
||||
$this->config->increment($key, $increment, $use_cache);
|
||||
|
||||
$output->writeln("<info>Successfully incremented config $key</info>");
|
||||
$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key) . '</info>');
|
||||
}
|
||||
}
|
||||
|
@@ -30,18 +30,18 @@ class set extends command
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
"The configuration option's name"
|
||||
$this->user->lang('CLI_CONFIG_OPTION_NAME')
|
||||
)
|
||||
->addArgument(
|
||||
'value',
|
||||
InputArgument::REQUIRED,
|
||||
'New configuration value, use 0 and 1 to specify boolean values'
|
||||
$this->user->lang('CLI_CONFIG_NEW')
|
||||
)
|
||||
->addOption(
|
||||
'dynamic',
|
||||
'd',
|
||||
InputOption::VALUE_NONE,
|
||||
'Set this option if the configuration option changes too frequently to be efficiently cached.'
|
||||
$this->user->lang('CLI_CONFIG_CANNOT_CACHED')
|
||||
)
|
||||
;
|
||||
}
|
||||
@@ -65,6 +65,6 @@ class set extends command
|
||||
|
||||
$this->config->set($key, $value, $use_cache);
|
||||
|
||||
$output->writeln("<info>Successfully set config $key</info>");
|
||||
$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . '</info>');
|
||||
}
|
||||
}
|
||||
|
@@ -30,23 +30,23 @@ class set_atomic extends command
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
"The configuration option's name"
|
||||
$this->user->lang('CLI_CONFIG_OPTION_NAME')
|
||||
)
|
||||
->addArgument(
|
||||
'old',
|
||||
InputArgument::REQUIRED,
|
||||
'Current configuration value, use 0 and 1 to specify boolean values'
|
||||
$this->user->lang('CLI_CONFIG_CURRENT')
|
||||
)
|
||||
->addArgument(
|
||||
'new',
|
||||
InputArgument::REQUIRED,
|
||||
'New configuration value, use 0 and 1 to specify boolean values'
|
||||
$this->user->lang('CLI_CONFIG_NEW')
|
||||
)
|
||||
->addOption(
|
||||
'dynamic',
|
||||
'd',
|
||||
InputOption::VALUE_NONE,
|
||||
'Set this option if the configuration option changes too frequently to be efficiently cached.'
|
||||
$this->user->lang('CLI_CONFIG_CANNOT_CACHED')
|
||||
)
|
||||
;
|
||||
}
|
||||
@@ -72,12 +72,12 @@ class set_atomic extends command
|
||||
|
||||
if ($this->config->set_atomic($key, $old_value, $new_value, $use_cache))
|
||||
{
|
||||
$output->writeln("<info>Successfully set config $key</info>");
|
||||
$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . '</info>');
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<error>Could not set config $key</error>");
|
||||
$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_SET_FAILURE', $key) . '</error>');
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user