From a53e451b8b2ce2b30628b4471363d17b07a819f3 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Tue, 27 Apr 2010 15:54:27 -0300 Subject: Implement gettext() --- usr/local/www/system_firmware_check.php | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'usr/local/www/system_firmware_check.php') 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"); @@ -101,7 +101,7 @@ include("head.inc");

-

+
"> @@ -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"; -$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); ?> -- cgit v1.1