summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.setlanip
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-06-07 19:42:04 -0400
committerDarren Embry <dse@webonastick.com>2012-06-07 20:39:20 -0400
commit1b8bf24dbe30fab4a5d605bc27099793359c7833 (patch)
tree3bd4109e8097c8d63cbf5b11e8fffdee01a18242 /etc/rc.initial.setlanip
parent005a704988d733179f91fb62ad91b777cd6679ad (diff)
downloadpfsense-1b8bf24dbe30fab4a5d605bc27099793359c7833.zip
pfsense-1b8bf24dbe30fab4a5d605bc27099793359c7833.tar.gz
again, string interpolation kinda defeats the purpose of gettext. ;-)
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-xetc/rc.initial.setlanip14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index da3f901..87743b2 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -360,7 +360,7 @@ if(!$config['interfaces']['lan']) {
$upperifname = strtoupper($interface);
if (!$dry_run) {
echo "\nPlease wait while the changes are saved to {$upperifname}...";
- write_config(gettext("{$interface} IP configuration from console menu"));
+ write_config(sprintf(gettext("%s IP configuration from console menu"), $interface));
interface_reconfigure(strtolower($upperifname));
echo " Reloading filter...";
filter_configure_sync();
@@ -377,16 +377,20 @@ if (!$dry_run) {
if ($intip != '') {
if (is_ipaddr($intip)) {
- echo "\n\n" . gettext("The IPv4 {$upperifname} address has been set to ") . "{$intip}/{$intbits}\n";
+ echo "\n\n" . sprintf(gettext("The IPv4 %s address has been set to %s"),
+ $upperifname, "{$intip}/{$intbits}") . "\n";
} else {
- echo "\n\n" . gettext("The IPv4 {$upperifname} address has been set to ") . "{$intip}\n";
+ echo "\n\n" . sprintf(gettext("The IPv4 %s address has been set to %s"),
+ $upperifname, $intip) . "\n";
}
}
if ($intip6 != '') {
if (is_ipaddr($intip6)) {
- echo "\n\n" . gettext("The IPv6 {$upperifname} address has been set to ") . "{$intip6}/{$intbits6}\n";
+ echo "\n\n" . sprintf(gettext("The IPv6 %s address has been set to %s"),
+ $upperifname, "${intip6}/${intbits6}") . "\n";
} else {
- echo "\n\n" . gettext("The IPv6 {$upperifname} address has been set to ") . "{$intip6}\n";
+ echo "\n\n" . sprintf(gettext("The IPv6 %s address has been set to %s"),
+ $upperifname, $intip6) . "\n";
}
}
OpenPOWER on IntegriCloud