summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-12-30 23:00:46 +0100
committerintrigeri <intrigeri@boum.org>2008-12-30 23:00:46 +0100
commitf586eafe90510a49b37052c39b1b60e23c20e081 (patch)
tree7de76ef86ac2e736542292fa9183482069d17eef /IkiWiki/Plugin
parent5738f30a2954705f7954e7fb99205f5a08d35ccb (diff)
po: remove renamed pages special handling, not needed anymore
Thanks to the new rename hook behaviour, the whole renaming work is now done by the rename plugin, and we don't need to remember which pages were renamed.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm46
1 files changed, 1 insertions, 45 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 15b07e84b..d8a7de8eb 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -337,7 +337,6 @@ sub renamepages() { #{{{
foreach my $rename (@torename) {
next unless istranslatable($rename->{src});
- setrenamed($rename->{src}, $rename->{dest});
my %otherpages=%{otherlanguages($rename->{src})};
debug "bla".$rename->{src};
while (my ($lang, $otherpage) = each %otherpages) {
@@ -358,18 +357,12 @@ sub mydelete(@) { #{{{
map {
deletetranslations($_);
- } grep { istranslatablefile($_) && ! renamed(pagename($_))} @deleted;
+ } grep { istranslatablefile($_) } @deleted;
} #}}}
sub change(@) { #{{{
my @rendered=@_;
- my $eachrenamed=eachrenamed();
- while (my ($oldpage, $newpage) = $eachrenamed->()) {
- renametranslations($oldpage, $newpage);
- }
- resetrenamed();
-
my $updated_po_files=0;
# Refresh/create POT and PO files as needed.
@@ -531,35 +524,6 @@ sub myurlto ($$;$) { #{{{
} #}}}
}
-{
- my %renamed;
-
- sub renamed ($) { #{{{
- my $page=shift;
-
- if (exists $renamed{$page} &&
- defined $renamed{$page}) {
- return $renamed{$page};
- }
- return;
- } #}}}
-
- sub setrenamed ($$) { #{{{
- my $oldpage=shift;
- my $newpage=shift;
-
- $renamed{$oldpage}=$newpage;
- } #}}}
-
- sub resetrenamed () { #{{{
- undef %renamed;
- } #}}}
-
- sub eachrenamed () { #{{{
- return sub { each %renamed };
- } #}}}
-}
-
# ,----
# | Helper functions
# `----
@@ -833,14 +797,6 @@ sub deletetranslations ($) { #{{{
debug "po(deletetranslations): TODO: delete translations of $deletedmasterfile";
} #}}}
-sub renametranslations (@) { #{{{
- my ($oldpage, $newpage)=(shift, shift);
-
- # FIXME - not needed anymore : debug "po(renametranslations): TODO: rename translations of $oldpage to $newpage";
-
-} #}}}
-
-
# ,----
# | PageSpec's
# `----