]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of git://git.ikiwiki.info
authorJon Dowland <jon@ra.ncl.ac.uk>
Tue, 21 Jul 2009 10:45:29 +0000 (11:45 +0100)
committerJon Dowland <jon@ra.ncl.ac.uk>
Tue, 21 Jul 2009 10:45:29 +0000 (11:45 +0100)
IkiWiki/Plugin/po.pm
doc/plugins/po.mdwn

index 6aacca53a6ca1635e57143e43847f3b793095ebb..70d678897a137436dbf6d15288206cb75d4200f6 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("locale/po/$ll/$underlay")
+                               if -d "$config{underlaydirbase}/locale/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"));
 }
 
 # ,----
index 36b44cd7f43bf180e94732de649c0508fe5aecca..f69f84ae9f1608405b7119d4777a45a9639f8b42 100644 (file)
@@ -268,6 +268,17 @@ That used to be so, but the bug was fixed. Does this mean
 that po might be replacing the only link on a page, in error? 
 --[[Joey]] 
 
+Bug when editing underlay file
+------------------------------
+
+While I've gotten translated underlays working, there is a bug
+if the wiki is currently using a page from the underlay, and the master
+language version is edited. This causes the edited page to be saved
+to srcdir.. and all the translations get set to 0% and their
+po files have the translated strings "emptied". What's really going on
+is that these are entirely new po files not based on the old ones
+in the basewiki, and thus lacking translations. --[[Joey]] 
+
 Documentation
 -------------