Page MenuHomePhabricator

Translatable pages (pages using Translate extension syntax) can create unusable section edit (editsection) links
Open, MediumPublic

Description

See editsection link on https://incubator.wikimedia.org/wiki/Incubator:PREFIX#Prefix


Version: unspecified
Severity: normal

Details

Reference
bz42239

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:14 AM
bzimport set Reference to bz42239.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #1)

Explained in the documentation:

https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples

Then it would be better not to display those editsection links. Is there something that can be done in this extension, or is it a core bug?

Core tries to find the edit section links before Translate gets to replace <translate>foo</translate> with a value and thus doesn't find it when it is split into multiple lines. One thing to try could be to try avoiding making <translate> markup multiline in headers.

(In reply to comment #3)

Core tries to find the edit section links before Translate gets to replace
<translate>foo</translate> with a value and thus doesn't find it when it is
split into multiple lines. One thing to try could be to try avoiding making
<translate> markup multiline in headers.

but this wikitext works with editsection?

a <ref>1

2 </ref> b ==
<references/>

(In reply to comment #4)

but this wikitext works with editsection?

a <ref>1

2 </ref> b ==
<references/>

Maybe, but why should it and how is it related to Translate?
Anyway, INVALID request, there's no reason to use translate tags that way on translatable pages; there's an enhancement request at bug 40713 for translation pages, though.

Don't get me wrong, I'd be happy if the edit section links always worked, but I'm not going to fundamentally change the way page translation works to make it so. If there is easy way to fix this in MW core or Translate, I'd be happy.

Well I'm reopening it and moving it to core. Anyway it's core which creates these editsection links that it can't handle itself.

This isn't an enhancement request. The current user experience here is bad. Either the links should work or they shouldn't be shown.

(In reply to MZMcBride from comment #8)
In fact, it's still good to see the source but the links should be labled accordingly: "View section source"?

(In reply to Rainer Rillke @commons.wikimedia from comment #9)

(In reply to MZMcBride from comment #8)
In fact, it's still good to see the source but the links should be labled
accordingly: "View section source"?

Perhaps re-labeling would make sense, though this would differ from standard MediaWiki core behavior, which simply hides non-functioning section-edit links.

In any case, these links currently do not function as "view section source" links. We currently have:


<h3><span class="mw-headline" id="What_is_a_prefix.3F">What is a prefix?</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Help:FAQ&amp;action=edit&amp;section=12" title="Edit section: What is a prefix?">edit</a><span class="mw-editsection-bracket">]</span></span></h3>

Where https://incubator.wikimedia.org/w/index.php?title=Help:FAQ&action=edit&section=12 is a broken link. Eep! We definitely do not want the current behavior and it's pretty clearly broken behavior.

Possible options here (as I see it) are:

  • hide the section-edit links; or
  • re-target the section-edit links.

It might be possible to hackishly implement either of these options using JavaScript, but that would likely be a gross and temporary solution.

If anyone has additional thoughts about possible paths forward here, please share.

BTW editing such section on mobile shows a loading icon forever.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2015, 5:35 AM

I recently encountered this bug again at https://www.mediawiki.org/wiki/Manual:Page_props_table. It made me sad.

Qgil removed a subscriber: Qgil.Feb 11 2016, 12:07 PM
Nemo_bis renamed this task from Translatable pages (pages using Translate extension syntax) create unusable section edit (editsection) links to Translatable pages (pages using Translate extension syntax) can create unusable section edit (editsection) links.Feb 12 2016, 2:48 PM
Nemo_bis set Security to None.
Nikerabbit added a subscriber: Nikerabbit.

Still non-actionable on Translate.