aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-08-27 20:19:17 +0200
committerintrigeri <intrigeri@boum.org>2009-08-27 20:19:17 +0200
commit6c0f9c691c3df3a2ec30dec626c997623568a400 (patch)
tree4614c38828185f3f9d594ef5b7f6f07dc375955e /IkiWiki
parent3c2bffe21b91684971155ab41b15dacc515b2fc5 (diff)
downloadikiwiki-6c0f9c691c3df3a2ec30dec626c997623568a400.tar
ikiwiki-6c0f9c691c3df3a2ec30dec626c997623568a400.tar.gz
po: override the title template variable for coherent homepage titling
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 3039334c4..2b2839f24 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -302,6 +302,9 @@ sub pagetemplate (@) {
&& $masterpage eq "index") {
$template->param('parentlinks' => []);
}
+ if (ishomepage($page) && $template->query(name => "title")) {
+ $template->param(title => $config{wikiname});
+ }
} # }}}
# Add the renamed page translations to the list of to-be-renamed pages.
@@ -960,6 +963,14 @@ sub homepageurl (;$) {
return urlto('', $page);
}
+sub ishomepage ($) {
+ my $page = shift;
+
+ return 1 if $page eq 'index';
+ map { return 1 if $page eq 'index.'.$_ } keys %{$config{po_slave_languages}};
+ return undef;
+}
+
sub deletetranslations ($) {
my $deletedmasterfile=shift;