Page MenuHomePhabricator

Source and page number links not showing up in the Translation namespace
Open, NormalPublic

Description

Author: morganation1

Description:
English Wikisource has recently acquired a new namespace called "Translation" (namespace number 114) as a result of bug #50007.

We intend to transclude pages from the Page namespace (ns:104) into this Translation namespace (ns:114) with the ProofreadPage extension, as is already done in the Main namespace (ns:0).

In the main namespace, this creates a tab at the top called "Source" between the standard "Page" and "Discussion" tabs, and floating page-number links on the left of the body of the text (each appears roughly alongside the piece of text being transcluded from the corresponding page). The source tab links to teh source master page in the Index namespace (ns:106) while each page number links to the source page in the Page namespace.

However, in the Translation namespace, neither the source tab nor the floating page numbers are appearing.

Example in the Translation namespace: http://en.wikisource.org/wiki/Translation:Daany_Beedxe

And the same transclusion in the main namespace: http://en.wikisource.org/wiki/Daany_Be%C3%A9dxe

I suspect something just needs to be updated with the 114 namespace number. A similar problem involving the dynamic page layout of transcluded works was resolved in this edit: http://en.wikisource.org/w/index.php?title=MediaWiki:PageNumbers.js&diff=4503024&oldid=4402308

For reference, the effect of this change in the Translation namespace can be seen on this page (which includes a non-default dynamic page layout): http://en.wikisource.org/wiki/Translation:Sleeping_Beauty


Version: unspecified
Severity: normal

Details

Reference
bz51980

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:10 AM
bzimport added a project: ProofreadPage.
bzimport set Reference to bz51980.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 24 2013, 5:59 PM

CCing Reedy and Odder.

Tpt added a comment.Jul 28 2013, 3:47 PM

For the floating page-number links it's an issue in the PageNumbers.js script of en.wikisource.

For the source tab, it's because Proofread Page try to add it only in ns0. A solution is maybe to make Proofread Page add it to all content namespaces, excepts Page: and Index: ones. But there may be some unwanted side effects.

(In reply to Tpt from comment #2)

For the floating page-number links it's an issue in the PageNumbers.js
script of en.wikisource.

I'm pretty sure we've circumvented the floating page-number issue in the period since this bug was first identified by modifying the local en.WS PageNumbers.js file just like you recommended but it came at the expense of removing the feature from working in the Project ns sandbox. In short - they "work" in the Translation namespace but it's probably not the most elegant fix possible.

For the source tab, it's because Proofread Page try to add it only in ns0. A
solution is maybe to make Proofread Page add it to all content namespaces,
excepts Page: and Index: ones. But there may be some unwanted side effects.

Maybe the "refactoring" changed this state of affairs in the interim? It seems that that the ns-0 generation of the 'source' tab comes from 'ext.proofreadpage.article.js' in the line...

$( '#ca-nstab-main' ).after( '<li id="ca-proofread-source"><span>' + mw.config.get( 'proofreadpage_source_href' ) + '</span></li>' );

... the '#ca-nstab-main' being the key. Wouldn't ...

$( '#ca-nstab-translation' ).after( '<li id="ca-proofread-source"><span>' + mw.config.get( 'proofreadpage_source_href' ) + '</span></li>' );

... achieve the same tab generation but limited to just the translation namespace?

In T53980#587475, @Tpt wrote:

A solution is maybe to make Proofread Page add it to all content namespaces, excepts Page: and Index: ones. But there may be some unwanted side effects.

Would it make sense to add it anywhere a <pages /> element is used? e.g. have that insert some marker, and then have the JS insert the Source tab based on the presence of that marker?

@Samwilson Yes, everywhere the element is used it should generate the source tab, the page numbers along the left side, and any other elements that it generates in mainspace.

Are there other elements other than those two?

@Samwilson not sure. I know it generates a grey highlight under the text transcluded from a single page when you hover over the page number. There may be other functionalities that I am not aware of.