It is by design that ResourceLoader expects languageScripts to be complete (e.g. no partial fallback) because they are free-form javascript.
However we should still support fallbacks.
e.g. in a case of momentjs, jquery.i18n, or jquery.ui.datepicker like:
'jquery.ui.datepicker' => array(
'languageScripts' => array( 'af' => 'jquery.ui.datepicker-af.js', 'cs' => 'jquery.ui.datepicker-cs.js', 'de' => 'jquery.ui.datepicker-de.js', 'el' => 'jquery.ui.datepicker-el.js', 'en-gb' => 'jquery.ui.datepicker-en-GB.js', 'ru' => 'jquery.ui.datepicker-ru.js',
When, for example, using de-formal, since it isn't specified, should result in 'de' being loaded instead. Not falling back straight to 'en'.
Same for 'ab' falling back to 'ru' etc.
Version: unspecified
Severity: normal