Page MenuHomePhabricator

Language selector disabled although a translation is available
Open, Needs TriagePublic

Description

Hi,

our wiki is maintained bilingual (german & english). However, when using the MinervaNeue skin, the language selector is always disabled.
If you change to the skin Timeless the language change works without problems.
Does a configuration setting have to be adjusted here or is this a bug?

A click on the disabled selector shows a banner with the text “Diese Seite ist nicht in anderen Sprachen verfügbar”.

The problem can be found on our wiki:
https://userguide.hitguard.de/index.php/Kontrollen/de
https://userguide.hitguard.de/index.php/Kontrollen/en

Event Timeline

Reminds me of T302200 but that's for language variants only

@Aklapper Ok, what can I do to help solve the problem? Do you need more info? Who is the right person to contact for the problem? Thanks

Who is the right person to contact for the problem?

Hi, anybody is free to look into this.

What language selector are you referring to in the Timeless skin? I don't see any, except the user interface language selector.

Yes, I do not use any except the interface language selector. I use the Language Extension Bundle.
With the Translate Extension setting $wgTranslatePageTranslationULS = true;
With this setting when a user selects an interface language via ULS (Universal Language Selector), if the current page is a translatable page or a translation page then the user is also redirected to the corresponding translation page in the selected language.
And this works fine with the timeless skin in the current setup you can find under the provided link.

Because of your question - do I need a specific language selector for MinervaNeue?

I am not familiar with MinervaNeue, so I won't comment on that. What you can try is to set $wgPageTranslationLanguageList = 'sidebar-only';. This should make translations appear in the MinervaNeue content language selector. But it will also make them appear separately in Timeless.

Thanks for response! By activating the setting $wgPageTranslationLanguageList = 'sidebar-only' , the language selector is now suddenly clickable in MinervaNeue. However, a page appears where you can search for languages, but no languages are listed. Do the supported languages have to be entered somewhere via a configuration setting for MinervaNeue?
And yes, in timeless now a sidebar section with "Deutsch" and "English" is shown, but that's fine.

It seems like MobileFrontend/MinervaNeue uses the API query action=query&prop=langlinks to get the list of languages, which apparently doesn’t contain the Translate languages. Would it be possible and appropriate to add them?

That sounds plausible. I haven't found a way to set that yet - if the question was directed at me.

if the question was directed at me.

No, it was directed at @Nikerabbit (or any other Translate developer) – if they can be added, they can be added in the extension code, not in configuration. Sorry for the confusion.

@Tacsipacsi that would mean that the problem always occurs with translations in connection with MinervaNeue. But on this page it works with MinervaNeue:
https://www.mediawiki.org/wiki/Help:Navigation

Wikimedia wikis don’t use $wgPageTranslationLanguageList = 'sidebar-only'. What you see in Minerva’s language selector are the (interwiki) interlanguage links provided by Wikidata/Wikibase, not the (intrawiki) interlanguage links provided by Translate.

@Jdlrobson maybe T302200 is a similar error but on my wiki the error also occurs on pages that are in site's default content language.
Regarding T64702, I think this has already been tried. It was suggested by @Nikerabbit that I enable $wgPageTranslationLanguageList = 'sidebar-only'. But this does not solve the problem.

So it looks like MinervaNeue won't work with the Translate extension unless you use it the way it is used in the Wikimedia wikis.
@Tacsipacsi I'm not really familiar with interwiki unfortunately. Does it make sense to change my wiki to interwiki?

Interwikis, as their name implies, are primarily for links between wikis (e.g. from www.mediawiki.org to en.wikipedia.org). While it’s technically possible for an interwiki link to point to the same wiki, changing your wiki to interwikis would require manual maintenance (interlanguage links provided by Translate appear automatically once the translation is created, interwikis handled by MediaWiki core don’t) and thus make sense only in absence of a better solution. Fixing Translate to work with Minerva is definitely a better solution.

@Tacsipacsi Thank you for your detailed explanation! That is not an option then.

I have the same problem. As far as I can tell, the Translate plugin does not work properly with MinervaNeue. @Nikerabbit Is a solution being worked on?

No changes in Translate are planned to support MinervaNeue. The options we have in Translate is to use the <languages /> tag or use the (somewhat experimental) config option to put those language links in the interlanguage links section. I think the issue is that the latter doesn't work in MinervaNeue, but works in other skins.

Ok, so the problem is with Minerva Neue. Then I will report it there.
However, I can confirm that language switching is not possible with the skin citizen either. Tested with the current version of the Language Extension Bundle (2023-01-24 MLEB 2023.01).

Ok, so the problem is with Minerva Neue. Then I will report it there.

This is already the report. No need to create another one :)