diff options
author | Carlos Eduardo Ramos <carlos.ramos@bluepex.com> | 2010-08-16 12:53:12 -0300 |
---|---|---|
committer | Carlos Eduardo Ramos <carlos.ramos@bluepex.com> | 2010-08-16 12:53:12 -0300 |
commit | 5c7296d27f1c4fbc2eff629b17bccb80136fc5b8 (patch) | |
tree | 06361ca29d9dd1ae3a9660770081bc5654d055d8 /etc/inc/gwlb.inc | |
parent | 8abd095a53ee096606eac2fbf19e87d4c868d20b (diff) | |
download | pfsense-5c7296d27f1c4fbc2eff629b17bccb80136fc5b8.zip pfsense-5c7296d27f1c4fbc2eff629b17bccb80136fc5b8.tar.gz |
Implement gettext() calls on gwlb.inc
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 4a9decb..bea0bed 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -230,7 +230,7 @@ EOD; mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor'])); mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) . " " . escapeshellarg($gateway['gateway'])); - log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}"); + log_error(sprintf(gettext("Removing static route for monitor %s and adding a new route through %s"), $gateway['monitor'], $gateway['gateway'])); } } } @@ -383,13 +383,13 @@ function return_gateway_groups_array() { continue; } if (stristr($status['status'], "down")) { - $msg = "MONITOR: $gwname has high latency, removing from routing group"; + $msg = sprintf(gettext("MONITOR: %s has high latency, removing from routing group"), $gwname); log_error($msg); notify_via_growl($msg); } elseif (stristr($status['status'], "loss")) { if (strstr($group['trigger'], "loss")) { /* packet loss */ - $msg = "MONITOR: $gwname has packet loss, removing from routing group"; + $msg = sprintf(gettext("MONITOR: %s has packet loss, removing from routing group"), $gwname); log_error($msg); notify_via_growl($msg); } else { @@ -398,6 +398,7 @@ function return_gateway_groups_array() { } elseif (stristr($status['status'], "delay")) { if (strstr($group['trigger'] , "latency")) { /* high latency */ + $msg = sprintf(gettext("MONITOR: %s has high latency, removing from routing group"), $gwname); $msg = "MONITOR: $gwname has high latency, removing from routing group"; log_error($msg); notify_via_growl($msg); @@ -413,7 +414,7 @@ function return_gateway_groups_array() { $tiers_count = count($tiers); if($tiers_count == 0) { /* Oh dear, we have no members! Engage Plan B */ - $msg = "All gateways are unavailable, proceeding with configured XML settings!"; + $msg = gettext("All gateways are unavailable, proceeding with configured XML settings!"); log_error($msg); notify_via_growl($msg); foreach($group['item'] as $item) { @@ -468,7 +469,7 @@ function dhclient_update_gateway_groups_defaultroute($interface = "wan") { } } if($changed && $current_gw) - write_config("Updating gateway group gateway for $interface - new gateway is $current_gw"); + write_config(sprintf(gettext("Updating gateway group gateway for %s - new gateway is %s"), $interfac, $current_gw)); } function lookup_gateway_ip_by_name($name) { |