1 The po plugin needs to be updated to match the urlto sub API and
2 signature changes. Else a wiki with the po plugin enabled cannot be
3 refreshed / rebuilt because of (correct) Perl errors.
5 My po branch contains a fix.
8 > The commit looks sane to me, for what it's worth. Joey, please
9 > consider merging? --[[smcv]]
13 Also, I fear the lack of any useful `$from` parameter might break some
14 l10n'd link niceness when using `po_link_to = current` but I have not
15 investigated this yet.
18 > If `urlto` is called without a second parameter, it means we need
19 > a URL valid from either the CGI URL or any page in the wiki,
20 > (so we'd previously have set the third parameter true), but we
21 > don't *necessarily* need an absolute URL - so return what you'd
22 > have returned if asked for an absolute URL, but looking like
23 > `/bugs/` rather than `http://ikiwiki.info/bugs/` if possible.
25 > It looks as though `beautify_urlpath` under `po_link_to = current`,
26 > and 3-argument `urlto`, aren't tested by `t/po.t` - perhaps you
27 > could add some test cases there? To test 3-argument `urlto` you'd
28 > need to add `$config{baseurl} = "http://example.com"` or
29 > something. --[[smcv]]
31 >> I'm leaving this bug report open until this can be checked. --[[Joey]]
33 >>> My `ready/urlto` branch improves the test coverage. The bugfix from
34 >>> that branch fixes most of `po` too, but leaves behind some perhaps
35 >>> less-than-ideal behaviour: links where the current language is unknown,
36 >>> with `po_link_to = current`, always go to the master language,
37 >>> whereas perhaps it'd be better to go to the negotiated language in
38 >>> this case? --[[smcv]]
40 >>>> Thanks for taking care, thanks for these improvements!
42 >>>> OTOH I consider any of these behaviours (either the brand new one
43 >>>> = link to master language, or the alternative one = link to
44 >>>> negotiated) as a regression. Any of these is contrary to what
45 >>>> `po_link_to = current` is supposed to do according to the
48 >>>> Let's be less technical, let me display my practical usecase
49 >>>> (making this possible was one of the main reasons I initially
50 >>>> implemented `po_link_to = current`).
52 >>>> Summary: the current state of things is an annoying regression
53 >>>> and it needs to be fixed.
55 >>>> Context: I participate in building a Live system based on Debian
56 >>>> Live; the project's multilingual website
57 >>>> ([T(A)ILS](https://amnesia.boum.org/) is built using ikiwiki. A
58 >>>> static / offline copy is shipped on ISO images; this is the way
59 >>>> end-user documentation lands on the CDs. Note that no webserver
60 >>>> runs on the Live system to serve this wiki, so `po_link_to =
61 >>>> current` is compulsory. A user can choose her preferred language
62 >>>> at boot time. Depending on her decision, The desktop shortcut
63 >>>> that points to the embedded documentation (i.e. static wiki)
64 >>>> links to a different entry point depending on the chosen
67 >>>> The previous (documented) behaviour was deadly simple: if I am
68 >>>> presented a page in English (master language) it means it does
69 >>>> not exist in my preferred language; the computer always displays
70 >>>> me the best available version according to my needs. The new
71 >>>> behaviour brings a troubling seemingly random factor into the
72 >>>> user navigation experience and IMHO is a mess from a web
73 >>>> ergonomics point of view (no content negotiation available,
74 >>>> remember): I sometimes am shown an English page although it is
75 >>>> fully translated in my language one click away, and on the
76 >>>> contrary I sometimes I am shown the optimal page. This, is, well,
77 >>>> interesting. This practically forces the non-English speaking
78 >>>> website visitor to check the otherlanguages list on every single
79 >>>> page to make sure *herself* there is nothing better available,
80 >>>> and sometimes click on her preferred language link to get a page
81 >>>> she actually can read.
83 >>>> I unfortunately might not be able to dedicate the needed time to
84 >>>> help fix this in a timely manner, so I don't want to urge anyone.
85 >>>> Take care! --[[intrigeri]]
87 >>>>> I can see why this is bad, but to the best of my knowledge it's
88 >>>>> not a regression: each of the calls to 1-argument `urlto` was
89 >>>>> previously a call to 3-argument `urlto`, which always produces
90 >>>>> a fully absolute URL, so in either case there isn't enough
91 >>>>> context to know the current language. Links that were previously
92 >>>>> 2-argument `urlto` still have a defined second argument;
93 >>>>> I've just edited `plugins/write` to clarify why the second
94 >>>>> argument should be provided whenever possible. --[[smcv]]
96 >>>>>> Ok. I am sorry for the burden that arose from my
97 >>>>>> misunderstanding. No need to keep this bug open then =>
98 >>>>>> [[done]] --[[intrigeri]]