summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-12-05 20:56:28 +0000
committerFrancois Pons <fpons@mandriva.com>2003-12-05 20:56:28 +0000
commit08b1aa90a015b9748d63b83c742aec07d1f4c87d (patch)
tree6b1816adcdb98b74c1235fe917ad72cad542bcf7 /urpm.pm
parentfa68bb2c1ab657cfc4b91f5a829d3e945f2a916e (diff)
downloadurpmi-08b1aa90a015b9748d63b83c742aec07d1f4c87d.tar
urpmi-08b1aa90a015b9748d63b83c742aec07d1f4c87d.tar.gz
urpmi-08b1aa90a015b9748d63b83c742aec07d1f4c87d.tar.bz2
urpmi-08b1aa90a015b9748d63b83c742aec07d1f4c87d.tar.xz
urpmi-08b1aa90a015b9748d63b83c742aec07d1f4c87d.zip
added support for missing Locale::gettext (as for RedHat for fast port)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index 2887b73a..20c72e2b 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -10,15 +10,17 @@ $VERSION = '4.4';
use URPM;
use URPM::Resolve;
use POSIX;
-use Locale::gettext();
#- I18N.
-setlocale(LC_ALL, "");
-Locale::gettext::textdomain("urpmi");
+eval {
+ require Locale::gettext;
+ setlocale(LC_ALL, "");
+ Locale::gettext::textdomain("urpmi");
+};
sub N {
my ($format, @params) = @_;
- sprintf(Locale::gettext::gettext($format || ''), @params);
+ sprintf(eval { Locale::gettext::gettext($format || '') } || $format, @params);
}
#- tool functions.