diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-25 15:03:11 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-25 15:03:11 +0545 |
commit | 9ed9b7654d2f4bb70983cc035b9d8a74c41716b1 (patch) | |
tree | bb32e21af89654d7314c5c7135afc1ee874e752b /src/usr/local/www/pkg_mgr_installed.php | |
parent | a2c5280d92c2707c27cbef318b1ced7122c32b0e (diff) | |
download | pfsense-9ed9b7654d2f4bb70983cc035b9d8a74c41716b1.zip pfsense-9ed9b7654d2f4bb70983cc035b9d8a74c41716b1.tar.gz |
Internationalize pkgmgr_installed
Note: I enhanced the title text of the remove/update/reinstall buttons to include the package name.
Before that, when you clicked to remove a package there would be a popup that just said "Are you sure you wish to remove?" - which looked a bit odd.
Diffstat (limited to 'src/usr/local/www/pkg_mgr_installed.php')
-rw-r--r-- | src/usr/local/www/pkg_mgr_installed.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/usr/local/www/pkg_mgr_installed.php b/src/usr/local/www/pkg_mgr_installed.php index 56555f4..93fd475 100644 --- a/src/usr/local/www/pkg_mgr_installed.php +++ b/src/usr/local/www/pkg_mgr_installed.php @@ -125,28 +125,28 @@ if (empty($installed_packages)):?> // package is configured, but does not exist in the system $txtcolor = "text-danger"; $missing = true; - $status = 'Package is configured, but not installed!'; + $status = gettext('Package is configured, but not installed!'); } else if (isset($pkg['installed_version']) && isset($pkg['version'])) { $version_compare = pkg_version_compare($pkg['installed_version'], $pkg['version']); if ($version_compare == '>') { // we're running a newer version of the package - $status = 'Newer than available ('. $pkg['version'] .')'; + $status = sprintf(gettext('Newer than available (%s)'), $pkg['version']); } else if ($version_compare == '<') { // we're running an older version of the package - $status = 'Upgrade available to '.$pkg['version']; + $status = sprintf(gettext('Upgrade available to %s'), $pkg['version']); $txtcolor = "text-warning"; $upgradeavail = true; $vergetstr = '&from=' . $pkg['installed_version'] . '&to=' . $pkg['version']; } else if ($version_compare == '=') { // we're running the current version - $status = 'Up-to-date'; + $status = gettext('Up-to-date'); } else { - $status = 'Error comparing version'; + $status = gettext('Error comparing version'); } } else { // unknown available package version - $status = 'Unknown'; + $status = gettext('Unknown'); $statusicon = 'question'; } ?> @@ -185,11 +185,11 @@ if (empty($installed_packages)):?> </td> <td> <div class="row"> - <a title="<?=gettext("Remove")?>" href="pkg_mgr_install.php?mode=delete&pkg=<?=$pkg['name']?>" class="fa fa-trash"></a> + <a title="<?=sprintf(gettext("Remove package %s"), $pkg['name'])?>" href="pkg_mgr_install.php?mode=delete&pkg=<?=$pkg['name']?>" class="fa fa-trash"></a> <?php if ($upgradeavail):?> - <a title="<?=gettext("Update")?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a> + <a title="<?=sprintf(gettext("Update package %s"), $pkg['name'])?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a> <?php else:?> - <a title="<?=gettext("Reinstall")?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?>" class="fa fa-retweet"></a> + <a title="<?=sprintf(gettext("Reinstall package %s"), $pkg['name'])?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?>" class="fa fa-retweet"></a> <?php endif;?> <?php if (!isset($g['disablepackageinfo']) && $pkg['www'] != 'UNKNOWN'):?> @@ -206,13 +206,13 @@ if (empty($installed_packages)):?> <br /> <div class="text-center"> <p> - <i class="fa fa-refresh"></i> = Update - <i class="fa fa-check"></i> = Current + <i class="fa fa-refresh"></i> = <?=gettext('Update')?> + <i class="fa fa-check"></i> = <?=gettext('Current')?> </p> <p> - <i class="fa fa-trash"></i> = Remove - <i class="fa fa-info"></i> = Information - <i class="fa fa-retweet"></i> = Reinstall + <i class="fa fa-trash"></i> = <?=gettext('Remove')?> + <i class="fa fa-info"></i> = <?=gettext('Information')?> + <i class="fa fa-retweet"></i> = <?=gettext('Reinstall')?> </p> <p><span class="text-warning"><?=gettext("Newer version available")?></span></p> <p><span class="text-danger"><?=gettext("Package is configured but not (fully) installed")?></span></p> |