Page MenuHomePhabricator

Add labels for Madurese & Nias languages, in parser function "#language"
Closed, ResolvedPublic

Description

For the Indonesian languages Madurese (local name: Madhurâ; language code: mad) and Nias (local name: Niha; language code: nia), the #language parser function does not provide a label.

The languages are in use in Template:VN on Wikispecies.

Event Timeline

Pigsonthewing renamed this task from Add language labels for Madurese & Nias to Add labels for Madurese & Nias languages, in parser function "#language".Aug 27 2020, 9:39 AM
Pigsonthewing updated the task description. (Show Details)

"mad" and "nia" are part of CLDR, at least for English and German: https://species.wikimedia.org/wiki/User:Raymond/languages

In which languages are the labels missing?

"mad" and "nia" are part of CLDR, at least for English and German: https://species.wikimedia.org/wiki/User:Raymond/languages

In which languages are the labels missing?

The labels do not appear in Template:VN on Wikispecies; see demo at https://species.wikimedia.org/w/index.php?title=User:Raymond/languages&diff=8009350&oldid=8009277

My language is set to En.

I see the issue: The template calls

-->{{#if:{{{mad|}}}|'''{{#language:mad}}:'''&nbsp;{{{mad}}}<br/>}}<!--

which means the autonym of the language is requested. The autonyms are stored in MediaWiki core, in file Names.php.
But additions there are done only for languages with existing translations of the MediaWiki user interface.

Now I have no idea how to fix this task. @Nikerabbit ?

Would LocalNamesMad.php in cldr extension work?

Would LocalNamesMad.php in cldr extension work?

Good idea, tested locally by creating LocalNamesMad.php with 1 entry:

'mad' => 'Madhurâ',

Wikitext:

{{#language:mad}}
{{#language:mad|mad}}
{{#language:mad|en}}

Rendering result:

mad
Madhurâ
Madurese

Not really the expected result :-( Bug or feature?

T264582 will fix the issue for Madurese.

Confirmed working. Thank you, all.