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]]
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]]
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.
19 >> `match_currentlang` currently dies if called w/o a location -- if
20 >> it instead was always true w/o a location, this would just mean that
21 >> all pagespecs should have `and currentlang()` added to them. How to
22 >> implement that? All I can think of doing is wrapping
23 >> `pagespec_translate`.
25 >> The only case I've found where it does make sense to match other
26 >> language pages is on `l10n.ikiwiki.info` when listing pages that
29 >> Otherwise, it can be documented, but that's not really enough;
30 >> a user who makes a site using auto-blog.setup and enables po will
31 >> get a really screwed up blog that lists translations as separate posts
32 >> and needs significant work to fix. I have thought about making
33 >> `match_currentlang` a stub in IkiWiki (done in my currentlang branch),
34 >> so I can use it in all the PageSpecs in the example blog etc, but I
35 >> can't say I love the idea.