Page MenuHomePhabricator

[Spike] Title and TOC not converted for Wikidata page banner language variants
Closed, ResolvedPublicSpike

Description

See https://zh.wikivoyage.org/wiki/莫斯科, 2 bugs with LanguageConverter:

  1. the h1.wpb-name covers out the variant selection menu (div#p-variants > div.menu). Same for the toc when the banner is small enough.
  2. title and the toc stays un-language-converted even after a variant is specified: (eg. -{zh-cn:客车;zh-hk:客車;zh-tw:公車;}- in toc)

Create follow-up task with fix

Event Timeline

zhuyifei1999 raised the priority of this task from to Needs Triage.
zhuyifei1999 updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

And also the removal of the edit link ([編輯]) next to the article name on the page banner should be proceeded.

And also the removal of the edit link ([編輯]) next to the article name on the page banner should be proceeded.

?

Jdlrobson edited projects, added good first task; removed MediaWiki-Language-converter.

z-index of .wpb-topbanner-toc and .ext-wpb-pagebanner .wpb-topbanner .wpb-name should be 1. It's a super easy fix. Is someone able to submit a patch? I can get it merged promptly!

Jdlrobson raised the priority of this task from High to Unbreak Now!.Oct 8 2015, 12:42 AM

z-index of .wpb-topbanner-toc and .ext-wpb-pagebanner .wpb-topbanner .wpb-name should be 1. It's a super easy fix. Is someone able to submit a patch? I can get it merged promptly!

That will fix the first issue, but the second remain unsolved.
(Adding MediaWiki-Language-converter to get attention from someone who know about Language converter's php code)

Change 244433 had a related patch set uploaded (by Zhuyifei1999):
Styles: Set z-index of .wpb-topbanner-toc and .wpb-name to 1

https://gerrit.wikimedia.org/r/244433

Oh sorry I missed that. I think the latter may also be an issue with this extension. I suspect it needs to apply getContentLanguage somewhere..

That said I am not familiar with LanguageConvertor can someone in that team assist?

Change 244584 had a related patch set uploaded (by Jdlrobson):
Styles: Set z-index of .wpb-topbanner-toc and .wpb-name to 1

https://gerrit.wikimedia.org/r/244584

Change 244433 merged by jenkins-bot:
Styles: Set z-index of .wpb-topbanner-toc and .wpb-name to 1

https://gerrit.wikimedia.org/r/244433

Change 244584 merged by Catrope:
Styles: Set z-index of .wpb-topbanner-toc and .wpb-name to 1

https://gerrit.wikimedia.org/r/244584

Jdlrobson renamed this task from Wikidata page banner does not work properly with language converter. to Title and TOC not converted for Wikidata page banner language variants.Oct 9 2015, 2:13 AM
Jdlrobson lowered the priority of this task from Unbreak Now! to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson removed a project: Patch-For-Review.

That said I am not familiar with LanguageConvertor can someone in that team assist?

@liangent?

There's a FakeConverter for languages without converter rules, so calling $wgContLang->convert( ... ) shouldn't create any issues. (Haven't tested yet)

@Jdlrobson Just wondering, how do you test WikidataPageBanner in a MediaWiki-Vagrant install? Do you need Wikibase client installed to have this working?

@zhuyifei1999 wikidata is optional - you can test without. Setup is pretty straightforward: https://www.mediawiki.org/wiki/Extension:WikidataPageBanner#Installation
Would be great if you can work out what's going on here. The language support parts of MediaWiki always confuse me! :(

Change 247030 had a related patch set uploaded (by Zhuyifei1999):
getBannerHtml: Call $wgContLang->convert( $banner ) before $banner is returned

https://gerrit.wikimedia.org/r/247030

Jdlrobson changed the task status from Open to Stalled.Nov 6 2015, 7:27 PM

Looks like we're stuck until we can work out the best way to do this... :/

Change 256664 had a related patch set uploaded (by Sumit):
Convert title to its language variant

https://gerrit.wikimedia.org/r/256664

Change 247030 abandoned by Zhuyifei1999:
getBannerHtml: Call $wgContLang->convert( $banner ) before $banner is returned

Reason:
Needs better ways to fix this

https://gerrit.wikimedia.org/r/247030

Change 256664 merged by jenkins-bot:
Convert title to its language variant

https://gerrit.wikimedia.org/r/256664

Hmm. AFAIK, when pgname is set, title isn't converted; TOC isn't converted either.

Patch was merged Friday and should be live on Wikivoyage tomorrow. I can leave this open if it's hard to test on http://en.m.wikivoyage.beta.wmflabs.org

Patch was merged Friday and should be live on Wikivoyage tomorrow. I can leave this open if it's hard to test on http://en.m.wikivoyage.beta.wmflabs.org

If you are referring to the above patch, as far as I see, it only fix the page title when pgname is not set. Am I missing anything?

Jdlrobson lowered the priority of this task from High to Medium.Apr 27 2016, 4:27 PM

Is this still problematic?

Yes. Please compare the TOC and section headings on this page

Is this still problematic?

To answer your question accurately:

1.jpg (371×904 px, 168 KB)

ovasileva renamed this task from Title and TOC not converted for Wikidata page banner language variants to [Spike] Title and TOC not converted for Wikidata page banner language variants.Dec 21 2016, 5:46 PM
Jdlrobson lowered the priority of this task from Medium to Low.Apr 17 2017, 10:35 PM

This will probably be best solved by someone who can speak Chinese and understands the issue here.

No longer reproduceable. TOC stays not converted but the tags are stripped

Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptDec 27 2023, 6:35 PM
Restricted Application added a subscriber: Stang. · View Herald Transcript