wiki.techinc.nl/includes/resourceloader
C. Scott Ananian 8380f0173e 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.

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.

Bug: T34483
Bug: T106367
Bug: T120847
Change-Id: I807dd55d49e9bd19443329231326a5b0d3e6c453
2018-07-13 14:56:18 -04:00
..
DerivativeResourceLoaderContext.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoader.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderClientHtml.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderContext.php Replace call_user_func_array(), part 2 2018-06-07 20:19:26 -07:00
ResourceLoaderEditToolbarModule.php
ResourceLoaderFileModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderFilePath.php Remove self-explaining "section heading" comments from classes 2017-12-28 16:12:08 +01:00
ResourceLoaderForeignApiModule.php
ResourceLoaderImage.php ResourceLoaderImage module definitions can define a defaultColor 2018-06-27 20:36:47 +00:00
ResourceLoaderImageModule.php Merge "Allow ResourceLoaderImage modules without data URIs" 2018-07-09 14:24:36 +00:00
ResourceLoaderJqueryMsgModule.php Fix spacing for @param and indent of function comments 2017-08-15 14:33:29 +00:00
ResourceLoaderLanguageDataModule.php Ensure LanguageCode::bcp47() returns a valid BCP 47 language code 2018-07-13 14:56:18 -04:00
ResourceLoaderLanguageNamesModule.php mediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki.language.init' 2018-07-10 11:12:45 -07:00
ResourceLoaderLessVarFileModule.php ResourceLoaderLessVarFileModule: Add parameter 'lessMessages' 2018-05-12 17:46:15 +02:00
ResourceLoaderMediaWikiUtilModule.php Change @inheritdoc to @inheritDoc 2017-08-11 16:49:52 +02:00
ResourceLoaderModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderOOUIFileModule.php Restore the ability to set $wgResourceModuleSkinStyles for 'oojs-ui-core.styles' 2017-06-06 00:05:17 +02:00
ResourceLoaderOOUIImageModule.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ResourceLoaderOOUIModule.php Refactor registration of OOjs UI resource modules 2017-06-01 17:04:05 +02:00
ResourceLoaderSiteModule.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
ResourceLoaderSiteStylesModule.php
ResourceLoaderSkinModule.php resourceloader: Improve coverage of SkinModule 2018-05-04 17:31:04 +01:00
ResourceLoaderSpecialCharacterDataModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderStartUpModule.php resourceloader: Embed 'mediawiki' directly in startup response 2018-06-27 17:06:35 +00:00
ResourceLoaderUploadDialogModule.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
ResourceLoaderUserDefaultsModule.php Document return string as JavaScript code for getScript 2017-04-03 10:24:41 +02:00
ResourceLoaderUserModule.php resourceloader: Remove 'user.styles' dependency from 'user' module 2018-05-23 15:53:33 +01:00
ResourceLoaderUserOptionsModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderUserStylesModule.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoaderUserTokensModule.php resourceloader: Move FILTER_NOMIN annotation to the beginning of output 2018-01-30 19:12:34 +00:00
ResourceLoaderWikiModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00