When the localization of core MediaWiki into a language on translatewiki.net passes a certain threshold (currently set to 13%), the translations begin to be exported to the core source code repo. However, to actually make it work, some more steps are needed. Most notably, this means adding the language to Names.php in core, removing it from translatewiki configuration, and possibly writing some more configuration with languages with particular fonts, etc.
The actual adding is most often done by myself (@Amire80) or by @jhsoby, and occasionally by other people.
The process is documented at https://www.mediawiki.org/wiki/Manual:Adding_and_removing_languages . Although it's really not complicated, it's nevertheless longish and manual, and this error-prone and a bit time-consuming.
Given that other than the language name ("autonym") and some advanced configuration, the process is mostly predictable, it can be at least partly automated. I wrote an initial simple script that does the main steps, and it can probably be improved further. This should make the process more automatic, quick, and doable by more people.
This checklist shows the progress of implementing the features, and it's roughly the same as the boilerplate in https://www.mediawiki.org/wiki/Manual:Adding_and_removing_languages :
- Verify autonym correctness in language-data
- Add to Wikifunctions's language list in function-schemata (optional in the initial version, given that Wikifunctions is a bit complex and stil new)
- Add to includes/languages/data/Names.php
- Add to RELEASE-NOTES
- Set fallback if needed
- In core (languages/messages/Messages*.php)
- In jquery.i18n (src/jquery.i18n.fallbacks.js)
- Remove fallback gender aliases if needed
- Set rtl if needed
- In core (languages/messages/Messages*.php)
- In MobileFrontend (src/mobile.languages.structured/rtlLanguages.js)
- Add namespace translations
- Add gender aliases if needed
- Check that namespace translations don't conflict with language codes
- Add $linkTrail
- Add date formats (if needed)
- Add digit conversion (if needed)
- Define wider line-height in resources/src/mediawiki.skinning/i18n-headings.less (if needed)
- Remove the language from Wikibase and WikibaseLexeme (if needed)
- Remove from translatewiki after deploying the core change
- mw-config/LanguageSettings.php
- mw-config/FallbackSettings.php
- Test language search in UniversalLanguageSelector and fix the search index (if needed)