diff options
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index b94018b..21e96ba 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -91,6 +91,11 @@ $navlevelsep = ": "; /* navigation level separator string */ $mandfldhtml = ""; /* display this before mandatory input fields */ $mandfldhtmlspc = ""; /* same as above, but with spacing */ +if (!function_exists('set_language')) { + require_once("pfsense-utils.inc"); +} +set_language(); + /* Some ajax scripts still need access to GUI */ if (!$ignorefirmwarelock) { if (is_subsystem_dirty('firmwarelock')) { @@ -314,7 +319,10 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl $msg = '<div class="pull-left">' . $msg . '</div>'; - if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) { + // The $msg string might or might not have had a known translation into the target language. + // So check it against the keywords "apply", "save and "create" in both the target language and English. + if ((stristr($msg, gettext("apply")) != false) || (stristr($msg, gettext("save")) != false) || (stristr($msg, gettext("create")) != false) || + (stristr($msg, "apply") != false) || (stristr($msg, "save") != false) || (stristr($msg, "create") != false) || $showapply) { $msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="' . $value . '">' . $name . '</button>'; if ($_POST['if']) { |