X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3cd0c1f91a8e4b7accfe75d132066b79da4379fd..414ccfb1e298a722d2afa8b8540ca84dc1ccc6f2:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index d3a996a21..6410a1c66 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -343,6 +343,13 @@ sub pagetemplate (@) { if ($template->query(name => "istranslatable")) { $template->param(istranslatable => istranslatable($page)); } + my $lang_code = istranslation($page) ? lang($page) : $master_language_code; + if ($template->query(name => "lang_code")) { + $template->param(lang_code => $lang_code); + } + if ($template->query(name => "lang_name")) { + $template->param(lang_name => languagename($lang_code)); + } if ($template->query(name => "HOMEPAGEURL")) { $template->param(homepageurl => homepageurl($page)); } @@ -1246,6 +1253,7 @@ sub po4a_options($) { # how to disable options is not consistent across po4a modules $options{includessi} = ''; $options{includeexternal} = 0; + $options{ontagerror} = 'warn'; } elsif ($pagetype eq 'mdwn') { $options{markdown} = 1;