]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/po.mdwn
po plugin: move translatable pages to setup file, refactor
[git.ikiwiki.info.git] / doc / plugins / po.mdwn
index 991f25c069712c6decb626ae6d8958b608d8c400..20ca5c4a537e38b32f17e87855895b9bdb653a3f 100644 (file)
@@ -46,6 +46,17 @@ languages, such as:
                                 'de' => { 'name' => 'Deutsch', }
         }
 
+Decide which pages are translatable
+-----------------------------------
+
+The `po_translatable_pages` setting configures what pages are
+translatable. It is a [[ikiwiki/PageSpec]], so you have lots of
+control over what kind of pages are translatable.
+
+The `*.LL.po` translations files are anyway not considered as being
+translatable, so you don't need to worry about excluding them manually
+from this [[ikiwiki/PageSpec]].
+
 Internal links
 --------------
 
@@ -112,6 +123,16 @@ lighttpd unfortunately does not support content negotiation.
 TODO
 ====
 
+Optimization
+------------
+
+Pre-compute what can be early in the build process:
+
+- the list of translatable (master) pages
+- for every translatable page, the list of slave pages
+
+... and/or memoize `istranslation`/`istranslatable` function calls.
+
 Display available translations
 ------------------------------
 
@@ -131,17 +152,6 @@ implemented as a
 loop, a page using it should depend on any "master" and "slave" pages
 whose status is being displayed.
 
-Decide which pages are translatable
------------------------------------
-
-The subset of "master" pages subject to translation must be
-configurable:
-
-- a `[[!translatable ]]` directive, when put on a page, makes it
-  translatable
-- to set at once a bunch of pages as being translatable, use this
-  [[ikiwiki/directive]] with the `match=PageSpec` argument.
-
 Automatic PO files update
 -------------------------
 
@@ -163,6 +173,8 @@ The latter can be implemented by making any "slave" page depend on the
 corresponding "master" page. The `add_depends` function can achieve
 this, if used in a **FIXME** hook.
 
+The POT files should not be published on the wiki.
+
 UI consistency: rename "Edit" button on slave pages
 ---------------------------------------------------