wiki.techinc.nl/languages/data
C. Scott Ananian 21ead7a98d Ensure LanguageCode::bcp47() returns a valid BCP 47 language code
MediaWiki uses a number of nonstandard codes which do not validate
according to the IANA language subtag registry.  Some of them have
the wrong semantics entirely: MediaWiki's `sr-ec` variant maps to
BCP 47 `sr-EC` which is "Serbian as used in Ethiopia" (!).

Extend LanguageCode::bcp47() to map our nonstandard codes to valid
BCP 47 language codes.  Export the mapping so that it can be used
in JavaScript's corresponding mw.language.bcp47() implementation
as well, and return the standard BCP 47 codes in the siteinfo
API.

Thanks to TheDJ (I10b4473c7e53f027812bbccf26bb47aec15fddfd) and
Fomafix (I93efc190714ba76247d30ba49fc21ae872fc3555) for previous
attempts at this!

Also removed a fixme for the name of 'Twi', dating back to 2004
(f59c3be23b) -- checking
tw.wikipedia.org it certainly appears that the autonym of 'Twi'
is correctly 'Twi'.

Tracking bugs for invalid language codes are T125073 and T145535.
Discussion of zh-XX => zh-HanX-XX mapping is at T198419.

This is a replay of an earlier merged patch,
8380f0173e, which had to be reverted
because it caused regressions in the Babel extension (T199941).

Bug: T34483
Bug: T106367
Bug: T120847
Depends-On: I27a5b8e45b34c6b57c1b612b11548001c88cd483
Change-Id: Iebbc604af21d7f2af9c1f1ab2574cb5f309bf6ed
2018-10-11 01:53:54 -04:00
..
grammarTransformations Add Russian grammar forms to support Wikiversity 2018-02-26 14:18:01 +02:00
CrhExceptions.php build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-16 15:51:11 +00:00
Names.php Ensure LanguageCode::bcp47() returns a valid BCP 47 language code 2018-10-11 01:53:54 -04:00
normalize-ar.php language: Document sources of data and example usage 2018-07-19 20:06:28 -07:00
normalize-ml.php language: Document sources of data and example usage 2018-07-19 20:06:28 -07:00
plurals-mediawiki.xml
plurals.xml Replace HTTP by HTTPS 2018-05-22 12:14:14 +02:00
ZhConversion.php Chinese Conversion Table Update 2018-2 2018-06-10 23:05:19 +08:00