diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-07 18:04:36 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-07 18:04:36 +0100 |
commit | 3c2e6ffd9014d93ff8f36a71503cfe4424e46628 (patch) | |
tree | 4220c5ffb4a4f0635801bd4017202223d8a02825 /lib | |
parent | c1f70e7c8baf34fbf70d1f0b2baeed92e02108bb (diff) | |
download | colin-keep-3c2e6ffd9014d93ff8f36a71503cfe4424e46628.tar colin-keep-3c2e6ffd9014d93ff8f36a71503cfe4424e46628.tar.gz colin-keep-3c2e6ffd9014d93ff8f36a71503cfe4424e46628.tar.bz2 colin-keep-3c2e6ffd9014d93ff8f36a71503cfe4424e46628.tar.xz colin-keep-3c2e6ffd9014d93ff8f36a71503cfe4424e46628.zip |
fixed call translate
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/gui.pm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/AdminPanel/Rpmdragora/gui.pm b/lib/AdminPanel/Rpmdragora/gui.pm index 0543f5d..882187b 100644 --- a/lib/AdminPanel/Rpmdragora/gui.pm +++ b/lib/AdminPanel/Rpmdragora/gui.pm @@ -123,14 +123,14 @@ our %pkg_columns = ( sub compute_main_window_size { my ($w) = @_; - ($typical_width) = string_size($w->{real_window}, translate("Graphical Environment") . "xmms-more-vis-plugins"); + ($typical_width) = string_size($w->{real_window}, $loc->N("Graphical Environment") . "xmms-more-vis-plugins"); $typical_width > 600 and $typical_width = 600; #- try to not being crazy with a too large value $typical_width < 150 and $typical_width = 150; } sub get_summary { my ($key) = @_; - my $summary = translate($pkgs->{$key}{pkg}->summary); + my $summary = $loc->N($pkgs->{$key}{pkg}->summary); require utf8; utf8::valid($summary) ? $summary : @{[]}; } @@ -184,8 +184,6 @@ sub get_string_from_keywords { @media_types = split(':', $distribconf->getvalue($medium_path, 'media_type')) if $distribconf; } - $DB::single = 1; - my $unsupported = $loc->N("It is <b>not supported</b> by Mageia."); my $dangerous = $loc->N("It may <b>break</b> your system."); my $s = ""; @@ -344,8 +342,6 @@ sub format_pkg_simplifiedinfo { my $update_descr = $descriptions->{$medium}{$name}; # discard update fields if not matching: - $DB::single = 1; - my $is_update = ($upkg->flag_upgrade && $update_descr && $update_descr->{pre}); my $summary = get_summary($key); my $dummy_string = get_main_text($raw_medium, $key, $name, $summary, $is_update, $update_descr); @@ -370,15 +366,18 @@ sub format_pkg_simplifiedinfo { #push @$s, [ build_expander($pkg, $loc->N("Files:"), 'files', sub { files_format($pkg->{files}) }) ]; my $files_link = format_link(format_field($loc->N("Files:")), $hidden_info{files} ); if ($options->{files}) { + $DB::single = 1; # my $files = files_format($pkg->{files}); # utf8::encode($files); + $files_link .= join("\n", $pkg->{files}); # $files_link .= "\n" . $files; } push @$s, join("\n", $files_link, "\n"); #push @$s, [ build_expander($pkg, $loc->N("Changelog:"), 'changelog', sub { $pkg->{changelog} }, $installed_version) ]; my $changelog_link = format_link(format_field($loc->N("Changelog:")), $hidden_info{changelog} ); - if ($options->{files}) { + if ($options->{changelog}) { + $DB::single = 1; # my $changelog = $pkg->{changelog}; # utf8::encode($changelog); # $changelog_link .= "\n" . $changelog; @@ -1475,11 +1474,11 @@ sub do_action { } sub translate_group { - join('/', map { translate($_) } split m|/|, $_[0]); + join('/', map { $loc->N($_) } split m|/|, $_[0]); } sub ctreefy { - join('|', map { translate($_) } split m|/|, $_[0]); + join('|', map { $loc->N($_) } split m|/|, $_[0]); } sub _build_tree { |