diff options
author | Francois Pons <fpons@mandriva.com> | 2003-03-04 18:03:48 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-03-04 18:03:48 +0000 |
commit | 3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b (patch) | |
tree | 1446e2d6745b0e9a1a214605b2cf3efe6b4dc14e | |
parent | 8dd44adde44397ea618aa45a74d959fc938d0e42 (diff) | |
download | urpmi-3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b.tar urpmi-3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b.tar.gz urpmi-3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b.tar.bz2 urpmi-3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b.tar.xz urpmi-3e1dd843eac8e8a3f1a06b78fbbb30300b493d7b.zip |
yoyotte experimentation.
-rwxr-xr-x | urpmi | 36 | ||||
-rw-r--r-- | urpmi.spec | 8 |
2 files changed, 23 insertions, 21 deletions
@@ -116,6 +116,16 @@ usage: exit(0); } +sub to_utf8 { Locale::gettext::iconv($_[0], undef, "UTF-8") } +sub gmessage { + my ($msg, %params) = @_; + my $ok = to_utf8(_("Ok")); + my $cancel = to_utf8(_("Cancel")); + my $buttons = $params{ok_only} ? "$ok:0" : "$ok:0,$cancel:2"; + $msg = to_utf8($msg); + `gmessage -default "$ok" -buttons "$buttons" "$msg"`; +} + #- parse arguments list. my @nextargv; my $command_line = join " ", @ARGV; @@ -370,9 +380,7 @@ if (%{$state->{ask_unselect} || {}}) { my $list = join "\n", map { scalar $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}}; my $msg = _("Some package requested cannot be installed:\n%s\ndo you agree ?", $list); if ($X) { - my $ok = _("Ok"); - my $cancel = _("Cancel"); - `gmessage -default "$ok" -buttons "$ok:0,$cancel:2" "$msg"`; + gmessage($msg); $? and exit 0; } else { $noexpr = _("Nn"); @@ -412,9 +420,7 @@ if (%{$state->{ask_remove} || {}}) { } sort { $a cmp $b } keys %{$state->{ask_remove}}; my $msg = _("The following packages have to be removed for others to be upgraded:\n%s\ndo you agree ?", $list); if ($X) { - my $ok = _("Ok"); - my $cancel = _("Cancel"); - `gmessage -default "$ok" -buttons "$ok:0,$cancel:2" "$msg"`; + gmessage($msg); $? and exit 0; } else { $noexpr = _("Nn"); @@ -461,9 +467,7 @@ if (@root_only) { my $msg2 = _("Is this OK?"); my $p = join "\n", @to_install; if ($X) { - my $ok = _("Ok"); - my $cancel = _("Cancel"); - `gmessage -default "$ok" -buttons "$ok:0,$cancel:2" "$msg:\n$p\n\n$msg2"`; + gmessage("$msg:\n$p\n\n$msg2"); $? and exit 0; } else { $noexpr = _("Nn"); @@ -503,10 +507,8 @@ my %sources = $urpm->download_source_packages($local_sources, $list, my $msg = _("Please insert the medium named \"%s\" on device [%s]", @_); my $msg2 = _("Press Enter when ready..."); if ($X) { - my $ok = _("Ok"); - my $cancel = _("Cancel"); $msg =~ s/"/\\"/g; - `gmessage -default "$ok" -buttons "$ok:0,$cancel:2" "$msg"`; + gmessage($msg); !$?; } else { defined message_input("$msg\n$msg2 "); @@ -530,9 +532,7 @@ if ($urpm->{options}{'verify-rpm'}) { exit 1; } else { if ($X) { - my $ok = _("Ok"); - my $cancel = _("Cancel"); - `gmessage -default "$cancel" -buttons "$ok:0,$cancel:2" "$msg:\n$p\n\n$msg2"`; + gmessage("$msg:\n$p\n\n$msg2"); $? and exit 1; } else { $noexpr = _("Nn"); @@ -660,8 +660,7 @@ sub log_it { sub message { my ($msg, $noX) = @_; if ($X && !$noX && !$auto) { - my $ok = _("Ok"); - `gmessage -default "$ok" -buttons "$ok" "$msg"`; + gmessage($msg, ok_only => 1); $bug and log_it($msg); } else { if ($bug) { @@ -675,8 +674,7 @@ sub message_input { my ($msg, $default_input) = @_; if ($X && !default_input) { #- if a default input is given, the user doesn't have to choose (and being asked). - my $ok = _("Ok"); - `gmessage -default "$ok" -buttons "$ok" "$msg"`; + gmessage($msg, ok_only => 1); $bug and log_it($msg); } else { if ($bug) { @@ -2,14 +2,14 @@ Name: urpmi Version: 4.2 -Release: 27mdk +Release: 28mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate Summary: User mode rpm install URL: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/urpmi Requires: eject webfetch perl-DateManip >= 5.40 gnupg -PreReq: perl-Locale-gettext rpmtools >= 4.3-6mdk perl-URPM >= 0.81 +PreReq: perl-Locale-gettext >= 1.01-7mdk rpmtools >= 4.3-6mdk perl-URPM >= 0.81 BuildRequires: bzip2-devel gettext rpm-devel >= 4.0.3 BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch @@ -206,6 +206,10 @@ fi %changelog +* Tue Mar 4 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 4.2-28mdk +- fixed french translations. +- fix bug 2680. + * Mon Mar 3 2003 François Pons <fpons@mandrakesoft.com> 4.2-27mdk - avoid mounting or unmounting a supermounted device. - updated french translations (some from Thévenet Cédric). |