From 543bc7af8be315e44ccca575b788e566bc122db2 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 30 Jul 2010 16:19:50 +0200 Subject: eventually got rid of the double rebuild issue. please have a look. --- .../po:_avoid_rebuilding_to_fix_meta_titles.mdwn | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn (limited to 'doc/todo') diff --git a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn new file mode 100644 index 000000000..78e8e3ade --- /dev/null +++ b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn @@ -0,0 +1,32 @@ +Re the meta title escaping issue worked around by `change`. + +> I suppose this does not only affect meta, but other things +> at scan time too. Also, handling it only on rebuild feels +> suspicious -- a refresh could involve changes to multiple +> pages and trigger the same problem, I think. Also, exposing +> this rebuild to the user seems really ugly, not confidence inducing. +> +> So I wonder if there's a better way. Such as making po, at scan time, +> re-run the scan hooks, passing them modified content (either converted +> from po to mdwn or with the escaped stuff cheaply de-escaped). (Of +> course the scan hook would need to avoid calling itself!) +> +> (This doesn't need to block the merge, but I hope it can be addressed +> eventually..) +> +> --[[Joey]] +>> +>> I'll think about it soon. +>> +>> --[[intrigeri]] +>> +>>> Did you get a chance to? --[[Joey]] + +>>>> I eventually did, and got rid of the ugly double rebuild of pages +>>>> at build time. This involved adding a `rescan` hook. Rationale +>>>> and details are in my po branch commit messages. I believe this +>>>> new way of handling meta title escaping to be far more robust. +>>>> Moreover this new implementation is more generic, feels more +>>>> logical to me, and probably fixes other similar bugs outside the +>>>> meta plugin scope. Please have a look when you can. +>>>> --[[intrigeri]] -- cgit v1.2.3 From 9d62c6382a9947f4c7b13d1598b5d7436405e6ea Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Aug 2010 12:22:27 -0400 Subject: pot files maybe.. --- doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/todo') diff --git a/doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn b/doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn index 4ddd0fa1e..26b1964ba 100644 --- a/doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn +++ b/doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn @@ -1,2 +1,4 @@ ikiwiki now has a `disable` hook. Should the po plugin remove the po files from the source repository when it has been disabled? + +> pot files, possibly, but the po files contain work, so no. --[[Joey]] -- cgit v1.2.3 From 7a1d5632b8c762ad7b00e1e834b5678ec9299bda Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Aug 2010 12:36:44 -0400 Subject: comment --- doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/todo') diff --git a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn index 78e8e3ade..86b0ccd72 100644 --- a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn +++ b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn @@ -30,3 +30,11 @@ Re the meta title escaping issue worked around by `change`. >>>> logical to me, and probably fixes other similar bugs outside the >>>> meta plugin scope. Please have a look when you can. >>>> --[[intrigeri]] + +>>>>> Glad you have tackled this. Looking at +>>>>> 25447bccae0439ea56da7a788482a4807c7c459d, +>>>>> I wonder how this rescan hook is different from a scan hook +>>>>> with `last => 1` ? Ah, it comes *after* the preprocess hook +>>>>> in scan mode. Hmm, I wonder if there's any reason to have +>>>>> the scan hook called before those as it does now. Reordering +>>>>> those 2 lines could avoid adding a new hook. --[[Joey]] -- cgit v1.2.3 From e083e4caa8175c4ccc45dd06e9b9cd784dcbbc94 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 2 Aug 2010 03:23:30 +0200 Subject: ackĀ² MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/plugins/po.mdwn | 13 +++++++++++-- doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'doc/todo') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 154c4cbde..0f1d66d32 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -247,8 +247,8 @@ TODO [[!inline pages="todo/po:* and !todo/done and !link(todo/done) and !todo/*/*" feeds=no actions=no archive=yes show=0]] -l10n wiki misconfiguration --------------------------- +broken links to translatable basewiki pages that lack po files +-------------------------------------------------------------- If a page is not translated yet, the "translated" version of it displays wikilinks to other, existing (but not yet translated?) @@ -306,3 +306,12 @@ underlay, and the underlays lack translation to a given language. >>>>> There is no complete Swedish underlay translation yet, so it is not >>>>> shipped in ikiwiki. I don't think it's a misconfiguration to use >>>>> a language that doesn't have translated underlays. --[[Joey]] + +>>>>>> Ok. The problem is triggered when using a language that doesn't +>>>>>> have translated underlays, *and* defining +>>>>>> `po_translatable_pages` in a way that renders the base wiki +>>>>>> pages translatable in po's view of things, which in turns makes +>>>>>> the po plugin act as if the translation pages did exist, +>>>>>> although they do not in this case. I still need to have a deep +>>>>>> look at the underlays-related code you added to `po.pm` a while +>>>>>> ago. Stay tuned. --[[intrigeri]] diff --git a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn index 86b0ccd72..d4e1f743c 100644 --- a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn +++ b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn @@ -38,3 +38,6 @@ Re the meta title escaping issue worked around by `change`. >>>>> in scan mode. Hmm, I wonder if there's any reason to have >>>>> the scan hook called before those as it does now. Reordering >>>>> those 2 lines could avoid adding a new hook. --[[Joey]] + +>>>>>> Sure. I was fearing to break other plugins if I did so, so I +>>>>>> did not dare to. I'll try this. --[[intrigeri]] -- cgit v1.2.3