From 834b6ef44c5ba47cf15da9f002edfb7a3a437c9d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 19 Jul 2009 15:13:47 -0400 Subject: meta language vs po language... --- doc/todo/language_definition_for_the_meta_plugin.mdwn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/todo/language_definition_for_the_meta_plugin.mdwn b/doc/todo/language_definition_for_the_meta_plugin.mdwn index 8c4b45141..90bfbef3b 100644 --- a/doc/todo/language_definition_for_the_meta_plugin.mdwn +++ b/doc/todo/language_definition_for_the_meta_plugin.mdwn @@ -93,4 +93,9 @@ This may be useful for sites with a few pages in different languages, but no ful >> it'll need `tr/_/-/` after the optional `.encoding` is removed. >> --[[smcv]] +>>> Now that po has been merged, this patch should probably also be adapted +>>> so that the po plugin forces the meta::lang of every page to what po +>>> thinks it should be. Perhaps [[the_special_po_pagespecs|ikiwiki/pagespec/po]] +>>> should also work with meta-assigned languages? --[[smcv]] + [[!tag wishlist patch plugins/meta translation]] -- cgit v1.2.3 From 8be86ce59695341f2e7db4fcb61fc0e8bf8f51c8 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 19 Jul 2009 15:17:17 -0400 Subject: Use a link that will work on other wikis --- doc/ikiwiki/pagespec/po.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ikiwiki/pagespec/po.mdwn b/doc/ikiwiki/pagespec/po.mdwn index 7541d102b..e0264dd50 100644 --- a/doc/ikiwiki/pagespec/po.mdwn +++ b/doc/ikiwiki/pagespec/po.mdwn @@ -2,7 +2,7 @@ then="This wiki has po support **enabled**." else="This wiki has po support **disabled**."]] -If the [po](plugins/po) plugin is enabled, the regular +If the [[!iki plugins/po desc=po]] plugin is enabled, the regular [[ikiwiki/PageSpec]] syntax is expanded with the following additional tests that can be used to improve user navigation in a multi-lingual wiki: -- cgit v1.2.3 From 33e93cd5e9baef67448dca2607c31b3330951bb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 22:46:53 +0200 Subject: speed up incremental underlaypo runs --- Makefile.PL | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.PL b/Makefile.PL index b2d027bc4..4021a0a5d 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -58,6 +58,7 @@ underlaypo: ikiwiki.out install -d po/underlays/directives/ikiwiki/directive for file in doc/ikiwiki/directive/*; do \ if [ -f "$$file" ]; then \ + cp -a $$file po/underlays/directives/ikiwiki/directive || \ install -m 644 $$file po/underlays/directives/ikiwiki/directive; \ fi \ done -- cgit v1.2.3 From 54280d02153d033fe87ffd6fea71d08fc1ed10a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 23:01:43 +0200 Subject: bad po plugin bug --- doc/plugins/po.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2d59c03fa..156cb6cb3 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -260,6 +260,23 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] +Re-render bug +------------- + +If .ikiwiki is deleted and a wiki is rebuilt from scratch, and +po has created po files before, something wrong happens: + +> joey@gnu:~/src/ikiwiki/po/html>ls -l index* +> -rw-r--r-- 1 joey joey 1159 Jul 19 22:51 index.html +> +> index.de: +> total 4 +> -rw-r--r-- 1 joey joey 1829 Jul 19 22:51 index.html + +index.de/index.html contains the raw po file shoved into +page.tmpl. I have only gotten as far as guessing it is a bug in +`_istranslation` --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From a7e5541c4d3f717811551d574af528236fa5f214 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 23:55:58 +0200 Subject: %links dedup bug? --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 156cb6cb3..a0d3e7a93 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -277,6 +277,15 @@ index.de/index.html contains the raw po file shoved into page.tmpl. I have only gotten as far as guessing it is a bug in `_istranslation` --[[Joey]] +Duplicate %links ? +------------------ + +I notice code in the scan hook that seems to assume +that %links will accumulate duplicate links for a page. +That used to be so, but the bug was fixed. Does this mean +that po might be replacing the only link on a page, in error? +--[[Joey]] + Documentation ------------- -- cgit v1.2.3 From 08254c722032a2cf67c3fb1a1681c977fb204355 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Jul 2009 00:06:41 +0200 Subject: use empty underlay dirs when building po underlays --- Makefile.PL | 1 + underlaypo.setup | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 4021a0a5d..3db5c0d40 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -62,6 +62,7 @@ underlaypo: ikiwiki.out install -m 644 $$file po/underlays/directives/ikiwiki/directive; \ fi \ done + install -d po/underlays/empty $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup underlaypo.setup -refresh find po/underlays -name \*.mdwn | xargs rm -f diff --git a/underlaypo.setup b/underlaypo.setup index c0d503f49..cc8be38ea 100644 --- a/underlaypo.setup +++ b/underlaypo.setup @@ -8,8 +8,8 @@ use IkiWiki::Setup::Standard { # will excessively bloat things. po_slave_languages => { #'fr' => 'Français', - #'es' => 'Español', - #'de' => 'Deutsch', + #'es' => 'Español', + #'de' => 'Deutsch', }, po_master_language => { 'code' => 'en', 'name' => 'English' }, po_translatable_pages => "*", @@ -20,8 +20,8 @@ use IkiWiki::Setup::Standard { destdir => "po/html", templatedir => "templates", # we don't want to pull in the normal underlays - underlaydirbase => "po/underlays", - underlaydir => "po/underlays/basewiki", + underlaydirbase => "po/underlays/empty", + underlaydir => "po/underlays/empty", discussion => 0, locale => '', verbose => 1, -- cgit v1.2.3 From 7865433d8ea1c37a84b191556886d1803a405a16 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Jul 2009 00:11:56 +0200 Subject: update, think I have the real bug this time --- doc/plugins/po.mdwn | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index a0d3e7a93..e1cb0b5b9 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -260,22 +260,18 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] -Re-render bug -------------- +po files in underlay +-------------------- -If .ikiwiki is deleted and a wiki is rebuilt from scratch, and -po has created po files before, something wrong happens: +I think this plugin doesn't yet allow po files to be present in an +underlay to translate files also from the underlay. -> joey@gnu:~/src/ikiwiki/po/html>ls -l index* -> -rw-r--r-- 1 joey joey 1159 Jul 19 22:51 index.html -> -> index.de: -> total 4 -> -rw-r--r-- 1 joey joey 1829 Jul 19 22:51 index.html +In `istranslatablefile`, it specifically checks that +the file is present in srcdir. -index.de/index.html contains the raw po file shoved into -page.tmpl. I have only gotten as far as guessing it is a bug in -`_istranslation` --[[Joey]] +Problem with this is that it precludes using po to translate +the basewiki (work which is well under way for Danish BTW), +since the translated po files cannot really be used. --[[Joey]] Duplicate %links ? ------------------ -- cgit v1.2.3