This change introduces a new configuration variable, $wgULSEventLogging. When
set to true, ULS will register an EventLogging schema module for
<http://meta.wikimedia.org/wiki/Schema:UniversalLanguageSelector>,
making it possible to log events using `mw.uls.logEvent`. When false, the
schema module is not loaded, and `mw.uls.logEvent` is a no-op.
Change-Id: I7139e67cc2f830a6b4b3c8ff1fc72dfcdec9a699
* Since there is an API to load the i18n json files, avoid sending
list of localizations to client. Previously this list was used to
avoid 404s for json files. Now API takes care of it. Remove the
caching for this list too.
* Preload the i18n files on document ready. This avoids delay in
initializing IME or ULS window after fetch i18n from server.
* ApiULSLocalization can serve messages for all namespaces known if
namespace parameter is not set
Bug: 50391
Change-Id: I6b848da35f57353790bf460983cdf19a11bb238a
This reverts commit 6ae0fe3e44.
The commit was duplicating the preferences in 2 places
making the syncing hard.
As per discussion with Pau, we will try alternate approach.
Bug: 48642
Change-Id: I5c97838ed875364dc35b66a3d6c33d9975b5107e
Unlike freegeoip it also works with https
Also moved the getCountryCode function to init, as it should be
available regardless of whether we load the optional geoclient
module.
Bug: 40965
Change-Id: Ia18130890d09f86a93b5b61f7da7c48fcfa480c7
This allows us to enable web fonts and input methods for all
users by disabling just the interface language selection.
Updated the documentation of the variables to make it clearer
what each does. Summary:
* Enabling: $wgULSEnable and $wgULSEnableAnon
* Workarounds: $wgULSAnonCanChangeLanguage and $wgULSLanguageDetection
Cleaned up hooks, in particular rewritten getLanguage to separate
the logged in vs. logged out steps for easier understanding.
A followup commit is needed to disable language selection UI for
anon if $wgULSAnonCanChangeLanguage is false.
Change-Id: Ia8d21c394ff5efac0ce94664710c97dc3b74ec18
ULS is disabled for anonymous users on WMF projects. But to provide
rest of the features - apis, language database, language selection for
many use cases, we need to provide a minimal ULS. RL module
ext.uls.init does that job now.
For using ULS as interface language selection tool, new RL module
ext.uls.interface is introduced. That will add UI language selection,
webfonts, ime features, if enabled.
Change-Id: I796a7c9cce0de42bf8aa06b26e383e0075dbe1dd
Allow the cache-breaking toolbar and cookie-based user language
selection features to be disabled, while still allowing Wikibase to have
its language autocompletion drop-downs on special pages.
Change-Id: Iba18f666fdcf5b87b7068ab6b1537c868c8fe861
* It can be a user preference using the ULS Input method settings
* It can be a mediaWiki configuration $wgULSIMEEnabled
Change-Id: Ic5fb4932d62ab18db5d3b10ca81c0f6bfe9fd29e
* Update jquery.i18n - if messageLocationResolver returns false for
a locale, no server hit will be attempted
* Refactor i18n preparation code to a new method
* Use the ULS RL hooks to find out to which locales it is localized,
pass that list to js to avoid hitting server.
* Also avoid directory scanning in each request by putting
the locale list in cache
Fixes Bug 41454
Change-Id: I0c923b35db01b884e2dd55873dd5fb7384434645
Exception from line 124 of /www/w/includes/StubObject.php: Unstub loop detected on call of $wgLang->getCode
from Message::inLanguage
[28-Aug-2012 07:45:20] PHP Notice: Undefined variable: validLanguages in /www/w/extensions/UniversalLanguageSelector/UniversalLanguageSelector.hooks.php on line 80
[28-Aug-2012 07:45:20] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /www/w/extensions/UniversalLanguageSelector/UniversalLanguageSelector.hooks.php on line 80
Change-Id: I6ab332ce344c753a8ea5894fd9c45721a5835909
* The jQuery selectors should be referring to the menu for the current
ULS instance rather than querying on the page. This allows multiple
instances of ULS present in the page
* Keep the HTML template with the plugin. No more HTML added from hooks.
* Updated the example based on above change.
* Updated the hooks code.
* Some more documentation.
Change-Id: I48e2e167bc2c09b8653a142c50317c22e8ba1362
* Update .gitignore to ignore .idea.
* Removed unused local variables.
* use local context and Message class instead of deprecated wfMsg* methods.
* Remove redundant px in CSS where possible.
* Combine CSS statements where possible.
* Replace b by strong.
Change-Id: I9d5ed7b7ce585a1c101044254bcbdfc33d42afc1
Default value of this option will be $.uls.data.autonyms().
It can be set to limit language selection to a set of languages.
Updated examples, used a config variable wgULSLanguages to set this.
Change-Id: Ia322cbdcdb14f08619d2e4df5b23e2702841d147
This does not add much functionality. That will come in
future commits.
This commit has many cleanup, refactoring on the display settings,
language settings code.
Change-Id: I7fbc3ebb9b67c1afd80f159c2d82cd2a1c6bea74