Transmit current autonym via ResourceLoader instead of config var

This avoids loading of wgULSCurrentAutonym in every HTML page.

Change-Id: I8f3a28e3b46f41926bcbe54ace493a33f9ba4566
This commit is contained in:
Fomafix
2024-10-07 10:38:15 +00:00
committed by jenkins-bot
parent aa5fe16a88
commit a0df9be678
3 changed files with 34 additions and 7 deletions

View File

@@ -505,7 +505,7 @@
previousLanguage = mw.storage.get( 'uls-previous-language-code' );
currentLanguage = mw.config.get( 'wgUserLanguage' );
previousAutonym = mw.storage.get( 'uls-previous-language-autonym' );
currentAutonym = mw.config.get( 'wgULSCurrentAutonym' );
currentAutonym = require( '../data.json' ).currentAutonym;
// If storage is empty, i.e. first visit, then store the current language
// immediately so that we know when it changes.