From ba9c6f9d2d27011ffd224628c1cda209ab7b8a94 Mon Sep 17 00:00:00 2001 From: "jean.feltrin" Date: Fri, 18 Jun 2010 17:17:49 -0300 Subject: Implement gettext() calls --- usr/local/www/diag_confbak.php | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 5d0458b..f969024 100755 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -45,9 +45,10 @@ if($_GET['newver'] != "") { conf_mount_rw(); $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) - $savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\"."; + + $savemsg = sprintf("Successfully reverted to timestamp %s with description \"%s\".", date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']); else - $savemsg = "Unable to revert to the selected configuration."; + $savemsg = gettext("Unable to revert to the selected configuration."); conf_mount_ro(); } @@ -55,7 +56,7 @@ if($_GET['rmver'] != "") { conf_mount_rw(); $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); - $savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\"."; + $savemsg = sprintf("Deleted backup with timestamp %s and description \"%s\".",date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']); conf_mount_ro(); } @@ -94,7 +95,7 @@ cleanup_backupcache(); $confvers = get_backups(); unset($confvers['versions']); -$pgtitle = array("Diagnostics","Configuration History"); +$pgtitle = array(gettext("Diagnostics"),gettext("Configuration History")); include("head.inc"); ?> @@ -107,7 +108,7 @@ include("head.inc"); ?> - + @@ -149,25 +150,25 @@ include("head.inc"); - - + + - + - + @@ -185,18 +186,18 @@ include("head.inc"); @@ -208,7 +209,7 @@ include("head.inc"); -- cgit v1.1
Configuration diff from to
DateConfiguration Change
Current
- - Revert to this configuration + '")> + <?=gettext(" title=""> - - Remove this backup + ')"> + Remove this backup"> - Download this backup + Download this backup">
- +