Page MenuHomePhabricator

Minerva language list doesn’t mark translated label in the language switcher with correct language
Open, MediumPublic3 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to https://ru.m.wikipedia.org/wiki/Россия#/languages
  • See translated labels in the language list
  • Check that the translated labels do not have <span lang="ru"> around them, which causes problems with languages like Bulgarian and Serbian, which can have their own Cyrillic rendering (highlighted in red and green in the screenshot by the ruWP user @Cherkash):

image.png (1×1 px, 329 KB)

What should have happened instead?:
Translated labels should be wrapped in the content language.

Other information (browser name/version, screenshots, etc.):

Event Timeline

Jdlrobson subscribed.

The component in question is the LanguageOverlay in MobileFrontend but I'm not 100% sure there's not a more generic issue here.

Just to check I understand this - The issue is the lang attribute on the A tag here and that the text северный фризский is in a different script?

<a href="https://frr.wikipedia.org/wiki/Ruslun" class="frr" hreflang="frr" lang="frr" dir="ltr">
					<span class="autonym">Nordfriisk</span>
						<span class="title">Ruslun — северный фризский</span>
				</a>

It looks like on desktop the autonym is provided as a title attribute. Do tooltips on the https://ru.wikipedia.org/wiki/%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D1%8F?useskin=timeless&uselang=ru page have the same issue for example ?

<a href="https://frr.wikipedia.org/wiki/Ruslun" title="Ruslun — северный фризский" lang="frr" hreflang="frr" class="interlanguage-link-target"><span>Nordfriisk</span></a>

No, tooltips do not have the same issue because they follow the page language in that case (currently). Here, browser sees the text wrapped in Bulgarian language indication, so it tries to use Bulgarian transformations defined in the typeface. It makes sense for Bulgarian title/autonym, but not for Russian translation.

So do we just need to move the lang attribute onto <span class="autonym"> to fix this ?

One of the ways to fix it would be to add it to autonym and to wrap the article title in <span lang="[lang]"> (since that is also text in another language), yes.

ovasileva set the point value for this task to 3.Aug 24 2023, 5:48 PM