]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
Added a comment
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index d3a996a2189fd24c007ea4127ed0a56faf9d7c8b..6410a1c663ceba0b615a6d3959bb27c3dd20b609 100644 (file)
@@ -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;