Commit Graph

69 Commits

Author SHA1 Message Date
Siebrand Mazeland
7ad76c6b64 Coding style updates
Fix issues pointed out by PHP Code Sniffer.

Change-Id: I31279cda12101bb0ad66f104c9cd0e11019d46f1
2013-06-17 16:48:41 +02:00
Siebrand Mazeland
48b8f11ca6 Update version
Change-Id: Ica44e38470c5d4356130ec9e398274b624b4045c
2013-06-17 16:45:14 +02:00
Siebrand Mazeland
1aa4940de7 Update docs and type hints
Change-Id: I6c513265d7e3136c43c160b86a83a921defaa3ec
2013-06-17 16:33:52 +02:00
Santhosh Thottingal
7b92820129 Update version
Change-Id: I5c6fdd33ff8ef1aee8f090b5bf80d124b26f68df
2013-06-11 10:31:22 +05:30
Santhosh Thottingal
ec0ea0407d Introduce Api for loading jquery.i18n json files
To avoid CORS issue with old browsers

Bug: 45958
Change-Id: I37638e06f21ab573c9ce37a4e9fb20bc763ac98f
2013-06-04 10:21:32 +00:00
Santhosh Thottingal
2174740bb6 Revert "Add a MediaWiki preference for enabling ULS IME"
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
2013-05-22 07:46:05 +00:00
Amir E. Aharoni
6ae0fe3e44 Add a MediaWiki preference for enabling ULS IME
Bug: 47240
Change-Id: I957d9f409b0c29f956bcf8a49187cdf27c4f42f8
2013-05-13 15:48:00 +03:00
Niklas Laxström
4554c79d51 Load ULS language list from a resource loader module
Having them in the page source of every page view is wasteful.

Bug: 41210
Change-Id: If15e297a4781cc49ded06fbc906529f57a22aafe
2013-04-28 11:26:40 +00:00
Niklas Laxström
60242e2c53 Use wmf geoip by default
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
2013-04-28 14:25:26 +03:00
Niklas Laxström
6b143320ad Introduced $wgULSAnonCanChangeLanguage
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
2013-04-26 12:21:23 +00:00
Amir E. Aharoni
f4f332a459 Add the sidebar ULS cog icon and $wgULSPosition variable
Change-Id: I6acf1e21316a41ab8fcb4fd65e065be68693430f
2013-04-23 14:53:58 +02:00
Santhosh Thottingal
5bbdd16aa7 Version update
Change-Id: I52b4c9c7d5f8172dffe51c9fdfd1213f58d73b14
2013-04-01 09:44:36 +05:30
Niklas Laxström
7158b0adeb Add separate Resources.php
Change-Id: Ie02fbdd1bb8a1c83f66eacff8de0ca0bd6c67ab4
2013-03-27 15:09:59 +05:30
Niklas Laxström
00189afa66 Add ext.uls.geoclient back to deps
Change-Id: I4e1aa22edd89ff666b29c7b26c1928885e8bc896
2013-03-26 10:18:44 +00:00
Santhosh Thottingal
453912fdf2 Provide a base ULS RL module and seperate UI language selection
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
2013-03-26 07:20:01 +00:00
Santhosh Thottingal
d4cea039b4 Update jquery.uls and make it more modular
jquery.uls RL module split to
* jquery.uls (language selector UI/UX)
* jquery.uls.grid (Foundation grid framework)
* jquery.uls.data (language database)
* jquery.uls.compact (compact mode ULS)

This contains updates from jquery.uls upstream

Change-Id: Iaddb1228c076f698498d3b0554061624b6e433c6
2013-03-26 07:17:58 +00:00
Siebrand Mazeland
e3a4d27a49 Update code formatting
Change-Id: I6a004a2d1ee803325cb6cfa3ee797a89db058635
2013-01-28 11:04:45 +01:00
Santhosh Thottingal
bfb1f319eb Version update
Change-Id: I7afb84041b2700ad5fe1dd49c806ff8e1cb9ebbb
2013-01-16 17:15:12 +05:30
Amir E. Aharoni
027776c85f (bug 41763) Add a hook for support uls-preferences
Change-Id: I8fdc1a0527c9a99b6e5eb95c183955a162233b1d
2013-01-09 16:12:20 +02:00
jeblad
236a940fac (Bug 42453) Fix dependency of uls to include geoclient
Change-Id: Idc3c07b314ea47e1e3764bb87572e6d1a7ac33cc
2012-11-26 18:29:34 +01:00
Tim Starling
86e6bc9654 Allow ULS toolbar to be disabled for anons only
Per Daniel's request on bug 42157

Change-Id: I5df826f0466bf20729c7969cb7b549e41016c194
2012-11-16 10:43:26 +11:00
Tim Starling
6abb1b3d4a Allow the main functionality of ULS to be disabled
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
2012-11-15 16:33:13 +11:00
Niklas Laxström
3c9e7249a8 Geoclient fixes for https and WMF
* Don't call freegeoip on https, it wont work
* Use Geo instead of GEO like WMF

Change-Id: I9ebdd9f3518e15e70122a9c8c8d64240d5e44c5b
2012-11-10 07:15:07 +00:00
Santhosh Thottingal
fc29a7e587 Option for disabling the IME system
* It can be a user preference using the ULS Input method settings
* It can be a mediaWiki configuration $wgULSIMEEnabled

Change-Id: Ic5fb4932d62ab18db5d3b10ca81c0f6bfe9fd29e
2012-10-31 12:57:14 +05:30
Santhosh Thottingal
f13e474e43 Input method integration with ULS
The file ext.uls.settingspanel.js is a draft for common
code in the different settings panels.

