aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/formatting.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-08 16:02:14 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-08 16:02:14 +0000
commit0ed66231cb182f36611444dbd643ad5dbd7e2c1c (patch)
tree98edc15128240be3beccea41456fb290bc36d4c3 /Rpmdrake/formatting.pm
parent6061f17e5324cd123bb7f49d5d262bb02cfa72f0 (diff)
downloadrpmdrake-0ed66231cb182f36611444dbd643ad5dbd7e2c1c.tar
rpmdrake-0ed66231cb182f36611444dbd643ad5dbd7e2c1c.tar.gz
rpmdrake-0ed66231cb182f36611444dbd643ad5dbd7e2c1c.tar.bz2
rpmdrake-0ed66231cb182f36611444dbd643ad5dbd7e2c1c.tar.xz
rpmdrake-0ed66231cb182f36611444dbd643ad5dbd7e2c1c.zip
(format_changelog_changelogs) factorize formatting unlocalized changelogs
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r--Rpmdrake/formatting.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 3b987c67..29f187ea 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -35,6 +35,7 @@ use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(
$spacing
+ format_changelog_changelogs
format_changelog_string
format_field
format_header
@@ -101,6 +102,13 @@ sub format_changelog_string {
[ map { [ "$spacing$_\n", if_(/^\*/, { 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD }) ] } split("\n", $_[0]) ];
}
+sub format_changelog_changelogs {
+ my (@changelogs) = @_;
+ format_changelog_string(join("\n", map {
+ "* " . localtime2changelog($_->{time}) . " $_->{name}\n\n$_->{text}\n";
+ } @changelogs));
+}
+
sub format_update_field {
my ($name) = @_;
'<i>' . eval { escape_text_for_TextView_markup_format($name) } . '</i>';