MDL-53260 upgrade: Option to display CLI upgrade messages in English
This commit is contained in:
committed by
Jun Pataleta
parent
fed66ad9e2
commit
14aaa2d75b
+10
-1
@@ -49,13 +49,21 @@ list($options, $unrecognized) = cli_get_params(
|
||||
array(
|
||||
'non-interactive' => false,
|
||||
'allow-unstable' => false,
|
||||
'help' => false
|
||||
'help' => false,
|
||||
'lang' => 'en'
|
||||
),
|
||||
array(
|
||||
'h' => 'help'
|
||||
)
|
||||
);
|
||||
|
||||
global $SESSION;
|
||||
if ($options['lang']) {
|
||||
$SESSION->lang = $options['lang'];
|
||||
} else {
|
||||
$SESSION->lang = 'en';
|
||||
}
|
||||
|
||||
$interactive = empty($options['non-interactive']);
|
||||
|
||||
if ($unrecognized) {
|
||||
@@ -74,6 +82,7 @@ Options:
|
||||
--non-interactive No interactive questions or confirmations
|
||||
--allow-unstable Upgrade even if the version is not marked as stable yet,
|
||||
required in non-interactive mode.
|
||||
--lang=CODE Set preferred language for CLI output, during upgrade process (default:en).
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
|
||||
Reference in New Issue
Block a user