]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/po:_rethink_pagespecs.mdwn
More up-to-date patch
[ikiwiki.git] / doc / todo / po:_rethink_pagespecs.mdwn
1 I was suprised that, when using the map directive, a pagespec of "*"
2 listed all the translated pages as well as regular pages. That can 
3 make a big difference to an existing wiki when po is turned on,
4 and seems generally not wanted.
5 (OTOH, you do want to match translated pages by
6 default when locking pages.) --[[Joey]]
7
8 > Seems hard to me to sort apart the pagespec whose matching pages
9 > list must be restricted to pages in the master (or current?)
10 > language, and the ones that should not. The only solution I can see
11 > to this surprising behaviour is: documentation. --[[intrigeri]]
12
13 >> Well, a sorting criteria might be that if a PageSpec is used
14 >> with a specified locaction, as happens whenever a PageSpec is
15 >> used on a page, then it should match only `currentlang()`. If it 
16 >> is used without a location, as in the setup file, then no such limit.
17
18 >>> Ok. --[[intrigeri]]
19
20 >> Note that
21 >> `match_currentlang` currently dies if called w/o a location -- if
22 >> it instead was always true w/o a location, this would just mean that
23 >> all pagespecs should have `and currentlang()` added to them. How to
24 >> implement that? All I can think of doing is wrapping
25 >> `pagespec_translate`.
26
27 >>> Seems doable. --[[intrigeri]]
28
29 >> The only case I've found where it does make sense to match other
30 >> language pages is on `l10n.ikiwiki.info` when listing pages that
31 >> need translation.
32 >> 
33 >> Otherwise, it can be documented, but that's not really enough;
34 >> a user who makes a site using auto-blog.setup and enables po will
35 >> get a really screwed up blog that lists translations as separate posts
36 >> and needs significant work to fix. I have thought about making
37 >> `match_currentlang` a stub in IkiWiki (done in my currentlang branch),
38 >> so I can use it in all the PageSpecs in the example blog etc, but I
39 >> can't say I love the idea.
40 >> --[[Joey]]