summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-05-30 00:40:46 -0700
committerErmal Luçi <eri@pfsense.org>2013-05-30 00:40:46 -0700
commit0a860dda6c7107be65cf7a04807c7e0c23d82ac7 (patch)
tree6f520e24ed85d8e1f3be1322371dc7bfbf25b338 /usr
parent6a188bb9bd36b1291b992f6596f7d34643d92c3b (diff)
parent75f457856a2f3758cb6adabaaf41083a945c103b (diff)
downloadpfsense-0a860dda6c7107be65cf7a04807c7e0c23d82ac7.zip
pfsense-0a860dda6c7107be65cf7a04807c7e0c23d82ac7.tar.gz
Merge pull request #628 from technical50/master
WebGUI Auto Codeset and Language Dynamics & pfSense.pot updates
Diffstat (limited to 'usr')
-rw-r--r--usr/local/share/locale/en/LC_MESSAGES/add_pfSense.pot71
-rw-r--r--usr/local/www/getserviceproviders.php4
-rwxr-xr-xusr/local/www/graph.php2
-rw-r--r--usr/local/www/graph_cpu.php2
-rwxr-xr-xusr/local/www/head.inc4
-rwxr-xr-xusr/local/www/index.php4
-rwxr-xr-xusr/local/www/system_firmware_auto.php2
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php36
8 files changed, 98 insertions, 27 deletions
diff --git a/usr/local/share/locale/en/LC_MESSAGES/add_pfSense.pot b/usr/local/share/locale/en/LC_MESSAGES/add_pfSense.pot
new file mode 100644
index 0000000..a5bf371
--- /dev/null
+++ b/usr/local/share/locale/en/LC_MESSAGES/add_pfSense.pot
@@ -0,0 +1,71 @@
+#: usr/local/www/widgets/widgets/system_information.widget.php:88 add line for 1857 in pfsense.pot
+msgid "Name"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:92 add line 43532 in pfsense.pot
+msgid "Version"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:109
+msgid "Platform"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:127
+msgid "NanoBSD Boot Slice"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:138
+msgid "CPU Type"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:151
+msgid "Hardware crypto"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:156
+msgid "Uptime"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:166
+msgid "DNS server(s)"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:178
+msgid "Last config change"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:183
+msgid "State table size"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:187
+msgid "Show states"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:191
+msgid "MBUF Usage"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:202
+msgid "Temperature"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:212
+msgid "Load average"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:218
+msgid "CPU usage"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:227
+msgid "Memory usage"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:237
+msgid "SWAP usage"
+msgstr ""
+
+#: usr/local/www/widgets/widgets/system_information.widget.php:247
+msgid "Disk usage"
+msgstr ""
diff --git a/usr/local/www/getserviceproviders.php b/usr/local/www/getserviceproviders.php
index 9d30786..0fbd9fb 100644
--- a/usr/local/www/getserviceproviders.php
+++ b/usr/local/www/getserviceproviders.php
@@ -74,8 +74,8 @@ function providers_list($country) {
}
function provider_plan_data($country,$provider,$connection) {
- Header("Content-type: application/xml; charset=iso-8859-1");
- echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
+ Header("Content-type: application/xml;");
+ echo "<?xml version=\"1.0\" ?>\n";
echo "<connection>\n";
$serviceproviders = get_country_providers($country);
foreach($serviceproviders as $sp) {
diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php
index 6a227fa..2c0dc94 100755
--- a/usr/local/www/graph.php
+++ b/usr/local/www/graph.php
@@ -97,7 +97,7 @@ if(file_exists("/usr/local/www/themes/{$g['theme']}/graph.php")) {
}
/********* Graph DATA **************/
-print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
+print('<?xml version="1.0" ?>' . "\n");?>
<svg width="100%" height="100%" viewBox="0 0 <?=$width?> <?=$height?>" preserveAspectRatio="none" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="init(evt)">
<g id="graph">
<rect id="bg" x1="0" y1="0" width="100%" height="100%" fill="white"/>
diff --git a/usr/local/www/graph_cpu.php b/usr/local/www/graph_cpu.php
index 9c6dbd7..12641d2 100644
--- a/usr/local/www/graph_cpu.php
+++ b/usr/local/www/graph_cpu.php
@@ -67,7 +67,7 @@ $height=100; // SVG internal height : do not modify
$width=200; // SVG internal width : do not modify
/********* Graph DATA **************/
-print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
+print('<?xml version="1.0" ?>' . "\n");?>
<svg width="100%" height="100%" viewBox="0 0 <?=$width?> <?=$height?>" preserveAspectRatio="none" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="init(evt);">
<g id="graph">
<rect id="bg" x1="0" y1="0" width="100%" height="100%" fill="white"/>
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index 0bc1d00..347b4a2 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -10,10 +10,10 @@ $pagetitle = gentitle( $pgtitle );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="<?=system_get_language_code();?>" xml:lang="<?=system_get_language_code();?>">
<head>
<title><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
<link rel="apple-touch-icon" href="/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png"/>
<?php
if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index a5cc724..3fd07f6 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -159,10 +159,10 @@ if (!is_array($config['widgets'])) {
echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="<?=system_get_language_code();?>" xml:lang="<?=system_get_language_code();?>">
<head>
<title>{$g['product_name']}.localdomain - {$g['product_name']} first time setup</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
<script type="text/javascript">var theme = "nervecenter"</script>
<script type="text/javascript" src="/themes/nervecenter/loader.js"></script>
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index 49764c5..e77a97b 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -63,7 +63,7 @@ include("head.inc");
?>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
<link href="gui.css" rel="stylesheet" type="text/css" />
</head>
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index f735ce8..abbd826 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -85,11 +85,11 @@ $curcfg = $config['system']['firmware'];
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="system information">
<tbody>
<tr>
- <td width="25%" class="vncellt">Name</td>
+ <td width="25%" class="vncellt"><?=gettext("Name");?></td>
<td width="75%" class="listr"><?php echo $config['system']['hostname'] . "." . $config['system']['domain']; ?></td>
</tr>
<tr>
- <td width="25%" valign="top" class="vncellt">Version</td>
+ <td width="25%" valign="top" class="vncellt"><?=gettext("Version");?></td>
<td width="75%" class="listr">
<strong><?php readfile("/etc/version"); ?></strong>
(<?php echo php_uname("m"); ?>)
@@ -106,7 +106,7 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php if(!$g['hideplatform']): ?>
<tr>
- <td width="25%" class="vncellt">Platform</td>
+ <td width="25%" class="vncellt"><?=gettext("Platform");?></td>
<td width="75%" class="listr">
<?=htmlspecialchars($g['platform']);?>
<?php if (($g['platform'] == "nanobsd") && (file_exists("/etc/nanosize.txt"))) {
@@ -124,7 +124,7 @@ $curcfg = $config['system']['firmware'];
$rw = is_writable("/") ? "(rw)" : "(ro)";
?>
<tr>
- <td width="25%" class="vncellt">NanoBSD Boot Slice</td>
+ <td width="25%" class="vncellt"><?=gettext("NanoBSD Boot Slice");?></td>
<td width="75%" class="listr">
<?=htmlspecialchars(nanobsd_friendly_slice_name($BOOT_DEVICE));?> / <?=htmlspecialchars($BOOTFLASH);?> <?php echo $rw; ?>
<?php if ($BOOTFLASH != $ACTIVE_SLICE): ?>
@@ -135,7 +135,7 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php endif; ?>
<tr>
- <td width="25%" class="vncellt">CPU Type</td>
+ <td width="25%" class="vncellt"><?=gettext("CPU Type");?></td>
<td width="75%" class="listr">
<?php
$cpumodel = "";
@@ -148,12 +148,12 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php if ($hwcrypto): ?>
<tr>
- <td width="25%" class="vncellt">Hardware crypto</td>
+ <td width="25%" class="vncellt"><?=gettext("Hardware crypto");?></td>
<td width="75%" class="listr"><?=htmlspecialchars($hwcrypto);?></td>
</tr>
<?php endif; ?>
<tr>
- <td width="25%" class="vncellt">Uptime</td>
+ <td width="25%" class="vncellt"><?=gettext("Uptime");?></td>
<td width="75%" class="listr" id="uptime"><?= htmlspecialchars(get_uptime()); ?></td>
</tr>
<tr>
@@ -163,7 +163,7 @@ $curcfg = $config['system']['firmware'];
</td>
</tr>
<tr>
- <td width="30%" class="vncellt">DNS server(s)</td>
+ <td width="30%" class="vncellt"><?=gettext("DNS server(s)");?></td>
<td width="70%" class="listr">
<?php
$dns_servers = get_dns_servers();
@@ -175,20 +175,20 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php if ($config['revision']): ?>
<tr>
- <td width="25%" class="vncellt">Last config change</td>
+ <td width="25%" class="vncellt"><?=gettext("Last config change");?></td>
<td width="75%" class="listr"><?= htmlspecialchars(date("D M j G:i:s T Y", intval($config['revision']['time'])));?></td>
</tr>
<?php endif; ?>
<tr>
- <td width="25%" class="vncellt">State table size</td>
+ <td width="25%" class="vncellt"><?=gettext("State table size");?></td>
<td width="75%" class="listr">
<span id="pfstate"><?= htmlspecialchars(get_pfstate()); ?></span>
<br />
- <a href="diag_dump_states.php">Show states</a>
+ <a href="diag_dump_states.php"><?=gettext("Show states");?></a>
</td>
</tr>
<tr>
- <td width="25%" class="vncellt">MBUF Usage</td>
+ <td width="25%" class="vncellt"><?=gettext("MBUF Usage");?></td>
<td width="75%" class="listr">
<?php
$mbufs_output=`netstat -mb | grep "mbuf clusters in use" | awk '{ print $1 }'`;
@@ -199,7 +199,7 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php if (get_temp() != ""): ?>
<tr>
- <td width="25%" class="vncellt">Temperature</td>
+ <td width="25%" class="vncellt"><?=gettext("Temperature");?></td>
<td width="75%" class="listr">
<?php $TempMeter = $temp = get_temp(); ?>
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="tempwidtha" id="tempwidtha" width="<?= round($TempMeter); ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="tempwidthb" id="tempwidthb" width="<?= (100 - $TempMeter); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
@@ -209,13 +209,13 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php endif; ?>
<tr>
- <td width="25%" class="vncellt">Load average</td>
+ <td width="25%" class="vncellt"><?=gettext("Load average");?></td>
<td width="75%" class="listr">
<div id="load_average" title="Last 1, 5 and 15 minutes"><?= get_load_average(); ?></div>
</td>
</tr>
<tr>
- <td width="25%" class="vncellt">CPU usage</td>
+ <td width="25%" class="vncellt"><?=gettext("CPU usage");?></td>
<td width="75%" class="listr">
<?php $cpuUsage = "0"; ?>
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="cpuwidtha" id="cpuwidtha" width="<?= $cpuUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="cpuwidthb" id="cpuwidthb" width="<?= (100 - $cpuUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
@@ -224,7 +224,7 @@ $curcfg = $config['system']['firmware'];
</td>
</tr>
<tr>
- <td width="25%" class="vncellt">Memory usage</td>
+ <td width="25%" class="vncellt"><?=gettext("Memory usage");?></td>
<td width="75%" class="listr">
<?php $memUsage = mem_usage(); ?>
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="memwidtha" id="memwidtha" width="<?= $memUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="memwidthb" id="memwidthb" width="<?= (100 - $memUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
@@ -234,7 +234,7 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php if($showswap == true): ?>
<tr>
- <td width="25%" class="vncellt">SWAP usage</td>
+ <td width="25%" class="vncellt"><?=gettext("SWAP usage");?></td>
<td width="75%" class="listr">
<?php $swapusage = swap_usage(); ?>
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" width="<?= $swapusage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" width="<?= (100 - $swapusage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
@@ -244,7 +244,7 @@ $curcfg = $config['system']['firmware'];
</tr>
<?php endif; ?>
<tr>
- <td width="25%" class="vncellt">Disk usage</td>
+ <td width="25%" class="vncellt"><?=gettext("Disk usage");?></td>
<td width="75%" class="listr">
<?php $diskusage = disk_usage(); ?>
<img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_blue.gif" height="15" width="<?= $diskusage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_gray.gif" height="15" width="<?= (100 - $diskusage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
OpenPOWER on IntegriCloud