diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-09 08:50:20 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-09 08:50:20 -0200 |
commit | 36615eb8d938a2be565e67394a78f0cc7ffefcc3 (patch) | |
tree | ef6cb0761d2c9b28696ed694519d979d980358ff | |
parent | e7fc54ac245998f2dd0783818dbb301d3e0ec3e7 (diff) | |
parent | 7f0d6ccf72fae0f60203f4eb154eee5912796d35 (diff) | |
download | pfsense-36615eb8d938a2be565e67394a78f0cc7ffefcc3.zip pfsense-36615eb8d938a2be565e67394a78f0cc7ffefcc3.tar.gz |
Merge pull request #3517 from phil-davis/sethelp-8
-rw-r--r-- | src/usr/local/www/status.php | 14 | ||||
-rw-r--r-- | src/usr/local/www/status_interfaces.php | 14 | ||||
-rw-r--r-- | src/usr/local/www/status_ipsec.php | 11 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_common.inc | 13 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_filter.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_settings.php | 9 | ||||
-rw-r--r-- | src/usr/local/www/status_wireless.php | 6 |
7 files changed, 38 insertions, 31 deletions
diff --git a/src/usr/local/www/status.php b/src/usr/local/www/status.php index 0c9e33f..b655276 100644 --- a/src/usr/local/www/status.php +++ b/src/usr/local/www/status.php @@ -138,7 +138,7 @@ function listCmds() { $rubbish = array('|', '-', '/', '.', ' '); /* fixes the <a> tag to be W3C compliant */ print('<div class="panel panel-default">'); - print('<div class="panel-heading"><h2 class="panel-title">' . gettext("Firewall Status on ") . $currentDate . '</h2></div>'); + print('<div class="panel-heading"><h2 class="panel-title">' . sprintf(gettext("Firewall Status on %s"), $currentDate) . '</h2></div>'); print('<div class="panel-body">'); print(' <div class="content">'); print("\n<p>" . gettext("This status page includes the following information") . ":\n"); @@ -325,11 +325,13 @@ $currentDate = $dateOutput[0]; $pgtitle = array($g['product_name'], "Status"); include("head.inc"); -print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . - "information from this page in public places (like mailing lists).") . '<br />' . - gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . - gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . - "<a href=\"/diag_command.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt.") . '</a>'); +print_info_box( + gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting information from this page in public places (like mailing lists).") . + '<br />' . + gettext("Common password fields in config.xml have been automatically redacted.") . + '<br />' . + sprintf(gettext('Whenz the page has finished loading, the output will be stored in %1$s. It may be downloaded via scp or %2$sDiagnostics > Command Prompt%3$s.'), + $output_file, '<a href="/diag_command.php?dlPath=' . $output_file . '">', '</a>')); print_info_box(get_firewall_info(), 'info', false); diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php index fe15d06..0c53fc4 100644 --- a/src/usr/local/www/status_interfaces.php +++ b/src/usr/local/www/status_interfaces.php @@ -119,7 +119,7 @@ foreach ($ifdescrs as $ifdescr => $ifname): showDefBtn($ifinfo['pptplink'], 'PPTP', $ifinfo['pptplink'], $ifdescr, $ifinfo['pptplink'] == "up" ? gettext("Disconnect") : gettext("Connect"), ''); showDefBtn($ifinfo['l2tplink'], 'L2TP', $ifinfo['l2tplink'], $ifdescr, $ifinfo['l2tplink'] == "up" ? gettext("Disconnect") : gettext("Connect"), ''); showDefBtn($ifinfo['ppplink'], 'PPP', $ifinfo['ppplink'], $ifdescr, ($ifinfo['ppplink'] == "up" && !$ifinfo['nodevice']) ? gettext("Disconnect") : gettext("Connect"), ''); - showDef($ifinfo['ppp_uptime'] || $ifinfo['ppp_uptime_accumulated'], gettext("Uptime") . ' ' . ($ifinfo['ppp_uptime_accumulated'] ? '(historical)':''), $ifinfo['ppp_uptime'] . $ifinfo['ppp_uptime_accumulated']); + showDef($ifinfo['ppp_uptime'] || $ifinfo['ppp_uptime_accumulated'], gettext("Uptime") . ' ' . ($ifinfo['ppp_uptime_accumulated'] ? gettext('(historical)'):''), $ifinfo['ppp_uptime'] . $ifinfo['ppp_uptime_accumulated']); showDef($ifinfo['cell_rssi'], gettext("Cell Signal (RSSI)"), $ifinfo['cell_rssi']); showDef($ifinfo['cell_mode'], gettext("Cell Mode"), $ifinfo['cell_mode']); showDef($ifinfo['cell_simstate'], gettext("Cell SIM State"), $ifinfo['cell_simstate']); @@ -174,7 +174,7 @@ foreach ($ifdescrs as $ifdescr => $ifname): showDef(isset($ifinfo['collisions']), gettext("Collisions"), $ifinfo['collisions']); } // e-o-if ($ifinfo['status'] != "down") - showDef($ifinfo['bridge'], gettext('Bridge (') . $ifinfo['bridgeint'] . ')', $ifinfo['bridge']); + showDef($ifinfo['bridge'], sprintf(gettext('Bridge (%1$s)'), $ifinfo['bridgeint']), $ifinfo['bridge']); if (file_exists("/usr/bin/vmstat")) { $real_interface = ""; @@ -202,10 +202,10 @@ foreach ($ifdescrs as $ifdescr => $ifname): <?php endforeach; -print_info_box(gettext("Using dial-on-demand will bring the connection up again if any packet ". - "triggers it. To substantiate this point: disconnecting manually ". - "will <strong>not</strong> prevent dial-on-demand from making connections ". - "to the outside! Don't use dial-on-demand if the line ". - "is to be kept disconnected."), 'warning', false); +print_info_box(sprintf(gettext('Using dial-on-demand will bring the connection up again if any packet ' . + 'triggers it. To substantiate this point: disconnecting manually ' . + 'will %1$snot%2$s prevent dial-on-demand from making connections ' . + 'to the outside! Don\'t use dial-on-demand if the line ' . + 'is to be kept disconnected.'), '<strong>', '</strong>'), 'warning', false); include("foot.inc"); ?> diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index e7727a7..5d56213 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -211,7 +211,8 @@ function print_ipsec_body() { print(ucfirst(htmlspecialchars($ikesa['state']))); if ($ikesa['state'] == 'ESTABLISHED') { - print("<br/>" . htmlspecialchars($ikesa['established']) . gettext(" seconds (") . convert_seconds_to_dhms($ikesa['established']) . gettext(") ago")); + print("<br/>"); + printf(gettext('%1$s seconds (%2$s) ago'), htmlspecialchars($ikesa['established']), convert_seconds_to_dhms($ikesa['established'])); } print("</span>"); @@ -299,9 +300,11 @@ function print_ipsec_body() { print("</td>\n"); print("<td>\n"); - print(gettext("Rekey: ") . htmlspecialchars($childsa['rekey-time']) . gettext(" seconds (") . convert_seconds_to_dhms($childsa['rekey-time']) . ")"); - print('<br/>' . gettext('Life: ') . htmlspecialchars($childsa['life-time']) . gettext(" seconds (") . convert_seconds_to_dhms($childsa['life-time']) . ")"); - print('<br/>' . gettext('Install: ') .htmlspecialchars($childsa['install-time']) . gettext(" seconds (") . convert_seconds_to_dhms($childsa['install-time']) . ")"); + printf(gettext('Rekey: %1$s seconds (%2$s)'), htmlspecialchars($childsa['rekey-time']), convert_seconds_to_dhms($childsa['rekey-time'])); + print('<br/>'); + printf(gettext('Life: %1$s seconds (%2$s)'), htmlspecialchars($childsa['life-time']), convert_seconds_to_dhms($childsa['life-time'])); + print('<br/>'); + printf(gettext('Install: %1$s seconds (%2$s)'), htmlspecialchars($childsa['install-time']), convert_seconds_to_dhms($childsa['install-time'])); print("</td>\n"); diff --git a/src/usr/local/www/status_logs_common.inc b/src/usr/local/www/status_logs_common.inc index 88b9a3e..808bec4 100644 --- a/src/usr/local/www/status_logs_common.inc +++ b/src/usr/local/www/status_logs_common.inc @@ -779,7 +779,7 @@ function manage_log_section() { $form = new Form(false); $form->setAttribute('id', 'manage-log-form')->addClass('collapse ' . $panel_state); - $section = new Form_Section(gettext('Manage') . ' ' . gettext($allowed_logs[$logfile]["name"]) . ' ' . gettext('Log'), 'manage-log-panel', COLLAPSIBLE|$panel_body_state); + $section = new Form_Section(sprintf(gettext('Manage %1$s Log'), gettext($allowed_logs[$logfile]["name"])), 'manage-log-panel', COLLAPSIBLE|$panel_body_state); $section->addInput(new Form_StaticText( '', @@ -841,9 +841,9 @@ function manage_log_section() { $pconfig['logfilesize'], ['min' => 100000, 'placeholder' => $config['syslog']['logfilesize'] ? $config['syslog']['logfilesize'] : "511488"] ))->setWidth(2); - $group->setHelp("The log is held in a constant-size circular log file. This field controls how large the log file is, and thus how many entries may exist inside the log. The default is approximately 500KB." . - '<br /><br />' . - "NOTE: The log size is changed the next time it is cleared. To immediately change the log size, first save the options to set the size, then clear the log using the \"Clear Log\" action below. "); + $group->setHelp('The log is held in a constant-size circular log file. This field controls how large the log file is, and thus how many entries may exist inside the log. The default is approximately 500KB.%1$s' . + 'NOTE: The log size is changed the next time it is cleared. To immediately change the log size, first save the options to set the size, then clear the log using the "Clear Log" action below. ', + '<br /><br />'); $section->add($group); $group = new Form_Group('Formatted/Raw Display'); @@ -926,8 +926,9 @@ function manage_log_section() { '1' => gettext('Display as column'), '2' => gettext('Display as second row') ) - ))->setHelp('Show the applied rule description below or in the firewall log rows.' . '<br />' . - 'Displaying rule descriptions for all lines in the log might affect performance with large rule sets.'); + ))->setHelp('Show the applied rule description below or in the firewall log rows.%1$s' . + 'Displaying rule descriptions for all lines in the log might affect performance with large rule sets.', + '<br />'); } diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php index 80236b4..6b83565 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -329,7 +329,7 @@ events.push(function() { <?php print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' . gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR.' . '<br />' . - '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve', 'info', false); + '<i class="fa fa-minus-square-o icon-primary"></i> = ' . gettext('Add to block list') . ', <i class="fa fa-plus-square-o icon-primary"></i> = ' . gettext('Pass traffic') . ', <i class="fa fa-info icon-primary"></i> = ' . gettext('Resolve'), 'info', false); ?> </div> diff --git a/src/usr/local/www/status_logs_settings.php b/src/usr/local/www/status_logs_settings.php index f59c9c6..d431353 100644 --- a/src/usr/local/www/status_logs_settings.php +++ b/src/usr/local/www/status_logs_settings.php @@ -258,14 +258,14 @@ $section->addInput(new Form_Checkbox( 'Log firewall default blocks', 'Log packets matched from the default block rules in the ruleset', $pconfig['logdefaultblock'] -))->setHelp('Log packets that are <strong>blocked</strong> by the implicit default block rule. - Per-rule logging options are still respected.'); +))->setHelp('Log packets that are %1$sblocked%2$s by the implicit default block rule. - Per-rule logging options are still respected.', '<strong>', '</strong>'); $section->addInput(new Form_Checkbox( 'logdefaultpass', null, 'Log packets matched from the default pass rules put in the ruleset', $pconfig['logdefaultpass'] -))->setHelp('Log packets that are <strong>allowed</strong> by the implicit default pass rule. - Per-rule logging options are still respected. '); +))->setHelp('Log packets that are %1$sallowed%2$s by the implicit default pass rule. - Per-rule logging options are still respected. ', '<strong>', '</strong>'); $section->addInput(new Form_Checkbox( 'logbogons', @@ -311,8 +311,9 @@ $section->addInput(new Form_Select( '1' => gettext('Display as column'), '2' => gettext('Display as second row') ) -))->setHelp('Show the applied rule description below or in the firewall log rows.' . '<br />' . - 'Displaying rule descriptions for all lines in the log might affect performance with large rule sets.'); +))->setHelp('Show the applied rule description below or in the firewall log rows.%1$s' . + 'Displaying rule descriptions for all lines in the log might affect performance with large rule sets.', + '<br />'); $section->addInput(new Form_Checkbox( 'disablelocallogging', diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php index 8516ff0..4f9a73f 100644 --- a/src/usr/local/www/status_wireless.php +++ b/src/usr/local/www/status_wireless.php @@ -210,9 +210,9 @@ display_top_tabs($tab_array); </form> <div class="infoblock"> <?php -print_info_box(gettext('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode.<br />' . - '<b>Capabilities:</b> E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' . - 'S = Short preamble, s = Short slot time.'), 'info', false); +print_info_box(sprintf(gettext('%1$sFlags:%2$s A = authorized, E = Extended Rate (802.11g), P = Power saving mode.%3$s' . + '%1$sCapabilities:%2$s E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' . + 'S = Short preamble, s = Short slot time.'), '<b>', '</b>', '<br />'), 'info', false); ?> </div> <?php |