diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-10 10:13:02 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-10 10:13:02 +0000 |
commit | ff9aba809f558b95e41e7214103df278dfa99716 (patch) | |
tree | a72d2986f4a8ec4d380edd44c41638966c6d86dc /urpmi | |
parent | c878f86c57c1acd4c0b5285e07dd7536272b3b8b (diff) | |
download | urpmi-ff9aba809f558b95e41e7214103df278dfa99716.tar urpmi-ff9aba809f558b95e41e7214103df278dfa99716.tar.gz urpmi-ff9aba809f558b95e41e7214103df278dfa99716.tar.bz2 urpmi-ff9aba809f558b95e41e7214103df278dfa99716.tar.xz urpmi-ff9aba809f558b95e41e7214103df278dfa99716.zip |
don't rely on backslashed , in translations for gmessage's buttons, do it after translation ourselves, it'll lead to less problems
Diffstat (limited to 'urpmi')
-rwxr-xr-x | urpmi | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -142,8 +142,12 @@ sub gmessage { my ($msg, %params) = @_; my $ok = to_utf8($params{ok} || N("Ok")); my $cancel = to_utf8($params{cancel} || N("Cancel")); + $ok =~ s/,/\\,/g; $cancel =~ s/,/\\,/g; my $buttons = $params{ok_only} ? "$ok:0" : "$ok:0,$cancel:2"; - $params{add_buttons} and $buttons .= ",$params{add_buttons}"; + foreach (@{$params{add_buttons}}) { + $_ =~ s/,/\\,/g; + $buttons .= ",$_"; + } $msg = to_utf8($msg); `gmessage -default "$ok" -buttons "$buttons" "$msg"`; } @@ -276,7 +280,7 @@ would allow you to make modifications to its sourcecode then compile it). What would you like to do?", $src_files[0]), ok => N("Do nothing"), cancel => N("Yes, really install it"), - add_buttons => N("Save file") . ':1'); + add_buttons => [ N("Save file") . ':1' ]); my $rc = $? >> 8; if ($rc == 0) { exit(1); |