Support UI language change when global preferences are present
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
This commit is contained in:
committed by
jenkins-bot
parent
2e5e57d92c
commit
fa9cea4627
@@ -17,7 +17,8 @@
|
||||
"uls-plang-title-languages": "A title for the are in the sidebar in which the interlanguage links are supposed to appear.\nThis title is shown when there are no interlanguage links there, but an icon that enables the ULS is shown.\n{{Identical|Language}}",
|
||||
"uls-ime-helppage": "Target page for ime helps. Parameters:\n* $1 - ime id. Intended for wiki local customization. e.g. cyrl-palochka",
|
||||
"ext-uls-select-language-settings-icon-tooltip": "A tooltip for the icon that shows the language selector.\n{{Identical|Language settings}}",
|
||||
"ext-uls-undo-language-tooltip-text": "Text for the tooltip appearing when language is changed. Parameters:\n* $1 - the previous language acronym",
|
||||
"ext-uls-undo-language-tooltip-text": "Text for the tooltip appearing when language is changed. Parameters:\n* $1 - the previous language autonym",
|
||||
"ext-uls-undo-language-tooltip-text-local": "Text for the tooltip appearing when language is changed locally for one wiki when global language setting is in use. Parameters:\n* $1 - the previous language autonym",
|
||||
"ext-uls-language-settings-preferences-link": "Text for the link showin in user preference screen",
|
||||
"uls-betafeature-label": "Used as checkbox label for beta feature. \"Compact\" is an adjective and \"language links\" is a short name for the interlanguage links, also known as interwiki (links) in the sidebar of a page.\n\nThe description for this label is {{msg-mw|Uls-betafeature-desc}}.",
|
||||
"uls-betafeature-desc": "Description for the [[mw:Universal Language Selector/Design/Interlanguage links|compact interlanguage links beta feature]]. The \"language list\" is the \"{{int:otherlanguages}}\" box in the sidebar, also known as interwikis.\n\nThis description is for the checkbox label {{msg-mw|Uls-betafeature-label}}.",
|
||||
|
||||
Reference in New Issue
Block a user