X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ca9e45c3ba2ad852123aeb8783eed07ed73ce00c..6d672be5f74146f69df5411f99449d43853d21b0:/doc/plugins/po.mdwn?ds=sidebyside
diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn
index 2f88a3dfe..b7c1582ca 100644
--- a/doc/plugins/po.mdwn
+++ b/doc/plugins/po.mdwn
@@ -49,15 +49,15 @@ Supported languages
`po_master_language` is used to set the "master" language in
`ikiwiki.setup`, such as:
- po_master_language => { 'code' => 'en', 'name' => 'English' }
+ po_master_language: en|English
`po_slave_languages` is used to set the list of supported "slave"
languages, such as:
- po_slave_languages => { 'fr' => 'Français',
- 'es' => 'Castellano',
- 'de' => 'Deutsch',
- }
+ po_slave_languages:
+ - fr|Français
+ - es|Español
+ - de|Deutsch
Decide which pages are translatable
-----------------------------------
@@ -106,17 +106,6 @@ negotiated preferred language, *i.e.* `foo/page/`.
* if the web server does not support Content Negotiation, setting
`po_link_to` to `negotiated` will produce a unusable website.
-### Links appearance
-
-When `po_translation_status_in_links` is enabled, the text of a link
-to a slave pages displays this page's translation status.
-
-When the `po_strictly_refresh_backlinks` setting is enabled, a page is
-refreshed every time a backlinked page is changed. This updates the
-translation status in links, and helps having a consistent translated
-wiki. Beware, this make every page depend on every page that links to
-it, which can slow everything down and bloat the dependency pagespecs.
-
Server support
==============
@@ -125,23 +114,28 @@ Apache
Using Apache `mod_negotiation` makes it really easy to have Apache
serve any page in the client's preferred language, if available.
-This is the default Debian Apache configuration.
-When `usedirs` is enabled, one has to set `DirectoryIndex index` for
-the wiki context.
+Add 'Options MultiViews' to the wiki directory's configuration in Apache.
+
+When `usedirs` is enabled, you should also set `DirectoryIndex index`.
-Setting `DefaultLanguage LL` (replace `LL` with your default MIME
-language code) for the wiki context can help to ensure
-`bla/page/index.en.html` is served as `Content-Language: LL`.
+These settings are also recommended, in order to avoid serving up rss files
+as index pages:
+
+ AddType application/rss+xml;qs=0.8 .rss
+ AddType application/atom+xml;qs=0.8 .atom
+
+For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/content-negotiation.html).
lighttpd
--------
-lighttpd unfortunately does not support content negotiation.
+Recent versions of lighttpd should be able to use
+`$HTTP["language"]` to configure the translated pages to be served.
-**FIXME**: does `mod_magnet` provide the functionality needed to
- emulate this?
+See [Lighttpd Issue](http://redmine.lighttpd.net/issues/show/1119)
+TODO: Example
Usage
=====
@@ -156,29 +150,17 @@ the wiki homepage.
The `ISTRANSLATION` and `ISTRANSLATABLE` variables can be used to
display things only on translatable or translation pages.
+The `LANG_CODE` and `LANG_NAME` variables can respectively be used to
+display the current page's language code and pretty name.
+
### Display page's versions in other languages
The `OTHERLANGUAGES` loop provides ways to display other languages'
versions of the same page, and the translations' status.
-One typically adds the following code to `templates/page.tmpl`:
-
-
-
-
-
- -
- ">
-
- ( %)
-
-
-
-
-
-
-
-The following variables are available inside the loop (for every page in):
+An example of its use can be found in the default
+`templates/page.tmpl`. In case you want to customize it, the following
+variables are available inside the loop (for every page in):
* `URL` - url to the page
* `CODE` - two-letters language code
@@ -189,15 +171,8 @@ The following variables are available inside the loop (for every page in):
### Display the current translation status
The `PERCENTTRANSLATED` variable is set to the translation
-completeness, expressed in percent, on "slave" pages.
-
-One can use it this way:
-
-
-
-
-
-
+completeness, expressed in percent, on "slave" pages. It is used by
+the default `templates/page.tmpl`.
Additional PageSpec tests
-------------------------
@@ -227,7 +202,7 @@ 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
+[[WikiLinks|ikiwiki/wikilink]] that appear on a "slave" page therefore link to
the master page's sub-pages.
Translating
@@ -242,81 +217,44 @@ preferred `$EDITOR`, without needing to be online.
Markup languages support
------------------------
-Markdown is well supported. Some other markup languages supported by
-ikiwiki mostly work, but some pieces of syntax are not rendered
-correctly on the slave pages:
+[[Markdown|mdwn]] and [[html]] are well supported. Some other markup
+languages supported by ikiwiki mostly work, but some pieces of syntax
+are not rendered correctly on the slave pages:
* [[reStructuredText|rst]]: anonymous hyperlinks and internal
cross-references
* [[wikitext]]: conversion of newlines to paragraphs
* [[creole]]: verbatim text is wrapped, tables are broken
-* [[html]] and LaTeX: not supported yet; the dedicated po4a modules
- could be used to support them, but they would need a security audit
+* LaTeX: not supported yet; the dedicated po4a module
+ could be used to support it, but it would need a security audit
* other markup languages have not been tested.
+Renaming a page
+---------------
+
+A translatable page may be renamed using the web interface and the
+[[rename plugin|plugins/rename]], or using the VCS directly; in
+the latter case, *both* the "master" page and every corresponding
+`.po` file must be renamed in the same commit.
+
Security
========
-[[./security]] contains a detailed security analysis of this plugin
+[[po/discussion]] contains a detailed security analysis of this plugin
and its dependencies.
When using po4a older than 0.35, it is recommended to uninstall
`Text::WrapI18N` (Debian package `libtext-wrapi18n-perl`), in order to
avoid a potential denial of service.
-TODO
+BUGS
====
-Better links
-------------
-
-### Page title in links
+[[!inline pages="bugs/po:* and !bugs/done and !link(bugs/done) and !bugs/*/*"
+feeds=no actions=no archive=yes show=0]]
-Using the fix to
-[[bugs/pagetitle_function_does_not_respect_meta_titles]] from
-[[intrigeri]]'s `meta` branch, the generated links' text is based on
-the page titles set with the [[meta|plugins/meta]] plugin. This has to
-be merged into ikiwiki upstream, though.
-
-Robustness tests
-----------------
-
-### Enabling/disabling the plugin
-
-* enabling the plugin with `po_translatable_pages` set to blacklist: **OK**
-* enabling the plugin with `po_translatable_pages` set to whitelist: **OK**
-* enabling the plugin without `po_translatable_pages` set: **OK**
-* disabling the plugin: **OK**
-
-### Changing the plugin config
-
-* adding existing pages to `po_translatable_pages`: **OK**
-* removing existing pages from `po_translatable_pages`: **OK**
-* adding a language to `po_slave_languages`: **OK**
-* removing a language from `po_slave_languages`: **OK**
-* changing `po_master_language`: **OK**
-* replacing `po_master_language` with a language previously part of
- `po_slave_languages`: needs two rebuilds, but **OK** (this is quite
- a perverse test actually)
-
-### Creating/deleting/renaming pages
-
-All cases of master/slave page creation/deletion/rename, both via RCS
-and via CGI, have been tested.
-
-### Misc
-
-* general test with `usedirs` disabled: **OK**
-* general test with `indexpages` enabled: **not OK**
-* general test with `po_link_to=default` with `userdirs` enabled: **OK**
-* general test with `po_link_to=default` with `userdirs` disabled: **OK**
-
-Misc. bugs
-----------
-
-Documentation
--------------
+TODO
+====
-Maybe write separate documentation depending on the people it targets:
-translators, wiki administrators, hackers. This plugin may be complex
-enough to deserve this.
+[[!inline pages="todo/po:* and !todo/done and !link(todo/done) and !todo/*/*"
+feeds=no actions=no archive=yes show=0]]