HomePhabricator

Updated mediawiki/extensions Project: mediawiki/extensions/ContentTranslation…

Authored by santhosh.

Description

Updated mediawiki/extensions Project: mediawiki/extensions/ContentTranslation d9ce8c3aac7564482f89115611db58ec98606bfe

Rewrite the links module

Brief summary of features:

  • Adapt links in translation
  • Mark the unadapted links gray
  • Mark the red links in source section as red
  • Link pair highlighting when clicked
  • Fetch thumbnail for links - for links card
  • Create and show link cards including missing link card
  • Event handlers for Add Link, Remove Link
  • Event handler for Mark as missing
  • Focus handling
  • Convert selection to link
  • Show card for selected text
  • Search links using search box

Apart from the existing links features, this patch adds features
related to red links.

A notable difference from previous links module approach is that
every link in source or target is abstracted in
CXSourceLink and CXTargetLink classes.
Both of these classes inherit CXLink. Each such link instance knows
the link pair, the link data including thumbnail image, language,
direction, title etc. They are also capable of rendering the link card.

Link cards will appear faster now since the data for showing the card
is pre-fetched.

Red links in source sections will be shown red when
the corresponding section is used (added to translation).
Previously this was happening only when user clicked on
that link.

Related to the above changes, the tools manager now catches the errors
from tools if any, and prevents the whole tool system from
stopping to work.

Reference links and image links are completely in their own modules now.
Links module had some bits of that.

Bug: T90718
Change-Id: I954f6dffc07584c17de49c17cce7e81788549b0f

Details

Committed
Gerrit Code ReviewJun 9 2015, 11:46 AM
Parents
rMEXT0e270b124398: Updated mediawiki/extensions Project: mediawiki/extensions/ContentTranslation…
Branches
Unknown
Tags
Unknown
ChangeId
I954f6dffc07584c17de49c17cce7e81788549b0f