diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-22 08:38:50 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-22 08:38:50 -0500 |
commit | e693376db89ee9dbbe110a62dabb18b472e7bfcc (patch) | |
tree | b37e08c08a3267590e0363673874fa2475fd1a9e | |
parent | ee2a6908784f93f904ce603f0db8c96d5bd81140 (diff) | |
parent | 3bd74348f03714448996b0352ce7bb41fb2cc320 (diff) | |
download | pfsense-e693376db89ee9dbbe110a62dabb18b472e7bfcc.zip pfsense-e693376db89ee9dbbe110a62dabb18b472e7bfcc.tar.gz |
Merge pull request #2508 from brunostein/add_call_gettext_function
-rw-r--r-- | src/usr/local/www/status_captiveportal.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_filter_reload.php | 10 | ||||
-rw-r--r-- | src/usr/local/www/status_graph.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/status_graph_cpu.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_ipsec.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/status_ipsec_spd.php | 4 | ||||
-rw-r--r-- | src/usr/local/www/status_lb_pool.php | 12 | ||||
-rw-r--r-- | src/usr/local/www/status_lb_vs.php | 20 | ||||
-rwxr-xr-x | src/usr/local/www/status_logs.php | 24 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_common.inc | 4 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_filter_summary.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_vpn.php | 10 | ||||
-rw-r--r-- | src/usr/local/www/status_ntpd.php | 30 | ||||
-rw-r--r-- | src/usr/local/www/status_queues.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/status_rrd_graph.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/status_rrd_graph_img.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_rrd_graph_settings.php | 2 | ||||
-rwxr-xr-x | src/usr/local/www/status_services.php | 2 |
18 files changed, 74 insertions, 80 deletions
diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index c497ab8..d3adb88 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -259,7 +259,7 @@ else: <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div> <div class="panel-body"><br /> <?php - print_info_box(gettext("No captive portal zones have been configured. You may add new zones here: ") . '<a href="services_captiveportal_zones.php">' . 'Services->Captive portal' . '</a>'); + print_info_box(gettext("No captive portal zones have been configured. You may add new zones here: ") . '<a href="services_captiveportal_zones.php">' . gettext('Services->Captive portal') . '</a>'); ?> </div> </div> diff --git a/src/usr/local/www/status_filter_reload.php b/src/usr/local/www/status_filter_reload.php index 9a9596b..01255a1 100644 --- a/src/usr/local/www/status_filter_reload.php +++ b/src/usr/local/www/status_filter_reload.php @@ -91,7 +91,7 @@ include("head.inc"); <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">Filter Reload</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("Filter Reload");?></h2></div> <div class="panel-body"> <form action="status_filter_reload.php" method="post" name="filter"> <input type="submit" class="btn btn-success" value="Reload Filter" name="reloadfilter" id="reloadfilter" /> @@ -135,16 +135,16 @@ function update_data(obj) { if (result_text) { jQuery('#status').html(result_text + '...'); } else { - jQuery('#status').html('Obtaining filter status...'); + jQuery('#status').html('<?=gettext("Obtaining filter status...");?>'); } if (result_text == "Initializing") { - jQuery('#status').html('Initializing...'); + jQuery('#status').html('<?=gettext("Initializing...");?>'); } else if (result_text == "Done") { jQuery('#status').effect('highlight'); - jQuery('#status').html('Done. The filter rules have been reloaded.'); + jQuery('#status').html('<?=gettext("Done. The filter rules have been reloaded.");?>'); jQuery('#reloadinfo').css("visibility", "hidden"); jQuery('#doneurl').css("visibility", "visible"); - jQuery('#doneurl').html("<p><a href='status_queues.php'>Queue Status<\/a><\/p>"); + jQuery('#doneurl').html("<p><a href='status_queues.php'><?=gettext("Queue Status");?><\/a><\/p>"); } window.setTimeout('update_status_thread()', 2500); } diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php index 440b434..9f7b862 100644 --- a/src/usr/local/www/status_graph.php +++ b/src/usr/local/www/status_graph.php @@ -225,8 +225,8 @@ function updateBandwidth() { $('#top10-hosts').append('<tr>'+ '<td>'+ hostinfo[0] +'</td>'+ - '<td>'+ hostinfo[1] +' Bits/sec</td>'+ - '<td>'+ hostinfo[2] +' Bits/sec</td>'+ + '<td>'+ hostinfo[1] +' <?=gettext("Bits/sec");?></td>'+ + '<td>'+ hostinfo[2] +' <?=gettext("Bits/sec");?></td>'+ '</tr>'); } } @@ -255,7 +255,7 @@ if (ipsec_enabled()) { ?> <div class="panel panel-default"> <div class="panel-heading"> - <h2 class="panel-title">Traffic graph</h2> + <h2 class="panel-title"><?=gettext("Traffic graph");?></h2> </div> <div class="panel-body"> <div class="col-sm-6"> diff --git a/src/usr/local/www/status_graph_cpu.php b/src/usr/local/www/status_graph_cpu.php index 8533160..f37a332 100644 --- a/src/usr/local/www/status_graph_cpu.php +++ b/src/usr/local/www/status_graph_cpu.php @@ -71,7 +71,7 @@ $pgtitle = gettext("Status: CPU Graph"); ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">CPU Load graph</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("CPU Load graph");?></h2></div> <div class="panel-body text-center"> <embed src="graph_cpu.php" type="image/svg+xml" width="550" height="275" pluginspage="http://www.adobe.com/svg/viewer/install/auto" /> diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index 9b253e5..d029fe6 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -124,7 +124,7 @@ display_top_tabs($tab_array); ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">IPsec status</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("IPsec status");?></h2></div> <div class="panel-body table responsive"> <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable> <thead> @@ -197,7 +197,7 @@ if (is_array($status)) { $identity = ""; if (!empty($ikesa['remote-id'])) { if ($ikesa['remote-id'] == '%any') { - $identity = 'Any identifier'; + $identity = htmlspecialchars(gettext('Any identifier')); } else { $identity = htmlspecialchars($ikesa['remote']['identification']); } @@ -274,13 +274,13 @@ if (is_array($status)) { <?php if ($ikesa['state'] != 'ESTABLISHED') { ?> - <a href="status_ipsec.php?act=connect&ikeid=<?=$con_id; ?>" class="btn btn-xs btn-success" data-toggle="tooltip" title="Connect VPN" > + <a href="status_ipsec.php?act=connect&ikeid=<?=$con_id; ?>" class="btn btn-xs btn-success" data-toggle="tooltip" title="<?=gettext("Connect VPN");?>" > <?=gettext("Connect VPN")?> </a> <?php } else { ?> - <a href="status_ipsec.php?act=ikedisconnect&ikeid=<?=$con_id; ?>" class="btn btn-xs btn-danger" data-toggle="tooltip" title="Disconnect VPN"> + <a href="status_ipsec.php?act=ikedisconnect&ikeid=<?=$con_id; ?>" class="btn btn-xs btn-danger" data-toggle="tooltip" title="<?=gettext("Disconnect VPN");?>"> <?=gettext("Disconnect")?> </a><br /> <?php diff --git a/src/usr/local/www/status_ipsec_spd.php b/src/usr/local/www/status_ipsec_spd.php index 56a9acf..34a8619 100644 --- a/src/usr/local/www/status_ipsec_spd.php +++ b/src/usr/local/www/status_ipsec_spd.php @@ -100,9 +100,9 @@ if (count($spd)) { <?php foreach ($spd as $sp) { if ($sp['dir'] == 'in') { - $dirstr = LEFTARROW . ' Inbound'; + $dirstr = LEFTARROW . gettext(' Inbound'); } else { - $dirstr = RIGHTARROW . ' Outbound'; + $dirstr = RIGHTARROW . gettext(' Outbound'); } ?> <tr> diff --git a/src/usr/local/www/status_lb_pool.php b/src/usr/local/www/status_lb_pool.php index d9917f8..f647c90 100644 --- a/src/usr/local/www/status_lb_pool.php +++ b/src/usr/local/www/status_lb_pool.php @@ -140,12 +140,12 @@ if ($_POST) { } mark_subsystem_dirty('loadbalancer'); - write_config("Updated load balancer pools via status screen."); + write_config(gettext("Updated load balancer pools via status screen.")); } } if (is_subsystem_dirty('loadbalancer')) { - print_info_box_np('The load balancer configuration has been changed You must apply the changes in order for them to take effect.'); + print_info_box_np(gettext('The load balancer configuration has been changed You must apply the changes in order for them to take effect.')); } /* active tabs */ @@ -159,7 +159,7 @@ $rowsprinted = 0; <form action="status_lb_pool.php" method="post"> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">Load Balancer Pools</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("Load Balancer Pools");?></h2></div> <div class="panel-body table-responsive"> <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> <thead> @@ -184,13 +184,13 @@ foreach ($a_pool as $pool): <?php switch ($pool['mode']) { case "loadbalance": - echo "Load balancing"; + echo gettext("Load balancing"); break; case "failover": - echo "Manual failover"; + echo gettext("Manual failover"); break; default: - echo "(default)"; + echo gettext("(default)"); } ?> </td> diff --git a/src/usr/local/www/status_lb_vs.php b/src/usr/local/www/status_lb_vs.php index 4bfe8c3..fb7849f 100644 --- a/src/usr/local/www/status_lb_vs.php +++ b/src/usr/local/www/status_lb_vs.php @@ -91,7 +91,7 @@ $tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php"); display_top_tabs($tab_array); if (empty($a_vs)) { - print('<div class="alert alert-danger">No load balancers have been configured!</div>'); + print('<div class="alert alert-danger">' . gettext("No load balancers have been configured!") . '</div>'); } else { ?> <div class="table-responsive"></div> @@ -133,15 +133,15 @@ if (empty($a_vs)) { switch (trim($rdr_a[$vsent['name']]['status'])) { case 'active': $bgcolor = LIGHTGREEN; - $rdr_a[$vsent['name']]['status'] = "Active"; + $rdr_a[$vsent['name']]['status'] = gettext("Active"); break; case 'down': $bgcolor = LIGHTCORAL; - $rdr_a[$vsent['name']]['status'] = "Down"; + $rdr_a[$vsent['name']]['status'] = gettext("Down"); break; default: $bgcolor = LIGHTGRAY; - $rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?'; + $rdr_a[$vsent['name']]['status'] = gettext('Unknown - relayd not running?'); } if (!COLOR) { @@ -153,19 +153,13 @@ if (empty($a_vs)) { <?php if (!empty($rdr_a[$vsent['name']]['total'])) { -?> - Total Sessions: <?=$rdr_a[$vsent['name']]['total']?><br>/> -<?php + echo sprintf(gettext("Total Sessions: %s"), $rdr_a[$vsent['name']]['total'] . "<br />"); } if (!empty($rdr_a[$vsent['name']]['last'])) { -?> - Last: <?=$rdr_a[$vsent['name']]['last']?><br>/> -<?php + echo sprintf(gettext("Last: %s"), $rdr_a[$vsent['name']]['last'] . "<br />"); } if (!empty($rdr_a[$vsent['name']]['average'])) { -?> - Average: <?=$rdr_a[$vsent['name']]['average']?> -<?php + echo sprintf(gettext("Average: %s"), $rdr_a[$vsent['name']]['average']); } ?> </td> diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index 35e969e..5fb1da1 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -71,29 +71,29 @@ Build a list of allowed log files so we can reject others to prevent the page from acting on unauthorized files. */ $allowed_logs = array( - "system" => array("name" => "General", + "system" => array("name" => gettext("General"), "shortcut" => ""), - "dhcpd" => array("name" => "DHCP", + "dhcpd" => array("name" => gettext("DHCP"), "shortcut" => "dhcp"), - "portalauth" => array("name" => "Captive Portal Authentication", + "portalauth" => array("name" => gettext("Captive Portal Authentication"), "shortcut" => "captiveportal"), - "ipsec" => array("name" => "IPsec", + "ipsec" => array("name" => gettext("IPsec"), "shortcut" => "ipsec"), - "ppp" => array("name" => "PPP", + "ppp" => array("name" => gettext("PPP"), "shortcut" => ""), - "relayd" => array("name" => "Load Balancer", + "relayd" => array("name" => gettext("Load Balancer"), "shortcut" => "relayd"), - "openvpn" => array("name" => "OpenVPN", + "openvpn" => array("name" => gettext("OpenVPN"), "shortcut" => "openvpn"), - "ntpd" => array("name" => "NTPd", + "ntpd" => array("name" => gettext("NTPd"), "shortcut" => "ntp"), - "gateways" => array("name" => "Gateways", + "gateways" => array("name" => gettext("Gateways"), "shortcut" => "gateways"), - "routing" => array("name" => "Routing", + "routing" => array("name" => gettext("Routing"), "shortcut" => "routing"), - "resolver" => array("name" => "DNS Resolver", + "resolver" => array("name" => gettext("DNS Resolver"), "shortcut" => "resolver"), - "wireless" => array("name" => "Wireless", + "wireless" => array("name" => gettext("Wireless"), "shortcut" => "wireless"), ); diff --git a/src/usr/local/www/status_logs_common.inc b/src/usr/local/www/status_logs_common.inc index 99610da..efeeaf5 100644 --- a/src/usr/local/www/status_logs_common.inc +++ b/src/usr/local/www/status_logs_common.inc @@ -682,12 +682,12 @@ function manage_log_code() { // If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync). if ($logging_changed) { - write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false); + write_config($desc = gettext("Log Display Settings Saved: ") . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false); $retval = 0; $retval = system_syslogd_start(); $savemsg = gettext("The changes have been applied successfully."); } else { - write_config($desc = "Log Display Settings Saved (no backup, no sync): " . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true); + write_config($desc = gettext("Log Display Settings Saved (no backup, no sync): ") . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true); $savemsg = ''; } diff --git a/src/usr/local/www/status_logs_filter_summary.php b/src/usr/local/www/status_logs_filter_summary.php index 416bcd8..efa7d15 100644 --- a/src/usr/local/www/status_logs_filter_summary.php +++ b/src/usr/local/www/status_logs_filter_summary.php @@ -209,7 +209,7 @@ function stat_block($summary, $stat, $num) { $numentries++; $outstr = $k[$i]; if (is_ipaddr($outstr)) { - print('<tr><td>' . $outstr . '</td>' . '<td>' . $summary[$stat][$k[$i]] . '</td><td><a href="diag_dns.php?host=' . $outstr . '" class="btn btn-xs btn-success" title="' . gettext("Reverse Resolve with DNS") . '">Lookup</a></td></tr>'); + print('<tr><td>' . $outstr . '</td>' . '<td>' . $summary[$stat][$k[$i]] . '</td><td><a href="diag_dns.php?host=' . $outstr . '" class="btn btn-xs btn-success" title="' . gettext("Reverse Resolve with DNS") . '">' . gettext("Lookup") . '</a></td></tr>'); } elseif (substr_count($outstr, '/') == 1) { list($proto, $port) = explode('/', $outstr); diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php index cce15dd..111e00a 100644 --- a/src/usr/local/www/status_logs_vpn.php +++ b/src/usr/local/www/status_logs_vpn.php @@ -72,11 +72,11 @@ Build a list of allowed log files so we can reject others to prevent the page from acting on unauthorized files. */ $allowed_logs = array( - "vpn" => array("name" => "VPN Logins", + "vpn" => array("name" => gettext("VPN Logins"), "shortcut" => "poes"), - "poes" => array("name" => "PPPoE Service", + "poes" => array("name" => gettext("PPPoE Service"), "shortcut" => "pppoes"), - "l2tps" => array("name" => "L2TP Service", + "l2tps" => array("name" => gettext("L2TP Service"), "shortcut" => "l2tps"), ); @@ -94,8 +94,8 @@ if (!$_GET['logfile']) { } } -if ($vpntype == 'poes') { $allowed_logs['vpn']['name'] = "PPPoE Logins"; } -if ($vpntype == 'l2tp') { $allowed_logs['vpn']['name'] = "L2TP Logins"; } +if ($vpntype == 'poes') { $allowed_logs['vpn']['name'] = gettext("PPPoE Logins"); } +if ($vpntype == 'l2tp') { $allowed_logs['vpn']['name'] = gettext("L2TP Logins"); } // Log Filter Submit - VPN diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php index c231908..f887c53 100644 --- a/src/usr/local/www/status_ntpd.php +++ b/src/usr/local/www/status_ntpd.php @@ -81,28 +81,28 @@ if (!isset($config['ntpd']['noquery'])) { switch (substr($line, 0, 1)) { case " ": - $server['status'] = "Unreach/Pending"; + $server['status'] = gettext("Unreach/Pending"); break; case "*": - $server['status'] = "Active Peer"; + $server['status'] = gettext("Active Peer"); break; case "+": - $server['status'] = "Candidate"; + $server['status'] = gettext("Candidate"); break; case "o": - $server['status'] = "PPS Peer"; + $server['status'] = gettext("PPS Peer"); break; case "#": - $server['status'] = "Selected"; + $server['status'] = gettext("Selected"); break; case ".": - $server['status'] = "Excess Peer"; + $server['status'] = gettext("Excess Peer"); break; case "x": - $server['status'] = "False Ticker"; + $server['status'] = gettext("False Ticker"); break; case "-": - $server['status'] = "Outlier"; + $server['status'] = gettext("Outlier"); break; } @@ -190,7 +190,7 @@ include("head.inc"); ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">Network Time Protocol Status</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("Network Time Protocol Status");?></h2></div> <div class="panel-body"> <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> <thead> @@ -212,13 +212,13 @@ include("head.inc"); <?php if (isset($config['ntpd']['noquery'])): ?> <tr> <td class="warning" colspan="11"> - Statistics unavailable because ntpq and ntpdc queries are disabled in the <a href="services_ntpd.php">NTP service settings</a>. + <?=sprintf(gettext("Statistics unavailable because ntpq and ntpdc queries are disabled in the %sNTP service settings%s"), '<a href="services_ntpd.php">', '</a>');?> </td> </tr> <?php elseif (count($ntpq_servers) == 0): ?> <tr> <td class="warning" colspan="11"> - No peers found, <a href="status_services.php">is the ntp service running?</a> + <?=sprintf(gettext("No peers found, %sis the ntp service running?%s"), '<a href="status_services.php">', '</a>');?> </td> </tr> <?php else: @@ -255,7 +255,7 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)): $gps_goo_lnk = 2; ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title">GPS information</h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("GPS information");?></h2></div> <div class="panel-body"> <table class="table table-striped table-hover table-condensed"> <thead> @@ -300,21 +300,21 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)): if (isset($gps_sat) || isset($gps_satview)) { ?> <td class="text-center"> <?php if (isset($gps_satview)) { - print('in view ' . intval($gps_satview)); + print(gettext('in view ') . intval($gps_satview)); } if (isset($gps_sat) && isset($gps_satview)) { print(', '); } if (isset($gps_sat)) { - print('in use ' . $gps_sat); + print(gettext('in use ') . $gps_sat); } ?> </td> <?php } ?> </tr> <tr> - <td colspan="<?=$gps_goo_lnk; ?>"><a target="_gmaps" href="http://maps.google.com/?q=<?=$gps_lat; ?>,<?=$gps_lon; ?>">Google Maps Link</a></td> + <td colspan="<?=$gps_goo_lnk; ?>"><a target="_gmaps" href="http://maps.google.com/?q=<?=$gps_lat; ?>,<?=$gps_lon; ?>"><?=gettext("Google Maps Link");?></a></td> </tr> </tbody> </table> diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index b1c0815..9568b75 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -84,7 +84,7 @@ if (!file_exists("{$g['varrun_path']}/qstats.pid") || !isvalidpid("{$g['varrun_p } $fd = @fsockopen("unix://{$g['varrun_path']}/qstats"); if (!$fd) { - $error = "Something wrong happened during communication with stat gathering"; + $error = gettext("Something wrong happened during communication with stat gathering"); } else { $stats = ""; while (!feof($fd)) { @@ -94,7 +94,7 @@ if (!$fd) { @file_put_contents("{$g['tmp_path']}/qstats", $stats); $altqstats = @parse_xml_config("{$g['tmp_path']}/qstats", array("altqstats")); if ($altqstats == -1) { - $error = "No queue statistics could be read."; + $error = gettext("No queue statistics could be read."); } } if ($_REQUEST['getactivity']) { @@ -191,8 +191,8 @@ else: ?> <th><?=gettext("Queue"); ?></th> <th><?=gettext("Statistics"); ?> <select id="selStatistic" class="form-control"> - <option value="0">PPS</option> - <option value="1">Bandwidth</option> + <option value="0"><?=gettext("PPS");?></option> + <option value="1"><?=gettext("Bandwidth");?></option> </select> </th> <th><?=gettext("PPS"); ?></th> diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php index 2bea2c7..4e2eb94 100644 --- a/src/usr/local/www/status_rrd_graph.php +++ b/src/usr/local/www/status_rrd_graph.php @@ -230,7 +230,7 @@ if (is_numeric($_GET['end'])) { /* this should never happen */ if ($end < $start) { - log_error("start $start is smaller than end $end"); + log_error(sprintf(gettext("start %d is smaller than end %d"), $start, $end)); $end = $now; } @@ -299,7 +299,7 @@ $graph_length = array( switch ($curcat) { case "vpnusers": - $curcattext = "VPN Users"; + $curcattext = gettext("VPN Users"); break; default: $curcattext = ucfirst($curcat); @@ -622,7 +622,7 @@ if ($curcat == 'custom') { $id = preg_replace('/\./', '_', $id); ?> <div class="panel panel-default"> - <img class="img-responsive center-block" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&end=<?=$end?>&database=<?=$curdatabase?>&style=<?=$curstyle?>&graph=<?=$graph?>" /> + <img class="img-responsive center-block" id="<?=$id?>" alt="<?=$prettydb?> <?=gettext("Graph");?>" src="status_rrd_graph_img.php?start=<?=$start?>&end=<?=$end?>&database=<?=$curdatabase?>&style=<?=$curstyle?>&graph=<?=$graph?>" /> </div> <?php diff --git a/src/usr/local/www/status_rrd_graph_img.php b/src/usr/local/www/status_rrd_graph_img.php index 9d203c3..39ca1a6 100644 --- a/src/usr/local/www/status_rrd_graph_img.php +++ b/src/usr/local/www/status_rrd_graph_img.php @@ -101,7 +101,7 @@ if (is_numeric($_GET['end'])) { /* this should never happen */ if ($end < $start) { - log_error("start $start is smaller than end $end"); + log_error(sprintf(gettext("start %d is smaller than end %d"), $start, $end)); $end = $now; } diff --git a/src/usr/local/www/status_rrd_graph_settings.php b/src/usr/local/www/status_rrd_graph_settings.php index 7262c98..ecb0490 100644 --- a/src/usr/local/www/status_rrd_graph_settings.php +++ b/src/usr/local/www/status_rrd_graph_settings.php @@ -92,7 +92,7 @@ $periods = array("absolute" => gettext("Absolute Timespans"), if ($_POST['ResetRRD']) { mwexec('/bin/rm /var/db/rrd/*'); enable_rrd_graphing(); - $savemsg = "RRD data has been cleared. New RRD files have been generated."; + $savemsg = gettext("RRD data has been cleared. New RRD files have been generated."); } elseif ($_POST) { unset($input_errors); $pconfig = $_POST; diff --git a/src/usr/local/www/status_services.php b/src/usr/local/www/status_services.php index 905057a..6f7cbb0 100755 --- a/src/usr/local/www/status_services.php +++ b/src/usr/local/www/status_services.php @@ -165,7 +165,7 @@ if (count($services) > 0) { } ?> <td> - <?=$running ? '<span class="text-success">Running</span>':'<span class="text-danger">Stopped</span>'?> + <?=$running ? '<span class="text-success">' . gettext("Running") . '</span>':'<span class="text-danger">' . gettext("Stopped") . '</span>'?> </td> <td> <?=get_service_control_links($service)?> |