From b961bc234c9c8fc7c368442e36385ca3f85feba7 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 1 Jan 2017 11:01:38 +0545 Subject: Remove redundant gettext() in firewall_rules_edit The 'helpmsg' here is already translated with gettext() when the 'helpmsg' array entries are set up, so IMHO there is no need to attempt translation again. (cherry picked from commit cffe1271c962ac9159c43fd214c735ceb4b5e1b8) --- src/usr/local/www/firewall_rules_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index c95402b..f37ecc2 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1325,7 +1325,7 @@ $group->add(new Form_Select( ((isset($pconfig['icmptype']) && strlen($pconfig['icmptype']) > 0) ? explode(',', $pconfig['icmptype']) : 'any'), isset($icmplookup[$pconfig['ipprotocol']]) ? $icmplookup[$pconfig['ipprotocol']]['icmptypes'] : array('any' => gettext('any')), true -))->setHelp('
' . (isset($icmplookup[$pconfig['ipprotocol']]) ? gettext($icmplookup[$pconfig['ipprotocol']]['helpmsg']) : '') . '
'); +))->setHelp('
' . (isset($icmplookup[$pconfig['ipprotocol']]) ? $icmplookup[$pconfig['ipprotocol']]['helpmsg'] : '') . '
'); $group->addClass('icmptype_section'); $section->add($group); @@ -2000,7 +2000,7 @@ events.push(function() { $a[] = sprintf("'%s':'%s'", $icmp_k, $icmp_v); } $out1 .= "icmptypes['{$k}'] = {\n\t" . implode(",\n\t", $a) . "\n};\n"; - $out2 .= "icmphelp['{$k}'] = '" . str_replace("'", ''', gettext($v['helpmsg'])) . "';\n"; + $out2 .= "icmphelp['{$k}'] = '" . str_replace("'", ''', $v['helpmsg']) . "';\n"; } echo $out1; echo $out2; -- cgit v1.1