Page MenuHomePhabricator

votewiki has Italian body in lang="en" tags
Open, MediumPublic

Description

https://vote.wikimedia.org/wiki/Special:SecurePoll/vote/457 has a wrong interface language and page content language.

<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>Elezioni 2015 del Comitato per lo Stanziamento dei Fondi della Wikimedia Foundation - Wikimedia Vote Wiki</title>

[...]
<body class="mediawiki ltr sitedir-ltr ns--1 ns-special mw-special-SecurePoll page-Special_SecurePoll_vote_457 skin-vector action-view">
[...]
			<h1 id="firstHeading" class="firstHeading" lang="it">Elezioni 2015 del Comitato per lo Stanziamento dei Fondi della Wikimedia Foundation</h1>

The body is in Italian, but doesn't say so. Only the firstHeading is in correct language.

The sidebar and search bar also are in Italian (where translations are used) but don't say so:

<div class="portal" role="navigation" id='p-navigation' aria-labelledby='p-navigation-label'>
			<h3 id='p-navigation-label'>Navigazione</h3>

			<div class="body">
									<ul>
													<li id="n-Wikimedia-Foundation-Elections-2015"><a href="//meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections_2015">Wikimedia Foundation Elections 2015</a></li>
													<li id="n-FDC-candidates"><a href="//meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/FDC_elections/2015/Candidates">FDC candidates</a></li>
													<li id="n-FDC-Ombudsperson-candidates"><a href="//meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/FDC_Ombudsperson_elections/2015/Candidates">FDC Ombudsperson candidates</a></li>
													<li id="n-Board-candidates"><a href="//meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/Board_elections/2015/Candidates">Board candidates</a></li>
											</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-tb' aria-labelledby='p-tb-label'>
			<h3 id='p-tb-label'>Strumenti</h3>

			<div class="body">
									<ul>
													<li id="t-specialpages"><a href="/wiki/Special:SpecialPages" title="Elenco di tutte le pagine speciali [q]" accesskey="q">Pagine speciali</a></li>
													<li id="t-print"><a href="/w/index.php?title=Special:SecurePoll/vote/457&amp;printable=yes" rel="alternate" title="Versione stampabile di questa pagina [p]" accesskey="p">Printable version</a></li>
											</ul>
							</div>
		</div>
				</div>
		</div>

The rest of the interface and content is in English, hence the UniversalLanguageSelector personal tools trigger correctly says "English".

Steps to reproduce: unknown. I just clicked a banner on mediawiki.org and arrived to https://meta.wikimedia.org/wiki/Special:SecurePoll/vote/336?rdfrom=%2F%2Fwikimediafoundation.org%2Fw%2Findex.php%3Ftitle%3DUser%3AJalexander%2FFDCVoteAB-B%26redirect%3Dno (a userpage, really?!).

If I click https://vote.wikimedia.org/w/index.php?title=Special:SecurePoll/vote/457&uselang=nl , language is correct. After doing so, uls-previous-languages cookie contains %5B%22en%22%2C%22nl%22%5D but other than this there is no cookie with language information.

Event Timeline

Nemo_bis raised the priority of this task from to High.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added subscribers: Nemo_bis, Jalexander, Ajraddatz and 6 others.

Note, other pages are even more broken: the confirmation page has the title in Italian, but the rest in English, including the body. So I get «Welcome Nemo bis! Thank you for voting. If you wish, you may retain the following receipt as evidence of your vote» although the translation is available: https://vote.wikimedia.org/wiki/MediaWiki:Securepoll-gpg-receipt/it

Definitely not the same issue.

How does this vary from the other bug? They appear to be the same issue...

Jargonishly, that bug is about setting interface language, while this is about content language being messed up with. Refer to SPQRobin's https://www.mediawiki.org/wiki/Manual:Language for an authoritative explanation.

Concretely, that bug can and should be solved on the wiki/host (even by a sysop, at some degree), while this bug is presumably caused by SecurePoll code or some other code active there. From T97923#1255177 is *seems* that SecurePoll is being passed the language by something (?!) to do something.

@Nemo_bis: Yes. auth-api.php fetches a variety of user settings on the first visit to votewiki, one of which is language.[1,2] I'm not sure yet where this interacts with interface vs. content language. Votewiki language is stored in the voter db table as a "property".[3]

I'm working on T97923. My current thought is to add a language selector dropdown to the jump page. Ideally it will work for interface and content both and address this bug as well. Any more directions to reproduce this will be very useful.

[1] https://github.com/wikimedia/mediawiki-extensions-SecurePoll/blob/master/auth-api.php#L41
[2] https://github.com/wikimedia/mediawiki-extensions-SecurePoll/blob/24f12b4eabd4acf780ea23263999d8643d211e2c/includes/user/Auth.php#L228
[3] https://github.com/wikimedia/mediawiki-extensions-SecurePoll/blob/1f8b5d819977a70bb06a7ac270b4f3c5a50fac92/includes/user/Voter.php#L110

My current thought is to add a language selector dropdown to the jump page.

If you need a language selector, remember to reuse the standard one, provided by jquery.uls.

jrbs lowered the priority of this task from High to Medium.May 26 2022, 10:04 PM
jrbs removed a project: Elections.
jrbs subscribed.

Boldly lowering the priority to reflect the reality here (this is still a problem I believe but there has been no activity on this task for seven years)

Evaluation:

Probably difficult to reproduce. Could also be connected to the wiki setup rather than to the extension code. There are candidates in the code but debugging this will take quite some time