User:Egor/How to add a language

From Touhou Patch Center
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
  • If the language does not exist in MediaWiki's Names.php, you have to add it manually. (This is the case for alternative translations)
    • In /var/www/thpatch/w/LocalSettings.php add a line like $wgExtraLanguageNames['xx'] = 'My new language';.
    • Generate new UniversalLanguageSelector search data, to make the new language searchable by its title in addition to its language code:
php extensions/UniversalLanguageSelector/data/LanguageNameIndexer.php
  • Add patch → language code mapping to the thcrap_tl_patches hook located at Patch:Supported languages.
    • Ensure that this actually worked by running mysql thpatch -e "SELECT * FROM tpc_tl_patches WHERE tl_patch = 'lang_xx';".
    • If it didn't work, cd /var/www/thpatch/w/extensions/TouhouPatchCenter/maintenance and run ./kick.sh "Patch:Supported languages".
  • Create Patch:Lang xx with the following as content, modifying the dependencies as needed.
{{thcrap Patch Info
|title=My new language patch
|dependencies=nmlgc/base_tsa, nmlgc/base_tasofro, nmlgc/script_latin, nmlgc/western_name_order
}}