]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po plugin: switch to page.LL.html naming convention
authorintrigeri <intrigeri@boum.org>
Tue, 7 Oct 2008 20:39:17 +0000 (22:39 +0200)
committerintrigeri <intrigeri@boum.org>
Sat, 18 Oct 2008 13:49:08 +0000 (15:49 +0200)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm
doc/plugins/po.mdwn

index 941f5629d0d0a14102c4cb9ee000a814815177f4..b33d4dc1bb6b3b21037e5d78367d9b5e248588ec 100644 (file)
@@ -54,18 +54,18 @@ sub targetpage (@) { #{{{
        if (IkiWiki::PageSpec::match_istranslation($page, $page)) {
                my ($masterpage, $lang) = ($page =~ /(.*)[.]([a-z]{2})$/);
                if (! $config{usedirs} || $page eq 'index') {
        if (IkiWiki::PageSpec::match_istranslation($page, $page)) {
                my ($masterpage, $lang) = ($page =~ /(.*)[.]([a-z]{2})$/);
                if (! $config{usedirs} || $page eq 'index') {
-                       return $masterpage . "." . $ext . "." . $lang;
+                       return $masterpage . "." . $lang . "." . $ext;
                }
                else {
                }
                else {
-                       return $masterpage . "/index." . $ext . "." . $lang;
+                       return $masterpage . "/index." . $lang . "." . $ext;
                }
        }
        else {
                if (! $config{usedirs} || $page eq 'index') {
                }
        }
        else {
                if (! $config{usedirs} || $page eq 'index') {
-                       return $page . "." . $ext . "." . $config{po_master_language}{code};
+                       return $page . "." . $config{po_master_language}{code} . "." . $ext;
                }
                else {
                }
                else {
-                       return $page . "/index." . $ext . "." . $config{po_master_language}{code};
+                       return $page . "/index." . $config{po_master_language}{code} . "." . $ext;
                }
        }
 } #}}}
                }
        }
 } #}}}
index fddfe5c41756a0b87bbe735f2d22ecb6b992c651..e7a93469c05a51c05bd2583d00d2d7a554e0cf12 100644 (file)
@@ -15,7 +15,7 @@ a "master" page, and is written in any supported format but PO.
 
 Example: `bla/page.mdwn` is a "master" Markdown page written in
 English; if `usedirs` is enabled, it is rendered as
 
 Example: `bla/page.mdwn` is a "master" Markdown page written in
 English; if `usedirs` is enabled, it is rendered as
-`bla/page/index.html.en`, else as `bla/page.html.en`.
+`bla/page/index.en.html`, else as `bla/page.en.html`.
 
 Any translation of a "master" page into a "slave" language is called
 a "slave" page; it is written in the gettext PO format. PO is now
 
 Any translation of a "master" page into a "slave" language is called
 a "slave" page; it is written in the gettext PO format. PO is now
@@ -23,7 +23,7 @@ a page type supported by ikiwiki.
 
 Example: `bla/page.fr.po` is the PO "message catalog" used to
 translate `bla/page.mdwn` into French; if `usedirs` is enabled, it is
 
 Example: `bla/page.fr.po` is the PO "message catalog" used to
 translate `bla/page.mdwn` into French; if `usedirs` is enabled, it is
-rendered as `bla/page/index.html.fr`, else as `bla/page.html.fr`
+rendered as `bla/page/index.fr.html`, else as `bla/page.fr.html`
 
 
 Configuration
 
 
 Configuration
@@ -58,8 +58,8 @@ the wiki context.
 
 Setting `DefaultLanguage LL` (replace `LL` with your default MIME
 language) for the wiki context can be needed, to ensure
 
 Setting `DefaultLanguage LL` (replace `LL` with your default MIME
 language) for the wiki context can be needed, to ensure
-`bla/page/index.html.en` is served as `Content-Language: LL`.
-**FIXME**: is it still needed with the new `.html.en` naming convention?
+`bla/page/index.en.html` is served as `Content-Language: LL`.
+**FIXME**: is it still needed with the new `.en.html` naming convention?
 
 lighttpd
 --------
 
 lighttpd
 --------