summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-11-12 15:04:50 +0100
committerintrigeri <intrigeri@boum.org>2008-11-12 15:04:50 +0100
commiteba2dee941c18b3a1bd9c8af52c01ba7b5b46a64 (patch)
tree87d09d47379c5d7845532f65d8e75bd9f719709e
parentb19d0d3d245c7c2b605ac6c972c73c909a941db4 (diff)
po: compute internal links from a slave page relative to its master page
e.g. a link appearing on a slave page links to its masterpage's subpages. Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--IkiWiki/Plugin/po.pm2
-rw-r--r--doc/plugins/po.mdwn13
2 files changed, 7 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 492b05c47..45ed96c65 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -390,7 +390,7 @@ sub mybestlink ($$) { #{{{
my $page=shift;
my $link=shift;
- my $res=$origsubs{'bestlink'}->($page, $link);
+ my $res=$origsubs{'bestlink'}->(masterpage($page), $link);
if (length $res
&& ($config{po_link_to} eq "current" || $config{po_link_to} eq "negotiated")
&& istranslatable($res)
diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn
index eeeabe730..cb0dd65c0 100644
--- a/doc/plugins/po.mdwn
+++ b/doc/plugins/po.mdwn
@@ -198,14 +198,18 @@ Also, when the plugin has just been enabled, or when a page has just
been declared as being translatable, the needed POT and PO files are
created, and the PO files are checked into version control.
-Discussion pages
-----------------
+Discussion pages and other sub-pages
+------------------------------------
Discussion should happen in the language in which the pages are
written for real, *i.e.* the "master" one. If discussion pages are
enabled, "slave" pages therefore link to the "master" page's
discussion page.
+Likewise, "slave" pages are not supposed to have sub-pages;
+[[WikiLinks|wikilink]] that appear on a "slave" page therefore link to
+the master page's sub-pages.
+
Translating
-----------
@@ -499,11 +503,6 @@ gettext/po4a rough corners
Better links
------------
-### Subpages
-
-On a translation page, links to subpages should actually be links to
-the master page's subpages. They currently appear as broken links.
-
### Page title in links
To use the page titles set with the [[meta|plugins/meta]] plugin when