summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_check.php
diff options
context:
space:
mode:
authorCarlos Eduardo Ramos <carlos.ramos@bluepex.com>2010-04-27 15:54:27 -0300
committerCarlos Eduardo Ramos <carlos.ramos@bluepex.com>2010-04-27 15:54:27 -0300
commita53e451b8b2ce2b30628b4471363d17b07a819f3 (patch)
tree90f9ca9770614385b62675283dcbb87787015ab0 /usr/local/www/system_firmware_check.php
parentf0d1edc954b82b38c449237973f25fe0cb974587 (diff)
downloadpfsense-a53e451b8b2ce2b30628b4471363d17b07a819f3.zip
pfsense-a53e451b8b2ce2b30628b4471363d17b07a819f3.tar.gz
Implement gettext()
Diffstat (limited to 'usr/local/www/system_firmware_check.php')
-rwxr-xr-xusr/local/www/system_firmware_check.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php
index 8d342ae..129b854 100755
--- a/usr/local/www/system_firmware_check.php
+++ b/usr/local/www/system_firmware_check.php
@@ -46,7 +46,7 @@ require("guiconfig.inc");
require_once("pfsense-utils.inc");
$curcfg = $config['system']['firmware'];
-$pgtitle=array("System", "Firmware", "Auto Update");
+$pgtitle=array(gettext("System"), gettext("Firmware"), gettext("Auto Update"));
include("head.inc");
?>
@@ -65,9 +65,9 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Manual Update", false, "system_firmware.php");
- $tab_array[1] = array("Auto Update", true, "system_firmware_check.php");
- $tab_array[2] = array("Updater Settings", false, "system_firmware_settings.php");
+ $tab_array[0] = array(gettext("Manual Update"), false, "system_firmware.php");
+ $tab_array[1] = array(gettext("Auto Update"), true, "system_firmware_check.php");
+ $tab_array[2] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -101,7 +101,7 @@ include("head.inc");
</textarea>
</center>
<p>
- <center><input id='invokeupgrade' style='visibility:hidden' type="submit" value="Invoke Auto Upgrade">
+ <center><input id='invokeupgrade' style='visibility:hidden' type="submit" value="<?=gettext("Invoke Auto Upgrade"); ?>">
</td>
</tr>
</table>
@@ -119,18 +119,18 @@ if(isset($curcfg['alturl']['enable']))
else
$updater_url = $g['update_url'];
$needs_system_upgrade = false;
-$static_text .= "Downloading new version information...";
+$static_text .= gettext("Downloading new version information...");
download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
$remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
-$static_text .= "done.\\n";
+$static_text .= gettext("done") . "\\n";
if (!$remote_version) {
- $static_text .= "Unable to check for updates.\\n";
+ $static_text .= gettext("Unable to check for updates.") . "\\n";
if(isset($curcfg['alturl']['enable']))
- $static_text .= "Could not contact custom update server.\\n";
+ $static_text .= gettext("Could not contact custom update server.") . "\\n";
else
- $static_text .= "Could not contact {$g['product_name']} update server {$updater_url}.\\n";
+ $static_text .= sprintf(gettext("Could not contact '%s' update server '%s'\\n"), $g['product_name'], $updater_url);
} else {
- $static_text .= "Obtaining current version information...";
+ $static_text .= gettext("Obtaining current version information...");
update_output_window($static_text);
$current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));
@@ -142,7 +142,7 @@ if (!$remote_version) {
if (pfs_version_compare($current_installed_buildtime, $current_installed_version, $remote_version) == -1) {
$needs_system_upgrade = true;
} else {
- $static_text .= "\\nYou are on the latest version.\\n";
+ $static_text .= "\\n" . gettext("You are on the latest version.") . "\\n";
}
}
@@ -153,11 +153,11 @@ if ($needs_system_upgrade == false) {
}
echo "\n<script>$('invokeupgrade').style.visibility = 'visible';</script>";
-$txt = "A new version is now available \\n\\n";
-$txt .= "Current version: {$current_installed_version}\\n";
-$txt .= " Built On: {$current_installed_buildtime}\\n";
-$txt .= " New version: {$remote_version}\\n\\n";
-$txt .= " Update source: {$updater_url}\\n";
+$txt = gettext("A new version is now available") . "\\n\\n";
+$txt .= gettext("Current version:") . $current_installed_version . "\\n";
+$txt .= " " . gettext("Built On:") ." ". $current_installed_buildtime . "\\n";
+$txt .= " " . gettext("New version:") ." ". $remote_version . "\\n\\n";
+$txt .= " " . gettext("Update source:") ." ". $updater_url . "\\n";
update_output_window($txt);
?>
</form>
OpenPOWER on IntegriCloud