From 0c8f651988b155d12deb3aea26c2f206648c61e5 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 14 Apr 2004 13:47:02 +0000 Subject: Factorize the message/prompt/I18N code of urpm* in a separate module --- urpm.pm | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 35f6a1e7..33ac145f 100644 --- a/urpm.pm +++ b/urpm.pm @@ -5,27 +5,15 @@ package urpm; use strict; use vars qw($VERSION @ISA @EXPORT); use MDK::Common; +use urpm::msg; $VERSION = '4.4'; -@ISA = qw(Exporter URPM); -@EXPORT = qw(N); +@ISA = qw(URPM); use URPM; use URPM::Resolve; use POSIX; -#- I18N. -eval { - require Locale::gettext; - setlocale(LC_ALL, ""); - Locale::gettext::textdomain("urpmi"); -}; - -sub N { - my ($format, @params) = @_; - sprintf(eval { Locale::gettext::gettext($format || '') } || $format, @params); -} - #- tool functions. sub localtime2changelog { scalar(localtime($_[0])) =~ /(.*) \S+ (\d{4})$/ && "$1 $2" }; -- cgit v1.2.1