]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/po.pm
Merge remote branch 'upstream/master' into prv/po
[ikiwiki.git] / IkiWiki / Plugin / po.pm
index ab39cca121b63f780b31f68d94991a517f5afa5a..79142ed1fe62396f17cff88cbfe914acb40896f7 100644 (file)
@@ -1249,8 +1249,8 @@ sub splitlangpair ($) {
        if (! defined $code || ! defined $name ||
            ! length $code || ! length $name) {
                # not a fatal error to avoid breaking if used with web setup
-               print STDERR sprintf(gettext("%s has invalid syntax: must use CODE|NAME"),
-                       $pair)."\n";
+               warn sprintf(gettext("%s has invalid syntax: must use CODE|NAME"),
+                       $pair);
        }
 
        return $code, $name;
@@ -1297,7 +1297,7 @@ sub match_lang ($$;@) {
 
        my $regexp=IkiWiki::glob2re($wanted);
        my $lang=IkiWiki::Plugin::po::lang($page);
-       if ($lang !~ /^$regexp$/i) {
+       if ($lang !~ $regexp) {
                return IkiWiki::FailReason->new("file language is $lang, not $wanted");
        }
        else {