From 6e8892c5b384b6d1f5af067ae2c682a20c8b99db Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Thu, 21 Jan 2016 13:31:32 -0500 Subject: Add gettext to select option names where required --- src/usr/local/www/diag_packet_capture.php | 18 ++++++++++-------- src/usr/local/www/diag_pftop.php | 24 ++++++++++++------------ src/usr/local/www/firewall_nat_out_edit.php | 24 ++++++++++++------------ src/usr/local/www/firewall_rules_edit.php | 2 +- src/usr/local/www/interfaces.php | 2 +- src/usr/local/www/interfaces_bridge_edit.php | 2 +- src/usr/local/www/interfaces_wireless_edit.php | 2 +- src/usr/local/www/load_balancer_pool_edit.php | 4 ++-- 8 files changed, 40 insertions(+), 38 deletions(-) diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php index 5258f9b..6c49be6 100644 --- a/src/usr/local/www/diag_packet_capture.php +++ b/src/usr/local/www/diag_packet_capture.php @@ -263,20 +263,22 @@ if ($_POST) { $do_tcpdump = false; } +$excl = gettext("Exclude"); + $protocollist = array( '' => 'Any', 'icmp' => 'ICMP', - '!icmp' => 'Exclude ICMP', + '!icmp' => $excl . ' ICMP', 'icmp6' => 'ICMPv6', - '!icmp6' => 'Exclude ICMPv6', + '!icmp6' => $excl . ' ICMPv6', 'tcp' => 'TCP', - '!tcp' => 'Exclude TCP', + '!tcp' => $excl . ' TCP', 'udp' => 'UDP', - '!udp' => 'Exclude UDP', + '!udp' => $excl . ' UDP', 'arp' => 'ARP', - '!arp' => 'Exclude ARP', + '!arp' => $excl . ' ARP', 'carp' => 'CARP (VRRP)', - '!carp' => 'Exclude CARP (VRRP)', + '!carp' => $excl . ' CARP (VRRP)', 'esp' => 'ESP' ); @@ -311,8 +313,8 @@ $section->addInput(new Form_Select( 'Address Family', $fam, array('' => 'Any', - 'ip' => 'IPv4 Only', - 'ip6' => 'IPv6 Only' + 'ip' => gettext('IPv4 Only'), + 'ip6' => gettext('IPv6 Only') ) ))->setHelp('Select the type of traffic to be captured'); diff --git a/src/usr/local/www/diag_pftop.php b/src/usr/local/www/diag_pftop.php index cece7aa..a8d8cb7 100644 --- a/src/usr/local/www/diag_pftop.php +++ b/src/usr/local/www/diag_pftop.php @@ -141,18 +141,18 @@ $section->addInput(new Form_Select( 'Sort by', $sorttype, array( - 'none' => 'None', - 'age' => 'Age', - 'bytes' => 'Bytes', - 'dest' => 'Destination Address', - 'dport' => 'Destination Port', - 'exp' => 'Expiry', - 'peak' => 'Peak', - 'pkt' => 'Packet', - 'rate' => 'Rate', - 'size' => 'Size', - 'sport' => 'Source Port', - 'src' => 'Source Address', + 'none' => gettext('None'), + 'age' => gettext('Age'), + 'bytes' => gettext('Bytes'), + 'dest' => gettext('Destination Address'), + 'dport' => gettext('Destination Port'), + 'exp' => gettext('Expiry'), + 'peak' => gettext('Peak'), + 'pkt' => gettext('Packet'), + 'rate' => gettext('Rate'), + 'size' => gettext('Size'), + 'sport' => gettext('Source Port'), + 'src' => gettext('Source Address'), ) )); diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php index e4aebde..926c579 100644 --- a/src/usr/local/www/firewall_nat_out_edit.php +++ b/src/usr/local/www/firewall_nat_out_edit.php @@ -397,7 +397,7 @@ function build_target_list() { global $config, $sn, $a_aliases; $list = array(); - $list[""] = 'Interface Address'; + $list[""] = gettext('Interface Address'); if (is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $sn) { @@ -427,10 +427,10 @@ function build_target_list() { continue; } - $list[$alias['name']] = 'Host Alias: ' . $alias['name'] . ' (' . $alias['descr'] . ')'; + $list[$alias['name']] = gettext('Host Alias: ') . $alias['name'] . ' (' . $alias['descr'] . ')'; } - $list['other-subnet'] = 'Other Subnet (Enter Below)'; + $list['other-subnet'] = gettext('Other Subnet (Enter Below)'); return($list); } @@ -510,7 +510,7 @@ $group->add(new Form_Select( 'source_type', null, (($pconfig['source'] == "any") || ($pconfig['source'] == "(self)")) ? $pconfig['source'] : "network", - array('any' => 'Any', '(self)' => 'This Firewall (self)', 'network' => 'Network') + array('any' => gettext('Any'), '(self)' => gettext('This Firewall (self))', 'network' => gettext('Network')) ))->setHelp('Type')->setWidth('3'); $group->add(new Form_IpAddress( @@ -534,7 +534,7 @@ $group->add(new Form_Select( 'destination_type', null, $pconfig['destination'] == "any" ? "any":"network", - array('any' => 'Any', 'network' => 'Network') + array('any' => gettext('Any'), 'network' => gettext('Network')) ))->setHelp('Type')->setWidth('3'); $group->add(new Form_IpAddress( @@ -587,13 +587,13 @@ $section->addInput(new Form_Select( 'Pool options', $pconfig['poolopts'], array( - '' => 'Default', - 'round-robin' => 'Round Robin', - 'round-robin sticky-address' => 'Round Robin with Sticky Address', - 'random' => 'Random', - 'random sticky-address' => 'Random with Sticky Address', - 'source-hash' => 'Source hash', - 'bitmask' => 'Bit mask' + '' => gettext('Default'), + 'round-robin' => gettext('Round Robin'), + 'round-robin sticky-address' => gettext('Round Robin with Sticky Address'), + 'random' => gettext('Random'), + 'random sticky-address' => gettext('Random with Sticky Address'), + 'source-hash' => gettext('Source hash'), + 'bitmask' => gettext('Bit mask') ) ))->setHelp('Only Round Robin types work with Host Aliases. Any type can be used with a Subnet.' . '
' . '