diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-22 14:53:29 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-22 14:53:29 +0545 |
commit | 04b42040a63a552af02148e26d3a50d0eb7bffaa (patch) | |
tree | e0a893d38f6a0c1520f10c96c33fe400ae3f88a4 /src/usr | |
parent | 7c36b00f1d15f0496983e6e3f528b963111cc505 (diff) | |
download | pfsense-04b42040a63a552af02148e26d3a50d0eb7bffaa.zip pfsense-04b42040a63a552af02148e26d3a50d0eb7bffaa.tar.gz |
Internationalize dashboard widgets
Diffstat (limited to 'src/usr')
36 files changed, 154 insertions, 147 deletions
diff --git a/src/usr/local/www/widgets/include/captiveportal.inc b/src/usr/local/www/widgets/include/captiveportal.inc index 3714209..8a2ea3e 100644 --- a/src/usr/local/www/widgets/include/captiveportal.inc +++ b/src/usr/local/www/widgets/include/captiveportal.inc @@ -1,4 +1,4 @@ <?php -$captive_portal_status_title = "Captive Portal Status"; +$captive_portal_status_title = gettext("Captive Portal Status"); $captive_portal_status_title_link = "status_captiveportal.php"; ?> diff --git a/src/usr/local/www/widgets/include/carp_status.inc b/src/usr/local/www/widgets/include/carp_status.inc index 63a49fe..29a05ac 100644 --- a/src/usr/local/www/widgets/include/carp_status.inc +++ b/src/usr/local/www/widgets/include/carp_status.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$carp_status_title = "CARP Status"; +$carp_status_title = gettext("CARP Status"); $carp_status_title_link = "status_carp.php"; ?> diff --git a/src/usr/local/www/widgets/include/dyn_dns_status.inc b/src/usr/local/www/widgets/include/dyn_dns_status.inc index b2588db..314bb13 100644 --- a/src/usr/local/www/widgets/include/dyn_dns_status.inc +++ b/src/usr/local/www/widgets/include/dyn_dns_status.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$dyn_dns_status_title = "Dynamic DNS Status"; +$dyn_dns_status_title = gettext("Dynamic DNS Status"); $dyn_dns_status_title_link = "services_dyndns.php"; ?> diff --git a/src/usr/local/www/widgets/include/gateways.inc b/src/usr/local/www/widgets/include/gateways.inc index 4666689..971c842 100644 --- a/src/usr/local/www/widgets/include/gateways.inc +++ b/src/usr/local/www/widgets/include/gateways.inc @@ -1,5 +1,5 @@ <?php //set variable for custom title -$gateways_title = "Gateways"; +$gateways_title = gettext("Gateways"); $gateways_title_link = "status_gateways.php"; ?> diff --git a/src/usr/local/www/widgets/include/gmirror_status.inc b/src/usr/local/www/widgets/include/gmirror_status.inc index 6547d4d..c9b2224 100644 --- a/src/usr/local/www/widgets/include/gmirror_status.inc +++ b/src/usr/local/www/widgets/include/gmirror_status.inc @@ -1,4 +1,4 @@ <?php -$gmirror_status_title = "GEOM Mirror Status"; +$gmirror_status_title = gettext("GEOM Mirror Status"); $gmirror_status_title_link = "diag_gmirror.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/installed_packages.inc b/src/usr/local/www/widgets/include/installed_packages.inc index a978191..aa75e85 100644 --- a/src/usr/local/www/widgets/include/installed_packages.inc +++ b/src/usr/local/www/widgets/include/installed_packages.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$installed_packages_title = "Installed Packages"; +$installed_packages_title = gettext("Installed Packages"); $installed_packages_title_link = "pkg_mgr_installed.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/interface_statistics.inc b/src/usr/local/www/widgets/include/interface_statistics.inc index c789418..bda7aba 100644 --- a/src/usr/local/www/widgets/include/interface_statistics.inc +++ b/src/usr/local/www/widgets/include/interface_statistics.inc @@ -1,5 +1,5 @@ <?php //set variable for custom title -$interface_statistics_title = "Interface Statistics"; +$interface_statistics_title = gettext("Interface Statistics"); $interface_statistics_title_link = "status_interfaces.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/interfaces.inc b/src/usr/local/www/widgets/include/interfaces.inc index 6c19a6b..d619d23 100644 --- a/src/usr/local/www/widgets/include/interfaces.inc +++ b/src/usr/local/www/widgets/include/interfaces.inc @@ -1,6 +1,6 @@ <?php //set variable for custom title -$interfaces_title = "Interfaces"; +$interfaces_title = gettext("Interfaces"); $interfaces_title_link = "status_interfaces.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/ipsec.inc b/src/usr/local/www/widgets/include/ipsec.inc index 59fe454..0c8ba80 100644 --- a/src/usr/local/www/widgets/include/ipsec.inc +++ b/src/usr/local/www/widgets/include/ipsec.inc @@ -1,4 +1,4 @@ <?php -$ipsec_title = "IPsec"; +$ipsec_title = gettext("IPsec"); $ipsec_title_link = "status_ipsec.php"; ?> diff --git a/src/usr/local/www/widgets/include/load_balancer.inc b/src/usr/local/www/widgets/include/load_balancer.inc index 367ea46..5f89933 100644 --- a/src/usr/local/www/widgets/include/load_balancer.inc +++ b/src/usr/local/www/widgets/include/load_balancer.inc @@ -1,4 +1,4 @@ <?php -$load_balancer_status_title = "Load Balancer Status"; +$load_balancer_status_title = gettext("Load Balancer Status"); $load_balancer_status_title_link = "status_lb_pool.php"; ?> diff --git a/src/usr/local/www/widgets/include/log.inc b/src/usr/local/www/widgets/include/log.inc index d2bafb0..fa48047 100644 --- a/src/usr/local/www/widgets/include/log.inc +++ b/src/usr/local/www/widgets/include/log.inc @@ -1,6 +1,6 @@ <?php //set variable for custom title -$log_title = "Firewall Logs"; +$log_title = gettext("Firewall Logs"); $log_title_link = "status_logs_filter.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/ntp_status.inc b/src/usr/local/www/widgets/include/ntp_status.inc index 1115095..cb5be1a 100644 --- a/src/usr/local/www/widgets/include/ntp_status.inc +++ b/src/usr/local/www/widgets/include/ntp_status.inc @@ -1,5 +1,5 @@ <?php //set variable for custom title -$ntp_status_title = "NTP Status"; +$ntp_status_title = gettext("NTP Status"); $ntp_status_title_link = "status_ntpd.php"; ?> diff --git a/src/usr/local/www/widgets/include/openvpn.inc b/src/usr/local/www/widgets/include/openvpn.inc index 075d0e5..8eb11c1 100644 --- a/src/usr/local/www/widgets/include/openvpn.inc +++ b/src/usr/local/www/widgets/include/openvpn.inc @@ -1,4 +1,4 @@ <?php -$openvpn_title = "OpenVPN"; +$openvpn_title = gettext("OpenVPN"); $openvpn_title_link = "status_openvpn.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/services_status.inc b/src/usr/local/www/widgets/include/services_status.inc index 685aee4..6691d42 100644 --- a/src/usr/local/www/widgets/include/services_status.inc +++ b/src/usr/local/www/widgets/include/services_status.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$services_status_title = "Services Status"; +$services_status_title = gettext("Services Status"); $services_status_title_link = "status_services.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/include/smart_status.inc b/src/usr/local/www/widgets/include/smart_status.inc index bbfa274..cfcb9a9 100644 --- a/src/usr/local/www/widgets/include/smart_status.inc +++ b/src/usr/local/www/widgets/include/smart_status.inc @@ -1,5 +1,5 @@ <?php //set variable for custom title -$smart_status_title = "SMART Status"; +$smart_status_title = gettext("SMART Status"); $smart_status_title_link = "diag_smart.php"; ?> diff --git a/src/usr/local/www/widgets/include/thermal_sensors.inc b/src/usr/local/www/widgets/include/thermal_sensors.inc index e6ddb58..6ec2141 100644 --- a/src/usr/local/www/widgets/include/thermal_sensors.inc +++ b/src/usr/local/www/widgets/include/thermal_sensors.inc @@ -11,7 +11,7 @@ */ //set variable for custom title -$thermal_sensors_widget_title = "Thermal Sensors"; +$thermal_sensors_widget_title = gettext("Thermal Sensors"); //$thermal_sensors_widget_link = "thermal_sensors.php"; diff --git a/src/usr/local/www/widgets/include/traffic_graph.inc b/src/usr/local/www/widgets/include/traffic_graph.inc index 3901db6..76da208 100644 --- a/src/usr/local/www/widgets/include/traffic_graph.inc +++ b/src/usr/local/www/widgets/include/traffic_graph.inc @@ -1,4 +1,4 @@ <?php -$traffic_graphs_title = "Traffic Graphs"; +$traffic_graphs_title = gettext("Traffic Graphs"); $traffic_graphs_title_link = "status_graph.php"; ?> diff --git a/src/usr/local/www/widgets/include/wake_on_lan.inc b/src/usr/local/www/widgets/include/wake_on_lan.inc index af3229c..accab90 100644 --- a/src/usr/local/www/widgets/include/wake_on_lan.inc +++ b/src/usr/local/www/widgets/include/wake_on_lan.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$wake_on_lan_title = "Wake On Lan"; +$wake_on_lan_title = gettext("Wake On Lan"); $wake_on_lan_title_link = "services_wol.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php index c325b54..c91d1c0 100644 --- a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php +++ b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php @@ -130,8 +130,8 @@ if ($_GET['order']) { <table class="table table-condensed sortable-theme-bootstrap" data-sortable> <thead> <tr> - <th><a href="?order=ip&showact=<?=$showact;?>">IP address</a></th> - <th><a href="?order=mac&showact=<?=$showact;?>">MAC address</a></th> + <th><a href="?order=ip&showact=<?=$showact;?>"><?=gettext("IP address");?></a></th> + <th><a href="?order=mac&showact=<?=$showact;?>"><?=gettext("MAC address");?></a></th> <th><a href="?order=user&showact=<?=$showact;?>"><?=gettext("Username");?></a></th> <?php if ($showact == 1): ?> <th><a href="?order=start&showact=<?=$showact;?>"><?=gettext("Session start");?></a></th> @@ -151,7 +151,7 @@ if ($_GET['order']) { <?php endif; ?> <td> <a href="?order=<?=htmlspecialchars($_GET['order']);?>&showact=<?=$showact;?>&act=del&zone=<?=$cpent[10];?>&id=<?=$cpent[5];?>" class="btn btn-xs btn-danger"> - delete + <?=gettext("delete");?> </a> </td> </tr> diff --git a/src/usr/local/www/widgets/widgets/carp_status.widget.php b/src/usr/local/www/widgets/widgets/carp_status.widget.php index 8884e2b..2349ede 100644 --- a/src/usr/local/www/widgets/widgets/carp_status.widget.php +++ b/src/usr/local/www/widgets/widgets/carp_status.widget.php @@ -114,7 +114,7 @@ $carp_enabled = get_carp_status(); } } else { ?> - <tr><td>No CARP Interfaces Defined. Click <a href="status_carp.php">here</a> to configure CARP.</td></tr> + <tr><td><?=gettext('No CARP Interfaces Defined.')?> <?=sprintf(gettext('Click %1$shere%2$s to configure CARP.'), '<a href="status_carp.php">', '</a>')?></td></tr> <?php } ?> diff --git a/src/usr/local/www/widgets/widgets/gateways.widget.php b/src/usr/local/www/widgets/widgets/gateways.widget.php index 16cd219..ccb47ea 100644 --- a/src/usr/local/www/widgets/widgets/gateways.widget.php +++ b/src/usr/local/www/widgets/widgets/gateways.widget.php @@ -77,7 +77,7 @@ if ($_POST) { if (isset($_POST["display_type"])) { $config["widgets"]["gateways_widget"]["display_type"] = $_POST["display_type"]; } - write_config("Updated gateways widget settings via dashboard."); + write_config(gettext("Updated gateways widget settings via dashboard.")); header("Location: /"); exit(0); } @@ -130,11 +130,11 @@ if ($_POST) { } } ?> - <input name="display_type" class="radio" type="radio" id="display_type_gw_ip" value="gw_ip" <?=$display_type_gw_ip;?> onchange="updateGatewayDisplays();" /> <span>Gateway IP</span> - <input name="display_type" class="radio" type="radio" id="display_type_monitor_ip" value="monitor_ip" <?=$display_type_monitor_ip;?> onchange="updateGatewayDisplays();" /> <span>Monitor IP</span> - <input name="display_type" class="radio" type="radio" id="display_type_both_ip" value="both_ip" <?=$display_type_both_ip;?> onchange="updateGatewayDisplays();" /> <span>Both</span> + <input name="display_type" class="radio" type="radio" id="display_type_gw_ip" value="gw_ip" <?=$display_type_gw_ip;?> onchange="updateGatewayDisplays();" /> <span><?=gettext('Gateway IP')?></span> + <input name="display_type" class="radio" type="radio" id="display_type_monitor_ip" value="monitor_ip" <?=$display_type_monitor_ip;?> onchange="updateGatewayDisplays();" /> <span><?=gettext('Monitor IP')?></span> + <input name="display_type" class="radio" type="radio" id="display_type_both_ip" value="both_ip" <?=$display_type_both_ip;?> onchange="updateGatewayDisplays();" /> <span><?=gettext('Both')?></span> <br /><br /> - <input id="submit_settings" name="submit_settings" type="submit" onclick="return updatePref();" class="formbtn" value="Save Settings" /> + <input id="submit_settings" name="submit_settings" type="submit" onclick="return updatePref();" class="formbtn" value="<?=gettext('Save Settings')?>" /> </form> </div> @@ -232,22 +232,22 @@ function compose_table_body_contents() { if ($gateways_status[$gname]) { if (stristr($gateways_status[$gname]['status'], "force_down")) { - $online = "Offline (forced)"; + $online = gettext("Offline (forced)"); $bgcolor = "danger"; // lightcoral } elseif (stristr($gateways_status[$gname]['status'], "down")) { - $online = "Offline"; + $online = gettext("Offline"); $bgcolor = "danger"; // lightcoral } elseif (stristr($gateways_status[$gname]['status'], "loss")) { - $online = "Packetloss"; + $online = gettext("Packetloss"); $bgcolor = "warning"; // khaki } elseif (stristr($gateways_status[$gname]['status'], "delay")) { - $online = "Latency"; + $online = gettext("Latency"); $bgcolor = "warning"; // khaki } elseif ($gateways_status[$gname]['status'] == "none") { - $online = "Online"; + $online = gettext("Online"); $bgcolor = "success"; // lightgreen } elseif ($gateways_status[$gname]['status'] == "") { - $online = "Pending"; + $online = gettext("Pending"); $bgcolor = "info"; // lightgray } } else { diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php index 255212a..dca7c0d 100644 --- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php +++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php @@ -74,8 +74,8 @@ if ($_REQUEST && $_REQUEST['ajax']) { if (empty($installed_packages)) { print("<div class=\"alert alert-warning\" role=\"alert\">\n"); - print(" <strong>No packages installed.</strong>\n"); - print(" You can install packages <a href=\"pkg_mgr.php\" class=\"alert-link\">here</a>.\n"); + print(" <strong>". gettext("No packages installed.") . "</strong>\n"); + print(" " . gettext('You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>.') . "\n"); print("</div>\n"); exit; } @@ -103,17 +103,17 @@ if ($_REQUEST && $_REQUEST['ajax']) { if (isset($pkg['broken'])) { $txtcolor = "text-danger"; $missing = true; - $status = 'Package is configured, but not installed!'; + $status = gettext('Package is configured, but not installed!'); } else if (isset($pkg['installed_version']) && isset($pkg['version'])) { $version_compare = pkg_version_compare( $pkg['installed_version'], $pkg['version']); if ($version_compare == '>') { // we're running a newer version of the package - $status = 'Newer than available ('. $pkg['version'] .')'; + $status = sprintf(gettext('Newer than available (%s)'), $pkg['version']); $statusicon = 'exclamation'; } else if ($version_compare == '<') { // we're running an older version of the package - $status = 'Upgrade available to '.$pkg['version']; + $status = sprintf(gettext('Upgrade available to %s'), $pkg['version']); $statusicon = 'plus-circle'; $txtcolor = "text-warning"; $upgradeavail = true; @@ -121,15 +121,15 @@ if ($_REQUEST && $_REQUEST['ajax']) { '&to=' . $pkg['version']; } else if ($version_compare == '=') { // we're running the current version - $status = 'ok'; + $status = gettext('ok'); $statusicon = 'check'; } else { - $status = 'Error comparing version'; + $status = gettext('Error comparing version'); $statusicon = 'exclamation'; } } else { // unknown available package version - $status = 'Unknown'; + $status = gettext('Unknown'); $statusicon = 'question'; } @@ -180,7 +180,7 @@ if ($_REQUEST && $_REQUEST['ajax']) { </div> <p class="text-center"> - <?=gettext("Packages may be added/managed here: ")?> <a href="pkg_mgr_installed.php">System -> Packages</a> + <?=gettext("Packages may be added/managed here: ")?> <a href="pkg_mgr_installed.php"><?=gettext("System")?> -> <?=gettext("Packages")?></a> </p> <script type="text/javascript"> diff --git a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php index 5b0fe02..8de8595 100644 --- a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php +++ b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php @@ -70,13 +70,13 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); if ($_REQUEST && $_REQUEST['ajax']) { $rows = array( - 'inpkts' => 'Packets In', - 'outpkts' => 'Packets Out', - 'inbytes' => 'Bytes In', - 'outbytes' => 'Bytes Out', - 'inerrs' => 'Errors In', - 'outerrs' => 'Errors Out', - 'collisions' => 'Collisions', + 'inpkts' => gettext('Packets In'), + 'outpkts' => gettext('Packets Out'), + 'inbytes' => gettext('Bytes In'), + 'outbytes' => gettext('Bytes Out'), + 'inerrs' => gettext('Errors In'), + 'outerrs' => gettext('Errors Out'), + 'collisions' => gettext('Collisions'), ); $ifdescrs = get_configured_interface_with_descr(); diff --git a/src/usr/local/www/widgets/widgets/ipsec.widget.php b/src/usr/local/www/widgets/widgets/ipsec.widget.php index a3c418f..aa64ff4 100644 --- a/src/usr/local/www/widgets/widgets/ipsec.widget.php +++ b/src/usr/local/www/widgets/widgets/ipsec.widget.php @@ -202,9 +202,9 @@ if ($_REQUEST && $_REQUEST['ajax']) { if (isset($config['ipsec']['phase1'])) { $tab_array = array(); - $tab_array[] = array("Overview", true, "ipsec-Overview"); - $tab_array[] = array("Tunnels", false, "ipsec-tunnel"); - $tab_array[] = array("Mobile", false, "ipsec-mobile"); + $tab_array[] = array(gettext("Overview"), true, "ipsec-Overview"); + $tab_array[] = array(gettext("Tunnels"), false, "ipsec-tunnel"); + $tab_array[] = array(gettext("Mobile"), false, "ipsec-mobile"); display_widget_tabs($tab_array); } @@ -216,9 +216,9 @@ if (isset($config['ipsec']['phase2'])): ?> <table class="table table-striped table-hover"> <thead> <tr> - <th>Active Tunnels</th> - <th>Inactive Tunnels</th> - <th>Mobile Users</th> + <th><?=gettext("Active Tunnels")?></th> + <th><?=gettext("Inactive Tunnels")?></th> + <th><?=gettext("Mobile Users")?></th> </tr> </thead> <tbody> @@ -230,10 +230,10 @@ if (isset($config['ipsec']['phase2'])): ?> <table class="table table-striped table-hover"> <thead> <tr> - <th>Source</th> - <th>Destination</th> - <th>Description</th> - <th>Status</th> + <th><?=gettext("Source")?></th> + <th><?=gettext("Destination")?></th> + <th><?=gettext("Description")?></th> + <th><?=gettext("Status")?></th> </tr> </thead> <tbody> @@ -247,9 +247,9 @@ if (isset($config['ipsec']['phase2'])): ?> <table class="table table-striped table-hover"> <thead> <tr> - <th>User</th> - <th>IP</th> - <th>Status</th> + <th><?=gettext("User")?></th> + <th><?=gettext("IP")?></th> + <th><?=gettext("Status")?></th> </tr> </thead> <tbody> @@ -260,8 +260,8 @@ if (isset($config['ipsec']['phase2'])): ?> <?php endif;?> <?php else: ?> <div> - <h5 style="padding-left:10px;">There are no configured IPsec Tunnels</h5> - <p style="padding-left:10px;">You can configure your IPsec <a href="vpn_ipsec.php">here</a>.</p> + <h5 style="padding-left:10px;"><?=gettext("There are no configured IPsec Tunnels")?></h5> + <p style="padding-left:10px;"><?=gettext('You can configure your IPsec <a href="vpn_ipsec.php">here</a>.')?></p> </div> <?php endif; diff --git a/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php index 91983b9..adb0603 100644 --- a/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php +++ b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php @@ -90,9 +90,9 @@ if (!$nentries) { <table class="table"> <thead> <tr> - <th>Server</th> - <th>Pool</th> - <th>Description</th> + <th><?=gettext('Server')?></th> + <th><?=gettext('Pool')?></th> + <th><?=gettext('Description')?></th> </tr> </thead> <tbody> @@ -102,15 +102,15 @@ if (!$nentries) { switch (trim($rdr_a[$vsent['name']]['status'])) { case 'active': $bgcolor = "success"; - $rdr_a[$vsent['name']]['status'] = "Active"; + $rdr_a[$vsent['name']]['status'] = gettext("Active"); break; case 'down': $bgcolor = "danger"; - $rdr_a[$vsent['name']]['status'] = "Down"; + $rdr_a[$vsent['name']]['status'] = gettext("Down"); break; default: $bgcolor = "info"; - $rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?'; + $rdr_a[$vsent['name']]['status'] = gettext('Unknown - relayd not running?'); } ?> <td> diff --git a/src/usr/local/www/widgets/widgets/log.widget.php b/src/usr/local/www/widgets/widgets/log.widget.php index 57bc8ab..7078709 100644 --- a/src/usr/local/www/widgets/widgets/log.widget.php +++ b/src/usr/local/www/widgets/widgets/log.widget.php @@ -90,7 +90,7 @@ if (is_numeric($_POST['filterlogentries'])) { unset($config['widgets']['filterlogentriesinterfaces']); } - write_config("Saved Filter Log Entries via Dashboard"); + write_config(gettext("Saved Filter Log Entries via Dashboard")); Header("Location: /"); exit(0); } @@ -168,7 +168,7 @@ if (isset($_POST['lastsawtime'])) { <tr> <td><a href="#" onclick="javascript:getURL('status_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);" role="button" data-toggle="popover" data-trigger="hover" - data-title="Rule that triggered this action" + data-title=<?=gettext("Rule that triggered this action")?> data-content="<?=htmlspecialchars($rule)?>"> <i class="fa fa-<?=$iconfn?>"></i> </a></td> @@ -226,8 +226,7 @@ events.push(function(){ <form action="/widgets/widgets/log.widget.php" method="post" class="form-horizontal"> <div class="form-group"> - <label for="filterlogentries" class="col-sm-4 control-label">Number - of entries</label> + <label for="filterlogentries" class="col-sm-4 control-label"><?=gettext('Number of entries')?></label> <div class="col-sm-6"> <input type="number" name="filterlogentries" id="filterlogentries" value="<?=$nentries?>" min="1" max="20" class="form-control" /> @@ -235,34 +234,41 @@ events.push(function(){ </div> <div class="form-group"> - <label class="col-sm-4 control-label">Filter actions</label> + <label class="col-sm-4 control-label"><?=gettext('Filter actions')?></label> <div class="col-sm-6 checkbox"> <?php $include_acts = explode(" ", strtolower($nentriesacts)); ?> <label><input name="actpass" type="checkbox" value="Pass" - <?=(in_array('pass', $include_acts) ? 'checked':'')?> />Pass</label> - <label><input name="actblock" type="checkbox" value="Block" - <?=(in_array('block', $include_acts) ? 'checked':'')?> />Block</label> - <label><input name="actreject" type="checkbox" value="Reject" - <?=(in_array('reject', $include_acts) ? 'checked':'')?> />Reject</label> + <?=(in_array('pass', $include_acts) ? 'checked':'')?> /> + <?=gettext('Pass')?> + </label> + <label><input name="actblock" type="checkbox" value="Block" + <?=(in_array('block', $include_acts) ? 'checked':'')?> /> + <?=gettext('Block')?> + </label> + <label><input name="actreject" type="checkbox" value="Reject" + <?=(in_array('reject', $include_acts) ? 'checked':'')?> /> + <?=gettext('Reject')?> + </label> </div> </div> <div class="form-group"> - <label for="filterlogentriesinterfaces" - class="col-sm-4 control-label">Filter interface</label> + <label for="filterlogentriesinterfaces" class="col-sm-4 control-label"> + <?=gettext('Filter interface')?> + </label> <div class="col-sm-6 checkbox"> <select name="filterlogentriesinterfaces" id="filterlogentriesinterfaces" class="form-control"> <?php foreach (array("All" => "ALL") + get_configured_interface_with_descr() as $iface => $ifacename):?> <option value="<?=$iface?>" <?=($nentriesinterfaces==$iface?'selected':'')?>><?=htmlspecialchars($ifacename)?></option> <?php endforeach;?> - </select> + </select> </div> </div> <div class="form-group"> <div class="col-sm-offset-4 col-sm-6"> - <button type="submit" class="btn btn-default">Save</button> + <button type="submit" class="btn btn-default"><?=gettext('Save')?></button> </div> </div> </form> diff --git a/src/usr/local/www/widgets/widgets/ntp_status.widget.php b/src/usr/local/www/widgets/widgets/ntp_status.widget.php index e0420ef..d20e008 100644 --- a/src/usr/local/www/widgets/widgets/ntp_status.widget.php +++ b/src/usr/local/www/widgets/widgets/ntp_status.widget.php @@ -83,22 +83,23 @@ if ($_REQUEST['updateme']) { exec("/usr/local/sbin/ntpq -pn $inet_version | /usr/bin/tail +3", $ntpq_output); $ntpq_counter = 0; + $stratum_text = gettext("stratum"); foreach ($ntpq_output as $line) { if (substr($line, 0, 1) == "*") { //Active NTP Peer $line = substr($line, 1); $peerinfo = preg_split("/[\s\t]+/", $line); if ($peerinfo[2] == "1") { - $syncsource = $peerinfo[0] . " (stratum " . $peerinfo[2] . ", " . $peerinfo[1] . ")"; + $syncsource = $peerinfo[0] . " (" . $stratum_text . " " . $peerinfo[2] . ", " . $peerinfo[1] . ")"; } else { - $syncsource = $peerinfo[0] . " (stratum " . $peerinfo[2] . ")"; + $syncsource = $peerinfo[0] . " (" . $stratum_text . " " . $peerinfo[2] . ")"; } $ntpq_counter++; } elseif (substr($line, 0, 1) == "o") { //Local PPS Peer $line = substr($line, 1); $peerinfo = preg_split("/[\s\t]+/", $line); - $syncsource = $peerinfo[1] . " (stratum " . $peerinfo[2] . ", PPS)"; + $syncsource = $peerinfo[1] . " (" . $stratum_text . " " . $peerinfo[2] . ", PPS)"; $ntpq_counter++; } } @@ -171,7 +172,7 @@ if ($_REQUEST['updateme']) { <table id="ntp_status_widget" class="table table-striped table-hover"> <tr> - <th>Server Time</th> + <th><?=gettext('Server Time')?></th> <td id="ClockTime"> <!-- ntpStatusClock --> <script type="text/javascript"> //<![CDATA[ @@ -183,10 +184,10 @@ if ($_REQUEST['updateme']) { </td> </tr> <tr> - <th>Sync Source</th> + <th><?=gettext('Sync Source')?></th> <td> <?php if ($ntpq_counter == 0): ?> - <i>No active peers available</i> + <i><?=gettext('No active peers available')?></i> <?php else: ?> <?=$syncsource;?> <?php endif; ?> @@ -194,7 +195,7 @@ if ($_REQUEST['updateme']) { </tr> <?php if (($gps_ok) && ($gps_lat) && ($gps_lon)): ?> <tr> - <th>Clock location</th> + <th><?=gettext('Clock location')?></th> <td> <a target="_gmaps" href="http://maps.google.com/?q=<?=$gps_lat;?>,<?=$gps_lon;?>"> <?php @@ -205,12 +206,12 @@ if ($_REQUEST['updateme']) { </tr> <?php if (isset($gps_sat) || isset($gps_satview)): ?> <tr> - <th>Satellites</th> + <th><?=gettext('Satellites')?></th> <td> <?php - if (isset($gps_satview)) {echo 'in view ' . intval($gps_satview);} + if (isset($gps_satview)) {echo gettext('in view') . ' ' . intval($gps_satview);} if (isset($gps_sat) && isset($gps_satview)) {echo ', ';} - if (isset($gps_sat)) {echo 'in use ' . $gps_sat;} + if (isset($gps_sat)) {echo gettext('in use') . ' ' . $gps_sat;} ?> </td> </tr> @@ -488,7 +489,7 @@ clockUpdate(); <tbody> <tr> <td> - Updating... + <?=gettext('Updating...')?> </td> </tr> </tbody> diff --git a/src/usr/local/www/widgets/widgets/openvpn.widget.php b/src/usr/local/www/widgets/widgets/openvpn.widget.php index 88cb7c9..a321f2a 100644 --- a/src/usr/local/www/widgets/widgets/openvpn.widget.php +++ b/src/usr/local/www/widgets/widgets/openvpn.widget.php @@ -112,8 +112,8 @@ $clients = openvpn_get_active_clients(); <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> <thead> <tr> - <th>Name/Time</th> - <th>Real/Virtual IP</th> + <th><?=gettext('Name/Time')?></th> + <th><?=gettext('Real/Virtual IP')?></th> <th></th> </tr> </thead> @@ -133,7 +133,7 @@ $clients = openvpn_get_active_clients(); <td> <i class="fa fa-times-circle" onclick="killClient('<?=$server['mgmt']; ?>', '<?=$conn['remote_host']; ?>');" style="cursor:pointer;" name="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>" - title='Kill client connection from <?=$conn['remote_host'];?>'> + title=<?=sprintf(gettext('Kill client connection from %s'), $conn['remote_host']);?>'> </i> </td> </tr> @@ -160,8 +160,8 @@ $clients = openvpn_get_active_clients(); <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> <thead> <tr> - <th>Name/Time</th> - <th>Remote/Virtual IP</th> + <th><?=gettext('Name/Time')?></th> + <th><?=gettext('Remote/Virtual IP')?></th> <th></th> </tr> </thead> @@ -210,8 +210,8 @@ $clients = openvpn_get_active_clients(); <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> <thead> <tr> - <th>Name/Time</th> - <th>Remote/Virtual IP</th> + <th><?=gettext('Name/Time')?></th> + <th><?=gettext('Remote/Virtual IP')?></th> <th></th> </tr> </thead> @@ -256,11 +256,11 @@ $clients = openvpn_get_active_clients(); } if ($DisplayNote) { - echo "<br /><b>NOTE:</b> You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen"; + echo "<br /><b>". gettext("NOTE") . ":</b> ". gettext("You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen"); } if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { - echo "No OpenVPN instances defined"; + echo gettext("No OpenVPN instances defined"); } ?> </div> diff --git a/src/usr/local/www/widgets/widgets/picture.widget.php b/src/usr/local/www/widgets/widgets/picture.widget.php index 7d31199..f40e3df 100644 --- a/src/usr/local/www/widgets/widgets/picture.widget.php +++ b/src/usr/local/www/widgets/widgets/picture.widget.php @@ -78,7 +78,7 @@ if ($_POST) { </div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse"> <form action="/widgets/widgets/picture.widget.php" method="post" enctype="multipart/form-data" class="form-inline"> - <label for="pictfile">New picture: </label> + <label for="pictfile"><?=gettext('New picture:')?> </label> <input id="pictfile" name="pictfile" type="file" class="form-control" /> - <button type="submit" class="btn btn-default">Upload</button> + <button type="submit" class="btn btn-default"><?=gettext('Upload')?></button> </form> diff --git a/src/usr/local/www/widgets/widgets/rss.widget.php b/src/usr/local/www/widgets/widgets/rss.widget.php index 358717e..411d0e2 100644 --- a/src/usr/local/www/widgets/widgets/rss.widget.php +++ b/src/usr/local/www/widgets/widgets/rss.widget.php @@ -64,7 +64,7 @@ if ($_POST['rssfeed']) { $config['widgets']['rssmaxitems'] = str_replace("\n", ",", htmlspecialchars($_POST['rssmaxitems'], ENT_QUOTES | ENT_HTML401)); $config['widgets']['rsswidgetheight'] = htmlspecialchars($_POST['rsswidgetheight'], ENT_QUOTES | ENT_HTML401); $config['widgets']['rsswidgettextlength'] = htmlspecialchars($_POST['rsswidgettextlength'], ENT_QUOTES | ENT_HTML401); - write_config("Saved RSS Widget feed via Dashboard"); + write_config(gettext("Saved RSS Widget feed via Dashboard")); header("Location: /"); } @@ -158,28 +158,28 @@ if ($config['widgets']['rssfeed']) { <form action="/widgets/widgets/rss.widget.php" method="post" class="form-horizontal"> <div class="form-group"> - <label for="rssfeed" class="col-sm-3 control-label">Feeds</label> + <label for="rssfeed" class="col-sm-3 control-label"><?=gettext('Feeds')?></label> <div class="col-sm-6"> <textarea id="rssfeed" name="rssfeed" class="form-control"><?=$textarea_txt;?></textarea> </div> </div> <div class="form-group"> - <label for="rssmaxitems" class="col-sm-3 control-label"># Stories</label> + <label for="rssmaxitems" class="col-sm-3 control-label"><?=gettext('# Stories')?></label> <div class="col-sm-6"> <input type="number" id="rssmaxitems" name="rssmaxitems" value="<?=$max_items?>" min="1" max="100" class="form-control" /> </div> </div> <div class="form-group"> - <label for="rsswidgetheight" class="col-sm-3 control-label">Widget height</label> + <label for="rsswidgetheight" class="col-sm-3 control-label"><?=gettext('Widget height')?></label> <div class="col-sm-6"> <input type="number" id="rsswidgetheight" name="rsswidgetheight" value="<?=$rsswidgetheight?>" min="100" max="2500" step="100" class="form-control" /> </div> </div> <div class="form-group"> - <label for="rsswidgettextlength" class="col-sm-3 control-label">Content limit</label> + <label for="rsswidgettextlength" class="col-sm-3 control-label"><?=gettext('Content limit')?></label> <div class="col-sm-6"> <input type="number" id="rsswidgettextlength" name="rsswidgettextlength" value="<?=$rsswidgettextlength?>" min="100" max="5000" step="10" class="form-control" /> </div> @@ -187,7 +187,7 @@ if ($config['widgets']['rssfeed']) { <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> - <button type="submit" class="btn btn-default">Save</button> + <button type="submit" class="btn btn-default"><?=gettext('Save')?></button> </div> </div> </form> diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php index 5973fb1..a050a3e 100644 --- a/src/usr/local/www/widgets/widgets/services_status.widget.php +++ b/src/usr/local/www/widgets/widgets/services_status.widget.php @@ -78,7 +78,7 @@ if ($_POST) { $config['widgets']['servicestatusfilter'] = ""; } - write_config("Saved Service Status Filter via Dashboard"); + write_config(gettext("Saved Service Status Filter via Dashboard")); header("Location: /index.php"); } @@ -87,9 +87,9 @@ if ($_POST) { <thead> <tr> <th></th> - <th>Service</th> - <th>Description</th> - <th>Action</th> + <th><?=gettext('Service')?></th> + <th><?=gettext('Description')?></th> + <th><?=gettext('Action')?></th> </tr> </thead> <tbody> @@ -116,7 +116,7 @@ if (count($services) > 0) { <?php } } else { - echo "<tr><td colspan=\"3\" class=\"text-center\">" . gettext("No services found") . " . </td></tr>\n"; + echo "<tr><td colspan=\"3\" class=\"text-center\">" . gettext("No services found") . ". </td></tr>\n"; } ?> </tbody> @@ -127,7 +127,7 @@ if (count($services) > 0) { <form action="/widgets/widgets/services_status.widget.php" method="post" class="form-horizontal"> <div class="form-group"> - <label for="inputPassword3" class="col-sm-3 control-label">Hidden services</label> + <label for="inputPassword3" class="col-sm-3 control-label"><?=gettext('Hidden services')?></label> <div class="col-sm-6"> <select multiple id="servicestatusfilter" name="servicestatusfilter[]" class="form-control"> <?php @@ -145,8 +145,8 @@ if (count($services) > 0) { <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> - <button type="submit" class="btn btn-primary">Save</button> - <button id="clearall" type="button" class="btn btn-default">Clear</button> + <button type="submit" class="btn btn-primary"><?=gettext('Save')?></button> + <button id="clearall" type="button" class="btn btn-default"><?=gettext('Clear')?></button> </div> </div> </form> diff --git a/src/usr/local/www/widgets/widgets/smart_status.widget.php b/src/usr/local/www/widgets/widgets/smart_status.widget.php index 56e3d2d..dce74a1 100644 --- a/src/usr/local/www/widgets/widgets/smart_status.widget.php +++ b/src/usr/local/www/widgets/widgets/smart_status.widget.php @@ -90,7 +90,7 @@ if (count($devs) > 0) { $icon = "fa-check"; break; case "": - $dev_state = "Unknown"; + $dev_state = gettext("Unknown"); $color = "text-info"; $icon = "fa-times-circle"; break; diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php index 8c70b5e..870029b 100644 --- a/src/usr/local/www/widgets/widgets/system_information.widget.php +++ b/src/usr/local/www/widgets/widgets/system_information.widget.php @@ -119,7 +119,7 @@ $filesystems = get_mounted_filesystems(); <strong><?=$g['product_version']?></strong> (<?php echo php_uname("m"); ?>) <br /> - built on <?php readfile("/etc/version.buildtime"); ?> + <?=gettext('built on')?> <?php readfile("/etc/version.buildtime"); ?> <?php if (!$g['hideuname']): ?> <br /> <span title="<?php echo php_uname("a"); ?>"><?php echo php_uname("s") . " " . php_uname("r"); ?></span> @@ -154,7 +154,7 @@ $filesystems = get_mounted_filesystems(); <td> <?=htmlspecialchars(nanobsd_friendly_slice_name($BOOT_DEVICE));?> / <?=htmlspecialchars($BOOTFLASH);?><?=$rw;?> <?php if ($BOOTFLASH != $ACTIVE_SLICE): ?> - <br /><br />Next Boot:<br /> + <br /><br /><?=gettext('Next Boot')?>:<br /> <?=htmlspecialchars(nanobsd_friendly_slice_name($GLABEL_SLICE));?> / <?=htmlspecialchars($ACTIVE_SLICE);?> <?php endif; ?> </td> @@ -168,7 +168,7 @@ $filesystems = get_mounted_filesystems(); $cpucount = get_cpu_count(); if ($cpucount > 1): ?> <div id="cpucount"> - <?= htmlspecialchars($cpucount) ?> CPUs: <?= htmlspecialchars(get_cpu_count(true)); ?> + <?= htmlspecialchars($cpucount) ?> <?=gettext('CPUs')?>: <?= htmlspecialchars(get_cpu_count(true)); ?> </div> <?php endif; ?> </td> @@ -247,7 +247,7 @@ $filesystems = get_mounted_filesystems(); <tr> <th><?=gettext("Load average");?></th> <td> - <div id="load_average" title="Last 1, 5 and 15 minutes"><?= get_load_average(); ?></div> + <div id="load_average" title="<?=gettext('Last 1, 5 and 15 minutes')?>"><?= get_load_average(); ?></div> </td> </tr> <tr> @@ -257,7 +257,7 @@ $filesystems = get_mounted_filesystems(); <div id="cpuPB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> </div> </div> - <span id="cpumeter">(Updating in 10 seconds)</span> + <span id="cpumeter"><?=gettext('(Updating in 10 seconds)')?></span> </td> </tr> <tr> @@ -292,7 +292,7 @@ $filesystems = get_mounted_filesystems(); <?php foreach ($filesystems as $fs): ?> <tr> <th><?=$fs['mountpoint']?></th> - <td><?=$fs['type'] . ("md" == substr(basename($fs['device']), 0, 2) ? " in RAM" : "")?></td> + <td><?=$fs['type'] . ("md" == substr(basename($fs['device']), 0, 2) ? " " . gettext("in RAM") : "")?></td> <td><?=$fs['total_size']?></td> <td> <span><?=$fs['percent_used']?>%</span> diff --git a/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php index dabf983..f99e605 100644 --- a/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php +++ b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php @@ -89,7 +89,7 @@ if ($_POST) { saveGraphDisplaySettings($config, $_POST, "thermal_sensors_widget_pulsate_critical"); //write settings to config file - write_config("Saved thermal_sensors_widget settings via Dashboard."); + write_config(gettext("Saved thermal_sensors_widget settings via Dashboard.")); header("Location: ../../index.php"); } @@ -185,7 +185,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { </script> <div style="padding: 5px"> <div id="thermalSensorsContainer" class="listr"> - (Updating...)<br /><br /> + <?=gettext('(Updating...)')?><br /><br /> </div> </div> </div> @@ -196,15 +196,15 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { <table> <tr> <td class="text-left" colspan="2"> - <strong>Thresholds in °C (1 to 100):</strong> + <strong><?=gettext('Thresholds in')?> °C <?=gettext('(1 to 100):')?></strong> </td> <td class="text-right" colspan="1"> - <strong>Display settings:</strong> + <strong><?=gettext('Display settings:')?></strong> </td> </tr> <tr> <td class="text-right"> - Zone Warning: + <?=gettext('Zone Warning:')?> </td> <td> <input type="text" maxlength="3" size="3" class="formfld unknown" @@ -213,7 +213,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { value="<?= $thermal_sensors_widget_zoneWarningTempThreshold; ?>" /> </td> <td class="text-right"> - <label for="thermal_sensors_widget_show_raw_output">Show raw output (no graph): </label> + <label for="thermal_sensors_widget_show_raw_output"><?=gettext('Show raw output (no graph):')?> </label> <input type="checkbox" id="thermal_sensors_widget_show_raw_output" name="thermal_sensors_widget_show_raw_output" @@ -222,7 +222,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { </tr> <tr> <td class="text-right"> - Zone Critical: + <?=gettext('Zone Critical:')?> </td> <td> <input type="text" maxlength="3" size="3" class="formfld unknown" @@ -231,7 +231,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { value="<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>" /> </td> <td class="text-right"> - <label for="thermal_sensors_widget_show_full_sensor_name">Show full sensor name: </label> + <label for="thermal_sensors_widget_show_full_sensor_name"><?=gettext('Show full sensor name:')?> </label> <input type="checkbox" id="thermal_sensors_widget_show_full_sensor_name" name="thermal_sensors_widget_show_full_sensor_name" @@ -240,7 +240,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { </tr> <tr> <td class="text-right"> - Core Warning: + <?=gettext('Core Warning:')?> </td> <td> <input type="text" maxlength="3" size="3" class="formfld unknown" @@ -254,7 +254,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { </tr> <tr> <td class="text-right"> - Core Critical: + <?=gettext('Core Critical:')?> </td> <td> <input type="text" maxlength="3" size="3" class="formfld unknown" @@ -273,8 +273,8 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { </tr> <tr> <td class="text-left" colspan="3"> - <span>* You can configure a proper Thermal Sensor / Module under <br /> - <a href="system_advanced_misc.php">System > Advanced > Miscellaneous : Thermal Sensors section</a>.</span> + <span><?=gettext('* You can configure a proper Thermal Sensor / Module under')?> <br /> + <a href="system_advanced_misc.php"><?=gettext('System')?> > <?=gettext('Advanced')?> > <?=gettext('Miscellaneous')?> : <?=gettext('Thermal Sensors')?> <?=gettext('section')?></a>.</span> </td> </tr> </table> diff --git a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php index ffed30f..39cb3f3 100644 --- a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php +++ b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php @@ -102,7 +102,7 @@ if ($_POST) { } } - write_config("Updated traffic graph settings via dashboard."); + write_config(gettext("Updated traffic graph settings via dashboard.")); header("Location: /"); exit(0); } @@ -162,7 +162,7 @@ foreach ($ifdescrs as $ifname => $ifdescr): <form action="/widgets/widgets/traffic_graphs.widget.php" method="post" class="form-horizontal"> <div class="form-group"> - <label for="scale_type_up" class="col-sm-3 control-label">Show graphs</label> + <label for="scale_type_up" class="col-sm-3 control-label"><?=gettext('Show graphs')?></label> <div class="col-sm-6 checkbox"> <?php foreach ($ifdescrs as $ifname => $ifdescr): ?> <label> @@ -173,21 +173,21 @@ foreach ($ifdescrs as $ifname => $ifdescr): </div> </div> <div class="form-group"> - <label for="scale_type_up" class="col-sm-3 control-label">Default Autoscale</label> + <label for="scale_type_up" class="col-sm-3 control-label"><?=gettext('Default Autoscale')?></label> <div class="col-sm-6 checkbox"> <label> <input name="scale_type" type="radio" id="scale_type_up" value="up" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="up" ? '' : 'checked')?> /> - up + <?=gettext('Up')?> </label> <label> <input name="scale_type" type="radio" id="scale_type_follow" value="follow" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="follow" ? 'checked' : '')?> /> - follow + <?=gettext('Follow')?> </label> </div> </div> <div class="form-group"> - <label for="refreshinterval" class="col-sm-3 control-label">Refresh Interval</label> + <label for="refreshinterval" class="col-sm-3 control-label"><?=gettext('Refresh Interval')?></label> <div class="col-sm-6"> <input type="number" id="refreshinterval" name="refreshinterval" value="<?=$refreshinterval?>" min="1" max="30" class="form-control" /> </div> @@ -195,7 +195,7 @@ foreach ($ifdescrs as $ifname => $ifdescr): <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> - <button type="submit" class="btn btn-default">Save</button> + <button type="submit" class="btn btn-default"><?=gettext('Save')?></button> </div> </div> </form> diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php index 90f2895..56d1250 100644 --- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php +++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php @@ -107,5 +107,5 @@ if (count($wolcomputers) > 0) { ?> </tbody> </table> -<p class="text-center"><a href="status_dhcp_leases.php" class="navlink">DHCP Leases Status</a></p> +<p class="text-center"><a href="status_dhcp_leases.php" class="navlink"><?=gettext('DHCP Leases Status')?></a></p> </div> |