summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-01-16 00:00:42 +0545
committerPhil Davis <phil.davis@inf.org>2015-01-16 00:00:42 +0545
commitfe0fa4c3cb76e684eda0471539d2488580616d0e (patch)
tree84402d4e938fed7a3f32083e3717e61ac87b5da6
parent98bf4991dc31f97fc7315a6b8aba433de9d39cea (diff)
downloadpfsense-fe0fa4c3cb76e684eda0471539d2488580616d0e.zip
pfsense-fe0fa4c3cb76e684eda0471539d2488580616d0e.tar.gz
Firewall Rules Apply be friendly to other languages
Forum: https://forum.pfsense.org/index.php?topic=86808.0 Redmine: https://redmine.pfsense.org/issues/3886 print_info_box_np() when called with just the first $msg parameter has some rough tests to decide if the "Apply" button should be displayed. It checks if the translation of "apply", "save" or "create" appears in the $msg string (which is a translated string itself). If the $msg string did not translate, and thus remains in English, but gettext("apply") does translate then the e.g. Turkish word for "apply" is not going to appear in the English $msg string. So things go wrong. print_info_box_np already has extra parameters to tell it explicitly $showapply - and for this stuff we know we want the apply button, regardless of how the various text string translations work out. Thus I have provided those parameters here. I also changed the construction of the text to pass as $msg, breaking it up like in firewall_aliases.php - this means that the string "You must apply the changes in order for them to take effect." translates and you get at least that Turkish displayed. IMHO it would be beneficial to change lots of these print_info_box_np calls to explicitly set $showapply=true - that will ensure that the apply button shows (and thus the user can perform the needed actions) regardless of how well/not well the translation of the text turns out.
-rw-r--r--usr/local/www/firewall_rules.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 036b278..6110afb 100644
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -291,7 +291,7 @@ if($_REQUEST['undodrag']) {
$dragtable .= "&dragtable[]={$dt}";
print_info_box_np_undo(gettext("The firewall rule configuration has been changed.<br />You must apply the changes in order for them to take effect."), "apply" , gettext("Apply changes") , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
} else {
- print_info_box_np(gettext("The firewall rule configuration has been changed.<br />You must apply the changes in order for them to take effect."));
+ print_info_box_np(gettext("The firewall rule configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."), "apply", "", true);
}
?>
<br />
OpenPOWER on IntegriCloud