diff options
author | Francois Pons <fpons@mandriva.com> | 2003-12-05 20:56:28 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-12-05 20:56:28 +0000 |
commit | 08b1aa90a015b9748d63b83c742aec07d1f4c87d (patch) | |
tree | 6b1816adcdb98b74c1235fe917ad72cad542bcf7 | |
parent | fa68bb2c1ab657cfc4b91f5a829d3e945f2a916e (diff) | |
download | urpmi-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)
-rw-r--r-- | urpm.pm | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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. |