]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/po:broken_links_to_translatable_basewiki_pages_that_lack_po_fies.mdwn
rename bugs/emails_should_not_be_considered_as_bronen_links.mdwn to bugs/emails_shoul...
[ikiwiki.git] / doc / bugs / po:broken_links_to_translatable_basewiki_pages_that_lack_po_fies.mdwn
1 broken links to translatable basewiki pages that lack po files
2 --------------------------------------------------------------
3
4 If a page is not translated yet, the "translated" version of it
5 displays wikilinks to other, existing (but not yet translated?)
6 pages as edit links, as if those pages do not exist. 
7
8 That's really confusing, especially as clicking such a link
9 brings up an edit form to create a new, english page.
10
11 This is with po_link_to=current or negotiated. With default, it doesn't
12 happen.. 
13
14 Also, this may only happen if the page being linked to is coming from an
15 underlay, and the underlays lack translation to a given language.
16 --[[Joey]] 
17
18 > Any simple testcase to reproduce it, please? I've never seen this
19 > happen yet. --[[intrigeri]]
20
21 >> Sure, go here <http://l10n.ikiwiki.info/smiley/smileys/index.sv.html>
22 >> (Currently 0% translateed) and see the 'WikiLink' link at the bottom,
23 >> which goes to <http://l10n.ikiwiki.info/ikiwiki.cgi?page=ikiwiki/wikilink&from=smiley/smileys&do=create>
24 >> Compare with eg, the 100% translated Dansk version, where
25 >> the WikiLink link links to the English WikiLink page. --[[Joey]] 
26
27 >>> Seems not related to the page/string translation status: the 0%
28 >>> translated Spanish version has the correct link, just like the
29 >>> Dansk version => I'm changing the bug title accordingly.
30 >>>
31 >>> I tested forcing the sv html page to be rebuilt by translating a
32 >>> string in it, it did not fix the bug. I did the same for the
33 >>> Spanish page, it did not introduce the bug. So this is really
34 >>> weird.
35 >>>
36 >>> The smiley underlay seems to be the only place where the wrong
37 >>> thing happens: the basewiki underlay has similar examples
38 >>> that do not exhibit this bug. An underlay linking to another might
39 >>> be necessary to reproduce it. Going to dig deeper. --[[intrigeri]]
40
41 >>>> After a few hours lost in the Perl debugger, I think I have found
42 >>>> the root cause of the problem: in l10n wiki's configured
43 >>>> `underlaydir`, the basewiki is present in every slave language
44 >>>> that is enabled for this wiki *but* Swedish. With such a
45 >>>> configuration, the `ikiwiki/wikilink` page indeed does not exist
46 >>>> in Swedish language: no `ikiwiki/wikilink.sv.po` can be found
47 >>>> where ikiwiki is looking. Have a look to
48 >>>> <http://l10n.ikiwiki.info/ikiwiki/>, the basewiki is not
49 >>>> available in Swedish language on this wiki. So this is not a po
50 >>>> bug, but a configuration or directories layout issue. This is
51 >>>> solved by adding the Swedish basewiki to the underlay dir, which
52 >>>> is I guess not a possibility in the l10n wiki context. I guess
53 >>>> this could be solved by adding `SRCDIR/basewiki` as an underlay
54 >>>> to your l10n wiki configuration, possibly using the
55 >>>> `add_underlays` configuration directive. --[[intrigeri]]
56
57 >>>>> There is no complete Swedish underlay translation yet, so it is not
58 >>>>> shipped in ikiwiki. I don't think it's a misconfiguration to use
59 >>>>> a language that doesn't have translated underlays. --[[Joey]] 
60
61 >>>>>> Ok. The problem is triggered when using a language that doesn't
62 >>>>>> have translated underlays, *and* defining
63 >>>>>> `po_translatable_pages` in a way that renders the base wiki
64 >>>>>> pages translatable in po's view of things, which in turns makes
65 >>>>>> the po plugin act as if the translation pages did exist,
66 >>>>>> although they do not in this case. I still need to have a deep
67 >>>>>> look at the underlays-related code you added to `po.pm` a while
68 >>>>>> ago. Stay tuned. --[[intrigeri]]
69
70 >>>>>>> Fixed in my po branch, along with other related small bugs that
71 >>>>>>> happen in the very same situation only. --[[intrigeri]]
72
73 >>>>>>>> Merged. Not tested yet, but I trust you; [[done]] --[[Joey]]