]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po(otherlanguagesloop): start factorizing
authorintrigeri <intrigeri@boum.org>
Mon, 10 Nov 2008 17:38:25 +0000 (18:38 +0100)
committerintrigeri <intrigeri@boum.org>
Mon, 10 Nov 2008 17:38:25 +0000 (18:38 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 0666142cb49628d4294c2390aaecff17f52af12b..5383027b826ce396c8a58e1530598c821a325008 100644 (file)
@@ -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,