From 89f0ac4c429a7f091be5a258c8c10cda3fa2707c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 28 Apr 2010 15:10:18 -0300 Subject: Implement gettext() --- usr/local/www/system_firmware_auto.php | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'usr') diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php index 5eedd80..5f2ed4f 100755 --- a/usr/local/www/system_firmware_auto.php +++ b/usr/local/www/system_firmware_auto.php @@ -122,11 +122,11 @@ include("head.inc"); = 3)) { - $sig_warning = "There has been an error verifying the signature on this image."; + $sig_warning = gettext("There has been an error verifying the signature on this image."); $exitstatus = 1; } if ($exitstatus) { update_status($sig_warning); - update_output_window("Update cannot continue"); + update_output_window(gettext("Update cannot continue")); require("fend.inc"); exit; } else if ($sigchk == 2) - update_output_window("\nrImage has no signature but the system configured to allow unsigned images.\n"); + update_output_window("\n" . gettext("Image has no signature but the system configured to allow unsigned images.") . "\n"); if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) { - update_status("The image file is corrupt."); - update_output_window("Update cannot continue"); + update_status(gettext("The image file is corrupt.")); + update_output_window(gettext("Update cannot continue")); if (file_exists("{$g['upload_path']}/latest.tgz")) { conf_mount_rw(); unlink("{$g['upload_path']}/latest.tgz"); @@ -208,10 +208,10 @@ if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) { } if($downloaded_latest_tgz_sha256 <> $upgrade_latest_tgz_sha256) { - update_status("Downloading complete but sha256 does not match."); - update_output_window("Auto upgrade aborted. \n\nDownloaded SHA256: $downloaded_latest_tgz_sha256 \n\nNeeded SHA256: $upgrade_latest_tgz_sha256"); + update_status(gettext("Downloading complete but sha256 does not match.")); + update_output_window(gettext("Auto upgrade aborted.") . " \n\n" . gettext("Downloaded SHA256") . ": " . $downloaded_latest_tgz_sha256 . "\n\n" . gettext("Needed SHA256") . ": " . $upgrade_latest_tgz_sha256); } else { - update_output_window("{$g['product_name']} is now upgrading.\\n\\nThe firewall will reboot once the operation is completed."); + update_output_window($g['product_name'] . " " . gettext("is now upgrading.") . "\\n\\n" . gettext("The firewall will reboot once the operation is completed.")); echo "\n"; mwexec_bg("/usr/bin/nohup {$external_upgrade_helper_text}"); } @@ -229,13 +229,13 @@ function read_body_firmware($ch, $string) { $a = $file_size; $b = $downloaded; $c = $downloadProgress; - $text = " Auto Update Download Status\\n"; + $text = " " . gettext("Auto Update Download Status") . "\\n"; $text .= "----------------------------------------------------\\n"; - $text .= " Current Version : {$current_installed_pfsense_version}\\n"; - $text .= " Latest Version : {$latest_version}\\n"; - $text .= " File size : {$a}\\n"; - $text .= " Downloaded : {$b}\\n"; - $text .= " Percent : {$c}%\\n"; + $text .= " " . gettext("Current Version") . " : {$current_installed_pfsense_version}\\n"; + $text .= " " . gettext("Latest Version") . " : {$latest_version}\\n"; + $text .= " " . gettext("File size") . " : {$a}\\n"; + $text .= " " . gettext("Downloaded") . " : {$b}\\n"; + $text .= " " . gettext("Percent") . " : {$c}%\\n"; $text .= "----------------------------------------------------\\n"; $counter++; if($counter > 150) { -- cgit v1.1