X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b5e2afa94390dd3349fed81f72892da3beba56ed..b31dc8d994d1cfd179c330a729dcb8bce0b293c2:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 2ee27ac3e..41276e118 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -82,7 +82,7 @@ sub checkconfig () { #{{{ eval q{use POSIX}; error($@) if $@; $ENV{LANG} = $config{locale} - if POSIX::setlocale(&POSIX::LC_TIME, $config{locale}); + if POSIX::setlocale(&POSIX::LC_ALL, $config{locale}); } if ($config{w3mmode}) { @@ -319,6 +319,10 @@ sub bestlink ($$) { #{{{ } } while $cwd=~s!/?[^/]+$!!; + if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) { + return "$config{userdir}/".lc($link); + } + #print STDERR "warning: page $page, broken link: $link\n"; return ""; } #}}} @@ -513,6 +517,10 @@ sub preprocess ($$$;$) { #{{{ if ($preprocessing{$page}++ > 3) { # Avoid loops of preprocessed pages preprocessing # other pages that preprocess them, etc. + #translators: The first parameter is a + #translators: preprocessor directive name, + #translators: the second a page name, the + #translators: third a number. return "[[".sprintf(gettext("%s preprocessing loop detected on %s at depth %i"), $command, $page, $preprocessing{$page}). "]]";