summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-10-10 15:35:55 +0200
committerintrigeri <intrigeri@boum.org>2008-10-18 15:49:09 +0200
commit9c25f5cfe93899f6ac7da3c8c8d0939cff9a20b6 (patch)
treeb0e561a8660491706ad68311330eda3ce43c0d26
parente82c6b1908b21b5e4246767d6a87fe46245e5e29 (diff)
po plugin: rewrite internal linking specification
(not implemented yet) Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--doc/plugins/po.mdwn43
1 files changed, 27 insertions, 16 deletions
diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn
index fd8a50e0b..d2f572706 100644
--- a/doc/plugins/po.mdwn
+++ b/doc/plugins/po.mdwn
@@ -77,28 +77,39 @@ lighttpd unfortunately does not support content negotiation.
TODO
====
-Links
------
+Internal links
+--------------
-Choice between two behaviors must be possible in `ikiwiki.setup`;
-a `po_link_to_current_language` option must allow switching
-between them.
+One can use the `po_link_to_` option in `ikiwiki.setup` to choose how
+internal links should be generated, depending on web server features
+and site-specific preferences.
-If `po_link_to_current_language` is disabled, `[[page]]` links to the
-negotiated preferred language, i.e.:
+### Default linking behavior
-- `usedirs` enabled: `bla/page/`
-- `usedirs` disabled: `bla/page`
+If `po_link_to` is unset, or set to `default`, ikiwiki's default
+linking behavior is preserved: `[[page]]` links to the master
+language's page.
-This obviously does not work in case Content Negotiation is not
-supported by the web server, hence one can enable
-`po_link_to_current_language` to make `[[page]]` link to the current
-page's language, i.e.:
+### Link to negotiated language
-- `usedirs` enabled: `bla/page/index.LL.html`
-- `usedirs` disabled: `bla/page.LL.html`
+If `po_link_to` is set to `negotiated`, `[[page]]` links to the
+negotiated preferred language, *i.e.* `foo/page/`.
-**FIXME**: should `po_link_to_current_language` be enabled by default?
+(In)compatibility notes:
+
+- `po_link_to => negotiated` provides no useful behavior if `usedirs`
+ is disabled:
+- `po_link_to => negotiated` provides no useful behavior if the web
+ server does not support Content Negotiation
+
+### Link to current language
+
+If `po_link_to` is set to `current` and the destination page is either
+a translatable page or a translation, `[[page]]` links to the current
+page's language, *i.e.*:
+
+- `foo/page/index.LL.html` if `usedirs` is enabled
+- `foo/page.LL.html` if `usedirs` is disabled
Display available translations
------------------------------