Notable changes: * First query global preferences to detect if global language setting is in use. If there is no global language setting, or if GlobalPreferences extension is not installed, it will fall back to changing the language as usual. If global language setting is found, it will add an override instead. * If a local override is added, the undo tooltip is different and links to the global preferences page. The task design shows mw.notify style popup located on a bottom right corner (LTR). I deviate from the design and re-use the old undo tooltip with a different message instead, for consistency. The message is chosen depending on whether local storage value `uls-gp` is set to '1' (set in mw.uls.changeLanguage). * I removed one use of deprecated mediawiki.api.options module. One other use still remains. * I changed tooltip text generation from html acrobatics to use mw.message.parseDom. Because of that I also had to move the click handler to avoid buildup of click handlers. * In message documentation fixed acronym -> autonym. Bug: T198206 Change-Id: Ie2ed792e222be919522bd1cdea98042515a0619d
375 lines
13 KiB
JSON
375 lines
13 KiB
JSON
{
|
|
"name": "UniversalLanguageSelector",
|
|
"version": "2018-07-10",
|
|
"author": [
|
|
"Alolita Sharma",
|
|
"Amir Aharoni",
|
|
"Arun Ganesh",
|
|
"Brandon Harris",
|
|
"Kartik Mistry",
|
|
"Niharika Kohli",
|
|
"Niklas Laxström",
|
|
"Pau Giner",
|
|
"Santhosh Thottingal",
|
|
"Siebrand Mazeland"
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector",
|
|
"descriptionmsg": "uls-desc",
|
|
"license-name": "GPL-2.0-or-later",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.29.0"
|
|
},
|
|
"Hooks": {
|
|
"BeforePageDisplay": "UniversalLanguageSelectorHooks::addModules",
|
|
"EnterMobileMode": "UniversalLanguageSelectorHooks::onEnterMobileMode",
|
|
"GetBetaFeaturePreferences": "UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences",
|
|
"GetPreferences": "UniversalLanguageSelectorHooks::onGetPreferences",
|
|
"LocalUserCreated": "UniversalLanguageSelectorHooks::onLocalUserCreated",
|
|
"MakeGlobalVariablesScript": "UniversalLanguageSelectorHooks::addVariables",
|
|
"PersonalUrls": "UniversalLanguageSelectorHooks::addPersonalBarTrigger",
|
|
"ResourceLoaderGetConfigVars": "UniversalLanguageSelectorHooks::addConfig",
|
|
"ResourceLoaderRegisterModules": "UniversalLanguageSelectorHooks::onResourceLoaderRegisterModules",
|
|
"ResourceLoaderTestModules": "UniversalLanguageSelectorHooks::addTestModules",
|
|
"SkinTemplateOutputPageBeforeExec": "UniversalLanguageSelectorHooks::onSkinTemplateOutputPageBeforeExec",
|
|
"UserGetLanguageObject": "UniversalLanguageSelectorHooks::getLanguage"
|
|
},
|
|
"APIModules": {
|
|
"languagesearch": "ApiLanguageSearch",
|
|
"ulslocalization": "ApiULSLocalization"
|
|
},
|
|
"MessagesDirs": {
|
|
"UniversalLanguageSelector": [
|
|
"i18n",
|
|
"i18n/api"
|
|
]
|
|
},
|
|
"AutoloadClasses": {
|
|
"ApiLanguageSearch": "api/ApiLanguageSearch.php",
|
|
"ApiULSLocalization": "api/ApiULSLocalization.php",
|
|
"FontRepoCompiler": "includes/FontRepoCompiler.php",
|
|
"LanguageNameSearch": "data/LanguageNameSearch.php",
|
|
"LanguageNameSearchData": "data/LanguageNameSearchData.php",
|
|
"ResourceLoaderULSJsonMessageModule": "includes/ResourceLoaderULSJsonMessageModule.php",
|
|
"ResourceLoaderULSModule": "includes/ResourceLoaderULSModule.php",
|
|
"ULSJsonMessageLoader": "includes/ULSJsonMessageLoader.php",
|
|
"UniversalLanguageSelectorHooks": "UniversalLanguageSelector.hooks.php"
|
|
},
|
|
"DefaultUserOptions": {
|
|
"uls-preferences": "",
|
|
"compact-language-links": true
|
|
},
|
|
"config": {
|
|
"@ULSGeoService": "ULS can use a geolocation service to suggest languages based on the country the user is vising from. If set to true, it will query a free geoip service. Setting this to false will prevent built-in geolocation from being used. You can provide your own geolocation by setting window.Geo to an object which has key \"country_code\" or \"country\".",
|
|
"ULSGeoService": true,
|
|
"@ULSEnable": "Enable language selection, compact language links, input methods and webfonts for everyone, unless the behavior is overridden by the configuration variables below. Even if false the classes and resource loader modules are registered for the use of other extensions. Language changing via cookie or setlang query parameter is not possible.",
|
|
"ULSEnable": true,
|
|
"@ULSEnableAnon": "Equivalent to $wgULSEnable for anonymous users only. Does not have any effect if $wgULSEnable is false.",
|
|
"ULSEnableAnon": true,
|
|
"@ULSAnonCanChangeLanguage": "Allow anonymous users to change language with cookie and setlang query parameter. Do not use if you are caching anonymous page views without taking cookies into account. Does not have any effect if either of $wgULSEnable or $wgULSEnableAnon is set to false. @since 2013.04",
|
|
"ULSAnonCanChangeLanguage": true,
|
|
"@ULSLanguageDetection": "Try to use preferred interface language for anonymous users. Do not use if you are caching anonymous page views without taking Accept-Language into account. Does not have any effect if any of $wgULSEnable, $wgULSEnableAnon or $wgULSAnonCanChangeLanguage is set to false.",
|
|
"ULSLanguageDetection": true,
|
|
"@ULSIMEEnabled": "Enable the input methods feature for all users by default. Can be controlled by the user.",
|
|
"ULSIMEEnabled": true,
|
|
"@ULSWebfontsEnabled": "Enable the webfonts feature for all users by default. Can be controlled by the user. @since 2014.02",
|
|
"ULSWebfontsEnabled": true,
|
|
"@ULSMobileWebfontsEnabled": "Set whether webfont support is loaded within the mobile interface (via the MobileFrontend extension).",
|
|
"ULSMobileWebfontsEnabled": false,
|
|
"@ULSPosition": "The location and the form of the language selection trigger. The possible values are: (a) \"personal\"- as a link near the username or the log in link in the personal toolbar (default). (b) \"interlanguage\": as an icon near the header of the list of interlanguage links in the sidebar.",
|
|
"ULSPosition": "personal",
|
|
"@ULSEventLogging": "Whether to use EventLogging. The EventLogging extension must be installed if this option is enabled. @since 2013.06",
|
|
"ULSEventLogging": false,
|
|
"@ULSImeSelectors": "Array of jQuery selectors of elements on which IME should be enabled. @since 2013.11",
|
|
"ULSImeSelectors": [
|
|
"input:not([type])",
|
|
"input[type=text]",
|
|
"input[type=search]",
|
|
"textarea",
|
|
"[contenteditable]"
|
|
],
|
|
"@ULSNoImeSelectors": "Array of jQuery selectors of elements on which IME must not be enabled. @since 2013.07",
|
|
"ULSNoImeSelectors": [
|
|
"#wpCaptchaWord",
|
|
".ve-ce-surface-paste"
|
|
],
|
|
"@ULSNoWebfontsSelectors": "Array of jQuery selectors of elements on which webfonts must not be applied. By default exclude elements with .autonym because that style set font as Autonym @since 2013.09",
|
|
"ULSNoWebfontsSelectors": [
|
|
"#p-lang li.interlanguage-link > a"
|
|
],
|
|
"@ULSFontRepositoryBasePath": "Base path of ULS font repository. If not set, will be set to 'UniversalLanguageSelector/data/fontrepo/fonts/', relative to $wgExtensionAssetsPath. @since 2013.10",
|
|
"ULSFontRepositoryBasePath": false,
|
|
"ULSCompactLanguageLinksBetaFeature": true,
|
|
"@ULSCompactLanguageLinksBetaFeature": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users.",
|
|
"ULSCompactLinksForNewAccounts": false,
|
|
"@ULSCompactLinksForNewAccounts": "Enable compact interlanguage links for new user accounts.",
|
|
"ULSCompactLinksEnableAnon": false,
|
|
"@ULSCompactLinksEnableAnon": "Enable compact interlanguage links for anonymous users."
|
|
},
|
|
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
|
"ResourceModules": {
|
|
"ext.uls.languagenames": {
|
|
"class": "ResourceLoaderULSModule"
|
|
},
|
|
"ext.uls.messages": {
|
|
"class": "ResourceLoaderULSJsonMessageModule",
|
|
"dependencies": "ext.uls.i18n",
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.displaysettings": {
|
|
"scripts": "js/ext.uls.displaysettings.js",
|
|
"styles": "css/ext.uls.displaysettings.less",
|
|
"dependencies": [
|
|
"ext.uls.languagesettings",
|
|
"ext.uls.mediawiki",
|
|
"ext.uls.webfonts",
|
|
"mediawiki.api.parse",
|
|
"mediawiki.ui.checkbox",
|
|
"mediawiki.ui.button",
|
|
"mediawiki.user"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.geoclient": {
|
|
"scripts": "js/ext.uls.geoclient.js",
|
|
"dependencies": [
|
|
"mediawiki.cookie"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.ime": {
|
|
"scripts": "js/ext.uls.ime.js",
|
|
"dependencies": [
|
|
"ext.uls.common",
|
|
"ext.uls.preferences",
|
|
"ext.uls.mediawiki",
|
|
"ext.uls.messages",
|
|
"jquery.ime",
|
|
"mediawiki.notify"
|
|
],
|
|
"messages": [
|
|
"uls-ime-helppage"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.init": {
|
|
"targets": [ "desktop" ],
|
|
"dependencies": [ "ext.uls.common" ]
|
|
},
|
|
"ext.uls.common": {
|
|
"targets": [ "desktop", "mobile" ],
|
|
"scripts": "js/ext.uls.common.js",
|
|
"styles": "css/ext.uls.less",
|
|
"skinStyles": {
|
|
"monobook": "css/ext.uls-monobook.css",
|
|
"vector": "css/ext.uls-vector.less"
|
|
},
|
|
"dependencies": [
|
|
"jquery.uls.data",
|
|
"mediawiki.api",
|
|
"mediawiki.cookie",
|
|
"mediawiki.storage",
|
|
"mediawiki.user"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.i18n": {
|
|
"targets": [ "desktop", "mobile" ],
|
|
"scripts": "js/ext.uls.i18n.js",
|
|
"dependencies": [
|
|
"jquery.i18n",
|
|
"mediawiki.util"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.inputsettings": {
|
|
"scripts": "js/ext.uls.inputsettings.js",
|
|
"styles": "css/ext.uls.inputsettings.less",
|
|
"dependencies": [
|
|
"ext.uls.ime",
|
|
"ext.uls.languagesettings",
|
|
"ext.uls.mediawiki",
|
|
"jquery.ime",
|
|
"mediawiki.ui.button",
|
|
"mediawiki.ui.radio"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.interface": {
|
|
"scripts": "js/ext.uls.interface.js",
|
|
"styles": "css/ext.uls.interface.less",
|
|
"dependencies": [
|
|
"ext.uls.common",
|
|
"mediawiki.jqueryMsg",
|
|
"mediawiki.storage",
|
|
"mediawiki.user",
|
|
"ext.uls.webfonts"
|
|
],
|
|
"messages": [
|
|
"uls-plang-title-languages",
|
|
"ext-uls-select-language-settings-icon-tooltip",
|
|
"ext-uls-undo-language-tooltip-text",
|
|
"ext-uls-undo-language-tooltip-text-local",
|
|
"ext-uls-language-settings-preferences-link"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.languagesettings": {
|
|
"scripts": "js/ext.uls.languagesettings.js",
|
|
"styles": "css/ext.uls.languagesettings.less",
|
|
"dependencies": [
|
|
"ext.uls.messages",
|
|
"ext.uls.preferences",
|
|
"jquery.uls.grid",
|
|
"mediawiki.ui.button"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.preferences": {
|
|
"scripts": "js/ext.uls.preferences.js",
|
|
"dependencies": [
|
|
"mediawiki.user",
|
|
"mediawiki.api",
|
|
"mediawiki.api.options"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.webfonts": {
|
|
"scripts": "js/ext.uls.webfonts.js",
|
|
"dependencies": [
|
|
"ext.uls.common",
|
|
"ext.uls.preferences",
|
|
"jquery.client"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.webfonts.fonts": {
|
|
"dependencies": [
|
|
"jquery.webfonts",
|
|
"ext.uls.webfonts.repository"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.webfonts.repository": {
|
|
"scripts": "js/ext.uls.webfonts.repository.js",
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.webfonts.mobile": {
|
|
"scripts": "js/ext.uls.webfonts.mobile.js",
|
|
"targets": [
|
|
"mobile"
|
|
],
|
|
"dependencies": [
|
|
"jquery.webfonts",
|
|
"ext.uls.webfonts.repository"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"jquery.ime": {
|
|
"scripts": "jquery.ime/jquery.ime.js",
|
|
"styles": "jquery.ime/css/jquery.ime.css",
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
},
|
|
"ext.uls.mediawiki": {
|
|
"targets": [ "desktop", "mobile" ],
|
|
"scripts": "js/ext.uls.mediawiki.js",
|
|
"dependencies": [
|
|
"ext.uls.common",
|
|
"ext.uls.languagenames",
|
|
"ext.uls.messages",
|
|
"jquery.uls",
|
|
"jquery.uls.grid",
|
|
"mediawiki.util"
|
|
],
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"jquery.uls": {
|
|
"targets": [ "desktop", "mobile" ],
|
|
"scripts": [
|
|
"jquery.uls/src/jquery.uls.core.js",
|
|
"jquery.uls/src/jquery.uls.lcd.js",
|
|
"jquery.uls/src/jquery.uls.languagefilter.js"
|
|
],
|
|
"styles": [
|
|
"jquery.uls/css/jquery.uls.css",
|
|
"jquery.uls/css/jquery.uls.lcd.css"
|
|
],
|
|
"dependencies": [
|
|
"jquery.i18n",
|
|
"jquery.uls.data",
|
|
"jquery.uls.grid"
|
|
],
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
},
|
|
"jquery.uls.data": {
|
|
"scripts": [
|
|
"jquery.uls/src/jquery.uls.data.js",
|
|
"jquery.uls/src/jquery.uls.data.utils.js"
|
|
],
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
],
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
},
|
|
"jquery.uls.grid": {
|
|
"targets": [ "desktop", "mobile" ],
|
|
"styles": "jquery.uls/css/jquery.uls.grid.css",
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
},
|
|
"jquery.webfonts": {
|
|
"scripts": "jquery.webfonts/src/jquery.webfonts.js",
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
],
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
},
|
|
"ext.uls.pt": {
|
|
"styles": "css/ext.uls.pt.less",
|
|
"localBasePath": "resources",
|
|
"skinStyles": {
|
|
"monobook": "css/ext.uls.pt-monobook.less"
|
|
},
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"ext.uls.interlanguage": {
|
|
"styles": "css/ext.uls.interlanguage.less",
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "UniversalLanguageSelector/resources"
|
|
},
|
|
"rangy.core": {
|
|
"scripts": "rangy/rangy-core.js",
|
|
"localBasePath": "lib",
|
|
"remoteExtPath": "UniversalLanguageSelector/lib"
|
|
}
|
|
},
|
|
"EventLoggingSchemas": {
|
|
"UniversalLanguageSelector": 17799034
|
|
},
|
|
"manifest_version": 1
|
|
}
|