Page MenuHomePhabricator

Add link to source to edit summary
Open, NormalPublic3 Story Points

Description

Motivation
Right now, we add the url of the source to the edit summary, but this might not always work, e.g. if the url is longer than the edit summary limit.

Acceptance Criteria

  • The url in the edit summary is a link to that url

Event Timeline

Lea_WMDE created this task.Mar 8 2018, 11:06 AM
Restricted Application added projects: TCB-Team, Design. · View Herald TranscriptMar 8 2018, 11:06 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lea_WMDE renamed this task from Add link to source to version history to Add link to source to edit summary.Mar 13 2018, 10:38 AM
Lea_WMDE triaged this task as Normal priority.
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE updated the task description. (Show Details)Mar 13 2018, 4:12 PM
Lea_WMDE set the point value for this task to 2.

I believe only internal links are rendered in the edit summary, so external links would still have to be normal text.
https://en.wikipedia.org/wiki/Help:Edit_summary#Edit_summary_properties_and_features

WMDE-Fisch added a subscriber: WMDE-Fisch.

I can confirms this. External URLs cannot be transformed into links. This can easily tested when using the Preview on edits. You will get an preview of the edit summary as well.

Ok I just realized that interwiki links are possible. See this screenshot from commons and a file from English Wikipedia:

So this task is could be done. I would increase the story points though, since we need to build something ( or find something ) to construct these interwiki links.

WMDE-Fisch changed the point value for this task from 2 to 3.Apr 25 2018, 8:55 AM
WMDE-Fisch moved this task from Demo to Sprint Backlog on the WMDE-QWERTY-Sprint-2018-04-17 board.
WMDE-Fisch added a comment.EditedApr 26 2018, 1:45 PM

I started looking into this some more and fiddled mostly with my local setup to make this testable and reproduceable. While doing that I realized one thing:

Creating interwiki links with [[]] and the parser does not work with more than one dimension of interwiki-ness. This means, when linking on Commons:

What that means:

  • only the first part of a link can be interpreted as interwiki prefix pointing to hard coded lists of wikis
  • by default language-code-like strings point to the corresponding language page of the project
    • for projects without language sub projects that always seems to be Wikipedia
    • [[de:TITLE]] will link to the German Wikivoyage page with TITLE when used from Wikivoyage
    • [[de:TITLE]] will link to the German Wikipedia page with TITLE when used from Wikipedia / Commons / Mediawiki / Meta
  • generally a list of codes exist to point to other projects, if these are multilingual the links mostly go to the English version
    • [[w:TITLE]] will always link to the English Wikivoyage page with TITLE
    • [[wikivoyage:TITLE]] will always link to the English Wikivoyage page with TITLE
  • a list can be found here https://en.wikipedia.org/wiki/Special:Interwiki these lists vary per project

So when importing files from Wikipedia to Commons in the Wikimedia setup we can indeed point to the specific file with [[LANG:FILE:NAME]], but when importing from other projects that have multilingual sub wikis that won't work.

The question now would be: Do we want to have the short special links for Wikipedia or do we rather want to go for the full URL so we have it identical for all cases? @Lea_WMDE

Thanks for the research, @WMDE-Fisch! I would say, let's just go with the full URL for now, and keep the work small.

WMDE-Fisch changed the task status from Open to Stalled.Apr 26 2018, 2:51 PM

Stalled for now and the MVP. A comment with link to the investigation is in the wish doc.

Pikne added a subscriber: Pikne.Jun 29 2018, 3:51 PM

So when importing files from Wikipedia to Commons in the Wikimedia setup we can indeed point to the specific file with [[LANG:FILE:NAME]], but when importing from other projects that have multilingual sub wikis that won't work.

Using link like [[wikt:de:Paris]] on Commons seems to bring me to the right place (German Wiktionary), eventhough technically it's redirected via English Wiktionary. That kind of links seem to be used for edit summaries for imports done via Special:Import already, e.g. here. Is that problematic?

WMDE-Fisch changed the task status from Stalled to Open.Jul 2 2018, 8:45 AM

So when importing files from Wikipedia to Commons in the Wikimedia setup we can indeed point to the specific file with [[LANG:FILE:NAME]], but when importing from other projects that have multilingual sub wikis that won't work.

Using link like [[wikt:de:Paris]] on Commons seems to bring me to the right place (German Wiktionary), eventhough technically it's redirected via English Wiktionary. That kind of links seem to be used for edit summaries for imports done via Special:Import already, e.g. here. Is that problematic?

Hey @Pikne, you're right about that. The ticket is not up to date in that regard because it's still marked as stalled. While testing this I missed the fact, that Interwiki linking work with multiple steps where the first wiki resolved can take care of any further steps. The bit more complicated part is to find the whole "path" to the source wiki. But we solved that in a first version. - See also T194644

I will change the ticket status, it's already in the Futer considerations column on the workboard.

Now this concerns log comments too.

I note that page titles in wiki links for revision imports (e.g. here) are not encoded. So doing the same here would also improve readability and for some cases save considerable amount of space (e.g. for this file import), besides making navigation easier.