diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-10 13:20:33 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-10 13:20:33 +0545 |
commit | 287f8e27674102ec0de56abc67583be3b1073ce4 (patch) | |
tree | 4452cb6d1a7328a97ae7d73ccf0741eca7e4a40e /src | |
parent | c0499d48618013412a4b2ace07b04dde7a0df955 (diff) | |
download | pfsense-287f8e27674102ec0de56abc67583be3b1073ce4.zip pfsense-287f8e27674102ec0de56abc67583be3b1073ce4.tar.gz |
Internationalize console reboot script
This file previously had to have a space after "Do you want to proceed [y|n]?" to make the prompt for user input nice. That made it one of the few exceptions to the code style guide, where lines are not supposed to have blank space at the end.
Might as well have 1 less exception to the rule by internationalizing it, which removes the literal "EOD" echo output stuff.
Diffstat (limited to 'src')
-rwxr-xr-x | src/etc/rc.initial.reboot | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/etc/rc.initial.reboot b/src/etc/rc.initial.reboot index 6f70407..fdcc480 100755 --- a/src/etc/rc.initial.reboot +++ b/src/etc/rc.initial.reboot @@ -37,21 +37,11 @@ $fp = fopen('php://stdin', 'r'); - echo <<<EOD - -{$g['product_name']} will reboot. This may take a few minutes, depending on your hardware. - -Do you want to proceed [y|n]? -EOD; + echo "\n" . sprintf(gettext("%s will reboot. This may take a few minutes, depending on your hardware."), $g['product_name']) . "\n"; + echo gettext("Do you want to proceed [y|n]?") . " "; if (strcasecmp(chop(fgets($fp)), "y") == 0) { - - echo <<<EOD - -{$g['product_name']} is rebooting now. - -EOD; - + echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n"; system_reboot_sync(); } |