From: intrigeri Date: Mon, 10 Nov 2008 17:38:25 +0000 (+0100) Subject: po(otherlanguagesloop): start factorizing X-Git-Tag: 3.15~365 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=864bc2d9d0507a3b3f67ab785e347e37a8eaf9fa;p=ikiwiki.git po(otherlanguagesloop): start factorizing Signed-off-by: intrigeri --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 0666142cb..5383027b8 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -494,8 +494,8 @@ sub otherlanguagesloop ($) { #{{{ my @ret; if (istranslatable($page)) { - foreach my $lang (sort keys %{$translations{$page}}) { - my $translation = $translations{$page}{$lang}; + my %otherpages=%{otherlanguages($page)}; + while (my ($lang, $translation) = each %otherpages) { push @ret, { url => urlto($translation, $page), code => $lang,