Closed
Bug 608089
Opened 15 years ago
Closed 15 years ago
Implement Wiki Link Fallback
Categories
(support.mozilla.org :: Knowledge Base Software, task, P1)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
VERIFIED
FIXED
2.3
People
(Reporter: jsocol, Assigned: jsocol)
Details
After discussing with Cheng (and I'll let him verify that this is correct) here's what should happen when we try to look up [[An Article]].
Let's say that ArticleA contains a link to [[ArticleB]]. Let, for example, en-US:ArticleA mean "Article with title ArticleA and locale en-US." Let de:(en-US:ArticleA) mean "DE translation of article with title ArticleA and locale en-US."
Case: ArticleA is en-US:
<Does en-US:ArticleB exist?>
-> Yes: Link to en-US:ArticleB
-> No: Link to create en-US:ArticleB
Case: ArticleA is de:
<Does de:ArticleB exist?>
-> Yes: Link to ArticleB
-> No:
<Does en-US:ArticleB exist?>
-> No: Link to create de:ArticleB (?)
-> Yes:
<Does de:(en-US:ArticleB) exist?>
-> Yes: Link to de:(en-US:ArticleB)
-> No: Link to en-US:ArticleB
Finally, when given a link without specific link text (eg [[ArticleB]], *not* [[ArticleB|foo]]) the title we should render is the title of the article we link to. The en-US case is trivial, but, in DE, for example:
Case: ArticleA is de:
<Does de:ArticleB exist?>
-> Yes: Link text is "ArticleB"
-> No:
<Does en-US:ArticleB exist?>
-> No: Link text is "ArticleB"
-> Yes:
<Does de:(en-US:ArticleB) exist?>
-> Yes: Link text is title of de:(en-US:ArticleB)
-> No: Link text is "ArticleB"
I know this is sort of a lot to do for every link, but the only time we render during request/response cycles is (well, will be) during revision previews. Those are not performance critical. (Maybe we can even stick the result in memcache? If it's unused it'll age out, if people are sharing a link to a revision it will help subsequent views.)
Oh my science I hope that's clear. It's complex.
Comment 1•15 years ago
|
||
This pseudo code/logic looks correct here. For localizers, this is close (if not equal) to how it works in Tiki today: they keep the ((English article links)) in their localized articles, and the resulting HTML will show the correct link titles in their own language, if the target article is localized.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → james
| Assignee | ||
Comment 2•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 3•14 years ago
|
||
I'm 90% certain I've verified all of the variations :) Maybe 95%
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•