aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/formatting.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-06 14:02:31 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-06 14:02:31 +0000
commitace7bea78b504511acf83bf9b8ce5b1249611797 (patch)
tree0b6264254db905983a85344efa8c1ac29f443301 /Rpmdrake/formatting.pm
parentb4c69ad18d625e098466af8d0d0e2a5c82270605 (diff)
downloadrpmdrake-ace7bea78b504511acf83bf9b8ce5b1249611797.tar
rpmdrake-ace7bea78b504511acf83bf9b8ce5b1249611797.tar.gz
rpmdrake-ace7bea78b504511acf83bf9b8ce5b1249611797.tar.bz2
rpmdrake-ace7bea78b504511acf83bf9b8ce5b1249611797.tar.xz
rpmdrake-ace7bea78b504511acf83bf9b8ce5b1249611797.zip
(format_size) split it out of perform_installation() (needed for next commit)
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r--Rpmdrake/formatting.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 39453fb1..51ac8935 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -33,7 +33,7 @@ use ugtk2 qw(escape_text_for_TextView_markup_format);
use Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(format_field format_header format_name_n_summary localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name);
+our @EXPORT = qw(format_field format_header format_name_n_summary format_size localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name);
sub rpm_description {
@@ -97,4 +97,11 @@ sub format_field {
'<b>' . escape_text_for_TextView_markup_format($str) . '</b>';
}
+sub format_size {
+ my ($size) = @_;
+ $size >= 0 ?
+ N("%s of additional disk space will be used.", formatXiB($size)) :
+ N("%s of disk space will be freed.", formatXiB(-$size));
+ }
+
1;