Page MenuHomePhabricator

Special:PageLanguage does not tag page html output correctly
Closed, ResolvedPublic

Description

https://dev.translatewiki.net/w/i.php?title=Blag is set to be de-ch, yet the source code says:

<h1 id="firstHeading" class="firstHeading" lang="en"><span dir="auto">Blag</span></h1>

<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p>Typo of blah
a
</p>
<!-- [... ] -->
</div>


Version: 1.25-git
Severity: normal
See Also:
T74939

Details

Reference
bz72940

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:44 AM
bzimport set Reference to bz72940.
bzimport added a subscriber: Unknown Object (MLST).

getViewPageLanguage vs. getPageLanguage

For the lang in the header it is using getViewPageLanguage which does not use the page_lang field.
The textarea on action=edit is using getPageLanguage which used the page_lang field.
I have no idea about the difference

(In reply to Umherirrender from comment #1)

getViewPageLanguage vs. getPageLanguage

For the lang in the header it is using getViewPageLanguage which does not
use the page_lang field.

Looks still current, 30551608582d7368cc1ff1b995f04eae87213a1f didn't touch that.

"SPQRobin is working on another patchset to eliminate the complexity of page language and page view language in core and combining them into a single array." PS17 https://gerrit.wikimedia.org/r/#/c/135312/
That's https://gerrit.wikimedia.org/r/#/c/137033/ I guess

Jdforrester-WMF subscribed.

Removing from MW-1.24-release because this isn't going to be fixed in the next few months' worth of security point releases.

This seems to almost be a blocker to further rollout of this feature on other wikis (T69223); it somewhat defeats the purpose of changing the page language if this change has no effect on the output HTML...

it somewhat defeats the purpose of changing the page language if this change has no effect on the output HTML

Why so? The feature is mostly requested for Translate, which AFAIK doesn't care about the HTML.

It wasn't at all apparent when I first looked into this that the feature had anything to do with Translate. Indeed, most people who come across this feature won't realise this either.

In any case, I consider it a bug that the content of a page whose language has been set to Swiss German is explicitly wrapped in English language tags, which is what this task is about.

In any case, I consider it a bug that the content of a page whose language has been set to Swiss German is explicitly wrapped in English language tags, which is what this task is about.

Sure, but that's the current situation as well.

This seems fixed nowadays. https://meta.wikimedia.org/wiki/Wikim%C3%A9dia_France has French as its content language, and we have

<h1 id="firstHeading" class="firstHeading" lang="fr">Wikimédia France</h1>

and

<div id="mw-content-text" lang="fr" dir="ltr" class="mw-content-ltr">

for the page title and page content respectively.

Extension:Translate inserts

<div class="mw-pt-translate-header noprint nomobile" dir="ltr" lang="en">

and

<div class="mw-pt-languages noprint" lang="en" dir="ltr" xml:lang="en">

for the "Translate this page" bar and list of language, which are indeed in English (my UI language).