aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2016-08-08 15:02:44 +0159
committerAngelo Naselli <anaselli@linux.it>2016-08-08 15:02:44 +0159
commit2061645868375269041b7f3690181989bd55bbe3 (patch)
treef7952ddc7b0338279360aa79d4c5a82573568a66 /lib/ManaTools
parent3dfe1d66d41da0311ccb0ec5c7f98b7d63cf635d (diff)
downloadmanatools-2061645868375269041b7f3690181989bd55bbe3.tar
manatools-2061645868375269041b7f3690181989bd55bbe3.tar.gz
manatools-2061645868375269041b7f3690181989bd55bbe3.tar.bz2
manatools-2061645868375269041b7f3690181989bd55bbe3.tar.xz
manatools-2061645868375269041b7f3690181989bd55bbe3.zip
mga#19136 When no files or Changelog are present "Not available" is not
shown as UTF-8 when translated
Diffstat (limited to 'lib/ManaTools')
-rw-r--r--lib/ManaTools/Rpmdragora/gui.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/ManaTools/Rpmdragora/gui.pm b/lib/ManaTools/Rpmdragora/gui.pm
index bd36d809..82c40bcf 100644
--- a/lib/ManaTools/Rpmdragora/gui.pm
+++ b/lib/ManaTools/Rpmdragora/gui.pm
@@ -334,8 +334,10 @@ sub _format_pkg_simplifiedinfo {
my $detail_link = format_link(format_field($loc->N("Details:")), $hidden_info{details} );
if ($options->{details}) {
my $details = get_details($pkg, $upkg, $installed_version, $raw_medium);
- utf8::encode($details);
- $detail_link .= "\n" . $details;
+ if (! utf8::is_utf8($details)) {
+ utf8::encode($details);
+ }
+ $detail_link .= "<br />&nbsp;&nbsp;&nbsp;" . $details;
}
push @$s, join("\n", $detail_link, "\n");
@@ -347,8 +349,10 @@ sub _format_pkg_simplifiedinfo {
extract_header($pkg, $urpm, 'files', $installed_version);
}
my $files = $pkg->{files} ? files_format($pkg->{files}) : $loc->N("(Not available)");
- utf8::encode($files);
- $files_link .= "\n\n" . $files;
+ if (! utf8::is_utf8($files)) {
+ utf8::encode($files);
+ }
+ $files_link .= "<br />&nbsp;&nbsp;&nbsp;" . $files;
ManaTools::rpmdragora::remove_wait_msg($wait);
}
push @$s, join("\n", $files_link, "\n");
@@ -363,8 +367,9 @@ sub _format_pkg_simplifiedinfo {
extract_header($pkg, $urpm, 'changelog', $installed_version);
@changelog = $pkg->{changelog} ? @{$pkg->{changelog}} : ( $loc->N("(Not available)") );
}
- utf8::encode(\@changelog);
-
+ if (! utf8::is_utf8(\@changelog)) {
+ utf8::encode(\@changelog);
+ }
$changelog_link .= "<br />&nbsp;&nbsp;&nbsp;" . join("<br />&nbsp;&nbsp;&nbsp;", @changelog);
$changelog_link =~ s|\n||g;
ManaTools::rpmdragora::remove_wait_msg($wait);