]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
Improve translatable texts to ease translation (e.g. to→into and from→inside)
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index 6aacca53a6ca1635e57143e43847f3b793095ebb..193cf0a543a24f05c5221eb1b8557d83ba38e98e 100644 (file)
@@ -152,13 +152,15 @@ sub checkconfig () {
        push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/;
 
        # Translated versions of the underlays are added if available.
-       foreach my $underlay ("basewiki", map { m/^\Q$config{underlaydirbase}\E\/*(.*)/ } reverse @{$config{underlaydirs}}) {
+       foreach my $underlay ("basewiki",
+                             map { m/^\Q$config{underlaydirbase}\E\/*(.*)/ }
+                                 reverse @{$config{underlaydirs}}) {
                next if $underlay=~/^locale\//;
 
-               # Add underlays containing the po files for slave languages.
+               # Underlays containing the po files for slave languages.
                foreach my $ll (keys %{$config{po_slave_languages}}) {
-                       add_underlay("locale/mo/$underlay")
-                               if -d "$config{underlaydirbase}/locale/mo/$underlay";
+                       add_underlay("po/$ll/$underlay")
+                               if -d "$config{underlaydirbase}/po/$ll/$underlay";
                }
        
                if ($config{po_master_language}{code} ne 'en') {
@@ -1088,8 +1090,8 @@ sub isvalidpo ($) {
        if ($res) {
            return IkiWiki::SuccessReason->new("valid gettext data");
        }
-       return IkiWiki::FailReason->new("invalid gettext data, go back ".
-                                       "to previous page to go on with edit");
+       return IkiWiki::FailReason->new(gettext("invalid gettext data, go back ".
+                                       "to previous page to continue edit"));
 }
 
 # ,----