diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-10 13:32:02 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-10 13:32:02 +0545 |
commit | cfd8da201fefbf3e181a2c59696897fe068ce820 (patch) | |
tree | 55384bb8e9aa872e3f4b81880550bf380cfed470 /src/etc/rc.initial.halt | |
parent | c0499d48618013412a4b2ace07b04dde7a0df955 (diff) | |
download | pfsense-cfd8da201fefbf3e181a2c59696897fe068ce820.zip pfsense-cfd8da201fefbf3e181a2c59696897fe068ce820.tar.gz |
Internationalize console halt 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/etc/rc.initial.halt')
-rwxr-xr-x | src/etc/rc.initial.halt | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/etc/rc.initial.halt b/src/etc/rc.initial.halt index df91ded..27377b5 100755 --- a/src/etc/rc.initial.halt +++ b/src/etc/rc.initial.halt @@ -37,21 +37,11 @@ $fp = fopen('php://stdin', 'r'); - echo <<<EOD - -{$g['product_name']} will shutdown and halt system. This may take a few minutes, depending on your hardware. - -Do you want to proceed [y|n]? -EOD; + echo "\n" . sprintf(gettext("%s will shutdown and halt system. 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']} will shutdown and halt system now. - -EOD; - + echo "\n" . sprintf(gettext("%s will shutdown and halt system now."), $g['product_name']) . "\n"; system_halt(); } |