Page MenuHomePhabricator

Add language independent linktrail for Wiktionary
Closed, InvalidPublic

Description

Author: D.U.Thibault

Description:
This bug is similar to bug 468, although a little different. The intended behaviour of links, it seems, is that if only part of a word is linked, the rendering of the link expands to include the entire word. However, when diacriticals are present, it seems to stop the expansion, resulting in a partially coloured word link. For example, at http://fr.wiktionary.org/wiki/hal%C3%B3n, we have the word "prùhalón" with a link to "prú-" underneath the "prù" part, but the blue link covers the "prùhal" part, stopping short of the "ó".


Version: unspecified
Severity: minor

Details

Reference
bz11127

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:52 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz11127.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

French link trail needs checking.

actual linktrail is

$linkTrail = '/^([a-zàâçéèêîôûäëïöüùÇÉÂÊÎÔÛÄËÏÖÜÀÈÙ]+)(.*)$/sDu';

As far as I know the character ó is no usual part of the French language.

I would suggest to change the link syntax for words with unusual characters from

[[prù-|prù]]halón

to

[[prù-|prùhalón]]

D.U.Thibault wrote:

Wouldn't it be easier to change the $linktrail global variable? This sort of problem is unlikely to occur on the French wikipedia, say, but is bound to recur on the Wiktionary, which aims to document words from all languages.

The French linktrail is good. It's common usage that linktrails contains the chararcters of its language only.

But I see the general issue for Wiktionary.

I changed the summary to reflect the need of a language independent linktrail for projecte liks Wiktionary. Or a global variable to indicate that all characters (with exceptions like space) are part of a link.

It may be best to just have a generic linktrail instead of a per-language setting.

Note however that some languages don't use whitespace to separate words, so:

  • Some "letter" character ranges should be excluded as well as whitespace, punctuation, etc (eg CJK and Thai text)
  • Some languages may need the option to suppress linktrail usage altogether, to avoid breaking eg Latin names mixed in with text.

alefzet wrote:

Fixed with r36253.

D.U.Thibault wrote:

Ummm, hate to rain on the parade, but the problem is not fixed. See http://fr.wiktionary.org/wiki/gam%C3%A1lyal where the a acute (á) stops the link from fully expanding...

Does anybody have an idea how such linktrail would look like?

For informational purposes, the modern languages which don't use whitespace between words are Chinese, Japanese, Khmer, and Thai. Korean does use whitespace but uses CJK characters only rarely these days.

beau wrote:

*** Bug 21326 has been marked as a duplicate of this bug. ***

This bug looks invalid: it asks a linktrail for French, not for all languages; but French was already fixed. It also doesn't ask anything specific to Wiktionary, as far as I can see, even though that could make sense because some/most Wiktionaries don't like linktrail at all (a configuration switch would be enough).

Danny_B edited subscribers, added: Danny_B; removed: wikibugs-l-list.

Closing per T13127#1098552.

Nemo_bis changed the task status from Resolved to Invalid.May 26 2016, 3:42 PM