Change-Id: I057274f16b27b2c18d43d41c1d43f485a18ef0bf
2012-10-26 11:14:02 +05:30
Santhosh Thottingal
c19c0b4db7 Fix Bug 40714 - ULS geoclient needs proper interface
Change-Id: Id8d7356ec75e8652c75927736a60b916dd069c28
2012-10-13 20:02:32 +05:30
Santhosh Thottingal
a13f9b739d Internationalize ULS
* Integrate jquery.i18n
* Update jquery.uls from upstream and use the build version

Change-Id: I523444b1f6b177f14a4799a455a16a14649b0e1b
2012-09-23 13:12:45 -07:00
Siebrand Mazeland
e1a4f7f0cb After training the PHPStorm code formatter.
See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
2012-09-17 17:10:59 -07:00
Niklas Laxström
b1fad2c1bb I18n#1473: Use preferred language for anonymous users
Change-Id: I25833bb4c35453bbb055b4782d996604c93ef7db
2012-08-31 10:31:11 +00:00
Santhosh Thottingal
b586f4795e ext.uls.preferences need mediawiki.api
Change-Id: I8c8e9026b0d161b66609c7491451bac44ed0b5c9
2012-08-30 23:53:18 +05:30
Niklas Laxström
64c26ad137 Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
2012-08-30 15:36:51 +03:00
Santhosh Thottingal
b845045070 Use jquery.jStorage for saving preferences of anonymous users
Change-Id: I36f9f13a3468a11e05d1e1bb59b1841aa3464a24
2012-08-30 08:23:21 +00:00
Amir E. Aharoni
610cc362ac Get a list of the current user's Accept-Language codes
Change-Id: I2c8742f56e34aed8a368bb5add2cff30fa89ad33
2012-08-28 08:36:50 +00:00
Santhosh Thottingal
01ceb4c4f8 Move regionfilter to a seperate javascript file
To lib/jquery.uls/src/jquery.uls.regionfilter.js

Change-Id: I5f4e424ff68d7a7ed6407f48ddf84cdadfe90a52
2012-08-21 16:20:03 +05:30
Santhosh Thottingal
f3ffe8bead jQuery.uls bug fixes and keep template with the plugin
* 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
2012-08-19 18:29:37 +03:00
Santhosh Thottingal
1bc80d58ba ULS persistent preference system.
Change-Id: Ieb22e09f226e770c9935b875f4226a75ffd8c46d
2012-08-16 17:20:21 +03:00
Santhosh Thottingal
710146ef99 CSS fixes for display settings
CSS fixes by Pau, based on If279f7a8

Change-Id: I33f63eef3f7aea26b9498c3c357930d8e6b54085
2012-08-16 06:34:13 +00:00
Santhosh Thottingal
a17598ad04 More UI code
Not all functionalities are added.

Change-Id: I37007a8dedce6bcb055a9d6d79376f40868fd6dd
2012-08-15 18:25:09 +03:00
Amir E. Aharoni
0f98849f50 Fixed Windows line ending
Change-Id: I171036fe9a13c2de2ab530c1243f006209e49175
2012-08-15 09:24:58 +03:00
Amire80
103269694f Merge "WebFonts integration with ULS display settings." 2012-08-15 06:01:13 +00:00
Santhosh Thottingal
8f7382b242 Introduce languages options to ULS
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
2012-08-15 08:52:46 +03:00
raymond
0b6989931f Use existing constant as version in the extension credits
Add newline at the end of the i18n file, otherwise Translatewiki.net export script would break.

Change-Id: I5e4165f8848c70569f6d4b47a227aac879055ab2
2012-08-14 21:30:24 +02:00
Santhosh Thottingal
e62b50c9d8 WebFonts integration with ULS display settings.
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
2012-08-14 18:01:25 +03:00
Niklas Laxström
3f4b5e4540 Mediawiki WebFonts repository for jquery.webfonts
Added license and upstream information and a
script to compile repoconfig automatically
from metadata.

also contains integration code

Change-Id: Ib39668249dd568a1f6017f0c08a3b9d1e2067ae4
2012-08-14 19:01:46 +05:30
pginer
a870263ad9 Fixes to avoid fragmentation in the language list
Adjustments in the language layout to make it easy to scan through
the language list and distinguish the different script groups:

* Removed the empty spacing row between groups.
* Changed the maximum number of languages in a column.
* Changed the order of script groups for better discoverability.

Change-Id: If223ae65bfec256c56d6092628b3999dfd02a119
2012-08-14 13:53:03 +03:00
Amir E. Aharoni
adf80d8791 Fixed languagesettings dependency
Also corrected to Unix line endings.

Change-Id: If6a28f312b09a0b797864064329fda41ce8332fd
2012-08-14 13:46:59 +03:00
Niklas Laxström
23763bd247 Added autonyms directly to langdb.yaml
* Can add languages not in MW
* Can get rid of foo / bar names which include different scripts
* Can get rid of directionality marks
* PHP scripts to generate the jquery.uls.data.js is now independent of
  mediawiki and moved the scripts to lib/jquery.uls/data
* No pretty printing for the jquery.uls.data.js and added a 'do not edit' comment.
* Related changes in RL module definition and example html

Change-Id: I9a360dbdec4e9312aa5c76f801424ff95a8550d6
2012-08-14 10:19:38 +00:00
Santhosh Thottingal
7414184593 Webfonts integration
Change-Id: Ic5ba46689a8fdbea6fc7c1bae74d798de3310bdf
2012-08-14 11:52:22 +05:30
Santhosh Thottingal
b66f4ebb8e Merge "Add jquery.webfonts" 2012-08-14 06:22:04 +00:00
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30