From bd50ba3e8392db13c584b4166783ee4794b20365 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 7 Oct 2008 22:39:17 +0200 Subject: po plugin: switch to page.LL.html naming convention Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 8 ++++---- doc/plugins/po.mdwn | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 941f5629d..b33d4dc1b 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -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') { - return $masterpage . "." . $ext . "." . $lang; + return $masterpage . "." . $lang . "." . $ext; } else { - return $masterpage . "/index." . $ext . "." . $lang; + return $masterpage . "/index." . $lang . "." . $ext; } } else { if (! $config{usedirs} || $page eq 'index') { - return $page . "." . $ext . "." . $config{po_master_language}{code}; + return $page . "." . $config{po_master_language}{code} . "." . $ext; } else { - return $page . "/index." . $ext . "." . $config{po_master_language}{code}; + return $page . "/index." . $config{po_master_language}{code} . "." . $ext; } } } #}}} diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index fddfe5c41..e7a93469c 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -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 -`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 @@ -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 -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 @@ -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 -`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 -------- -- cgit v1.2.3