From 82b15b7030b62b086f3df0a53c408c1ab6075101 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Tue, 27 Apr 2010 12:49:41 -0300 Subject: Implement gettext() --- usr/local/www/pkg_mgr.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index a0933ed..c28cefc 100755 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -44,7 +44,7 @@ require_once("globals.inc"); require_once("guiconfig.inc"); require_once("pkg-utils.inc"); -$pkg_info = get_pkg_info('all', array('noembedded', 'name', 'category', 'website', 'version', 'status', 'descr', 'maintainer', 'required_version', 'maximum_version', 'pkginfolink')); +$pkg_info = get_pkg_info('all', array(gettext("noembedded"), gettext("name"), gettext("category"), gettext("website"), gettext("version"), gettext("status"), gettext("descr"), gettext("maintainer"), gettext("required_version"), gettext("maximum_version"), gettext("pkginfolink"))); if($pkg_info) { $fout = fopen("{$g['tmp_path']}/pkg_info.cache", "w"); fwrite($fout, serialize($pkg_info)); @@ -54,10 +54,10 @@ if($pkg_info) { $using_cache = true; $xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl']; if(file_exists("{$g['tmp_path']}/pkg_info.cache")) { - $savemsg = "Unable to retrieve package info from {$xmlrpc_base_url}. Cached data will be used."; + $savemsg = sprintf(gettext("Unable to retrieve package info from '%s'. Cached data will be used."), $xmlrpc_base_url); $pkg_info = unserialize(@file_get_contents("{$g['tmp_path']}/pkg_info.cache")); } else { - $savemsg = "Unable to communicate with {$xmlrpc_base_url}. Please verify DNS and interface configuration, and that {$g['product_name']} has functional Internet connectivity."; + $savemsg = sprintf(gettext("Unable to communicate with '%s'. Please verify DNS and interface configuration, and that '%s' has functional Internet connectivity."), $xmlrpc_base_url, $g['product_name']); } } @@ -65,7 +65,7 @@ if (! empty($_GET)) if (isset($_GET['ver'])) $requested_version = htmlspecialchars($_GET['ver']); -$pgtitle = array("System","Package Manager"); +$pgtitle = array(gettext("System"),gettext("Package Manager")); include("head.inc"); ?> @@ -88,10 +88,10 @@ include("head.inc"); $testing_version = substr($version, $hyphen + 1, strlen($version) - $hyphen); $tab_array = array(); - $tab_array[] = array("{$version} packages", $requested_version <> "" ? false : true, "pkg_mgr.php"); + $tab_array[] = array($version . gettext("packages"), $requested_version <> "" ? false : true, "pkg_mgr.php"); // $tab_array[] = array("Packages for any platform", $requested_version == "none" ? true : false, "pkg_mgr.php?ver=none"); // $tab_array[] = array("Packages with a different version", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other"); - $tab_array[] = array("Installed Packages", false, "pkg_mgr_installed.php"); + $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php"); display_top_tabs($tab_array); ?> @@ -101,16 +101,16 @@ include("head.inc");
- - + + - - - + + + "; + echo ""; } else { $installed_pfsense_version = rtrim(file_get_contents("/etc/version")); $dash = strpos($installed_pfsense_version, "-"); @@ -181,13 +181,13 @@ include("head.inc"); --> @@ -203,13 +203,13 @@ include("head.inc"); '; + echo ""; } } ?> -- cgit v1.1
Package NameCategory StatusPackage InfoDescription
There are currently no packages available for installation.
" . gettext("There are currently no packages available for installation.") . "
- +
- +
- platform: +
- +
Package Info"; } else { - echo "No info, check the forum"; + echo gettext("No info, check the") . "" . gettext("forum") . ""; } ?> - + ')" href="pkg_mgr_install.php?id=">
There are currently no packages available for installation.
" . gettext("There are currently no packages available for installation.") . "