Commit Graph

34 Commits

Author SHA1 Message Date
Siebrand Mazeland
126bf95079 Add profiling.
Change-Id: I965ae08f801dfd24cd7fd5cc69087da7949f8a51
2012-09-29 00:57:44 -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
Santhosh Thottingal
c3201d95a7 Fix Bug 39733 - Setlang should clear uselang
When setlang and uselang given, setlang take precedence

Change-Id: I749647985932fe52c3c0d417678d98cd017f1f4d
2012-09-03 11:49:29 +05:30
Niklas Laxström
dc163127e3 Language detection was overriding language for logged in users
Change-Id: I491e429b6ea352c67bdc3b63acf191e187059fde
2012-09-01 19:09:40 +00: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
47e852f2e5 Fix Bug 39800 Tooltip of ULS search results should be in current UI language
Change-Id: If930c2035b2bd01764d109fcb9ad8e3838fd9cb5
2012-08-31 10:22:29 +05:30
Niklas Laxström
64c26ad137 Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
2012-08-30 15:36:51 +03:00
Niklas Laxström
36e82a41ca Trying to fix language selection once more
Anon users were getting fatal errors if they did
not possess the language cookie.

Change-Id: I00f71ca6462ebcaa800ef8569efeea794ba16a7c
2012-08-28 13:58:44 +00:00
Niklas Laxström
0f2f7f8b62 Fix bug: language stuck in English
Change-Id: Ice51d517f5381197f9c0f72844961e74b021e3dc
2012-08-28 12:12:15 +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
Niklas Laxström
7cbaf20937 Fix Icfa371d2: some workaround to avoid unstub exception and typofix
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
2012-08-28 08:11:35 +00:00
Santhosh Thottingal
7a5f3dd91d Do not accept invalid codes for setlang
Related to bug 37459, but this is not about uselang.

Change-Id: Icfa371d25697ee01c6bc262de968cfd2a1543154
2012-08-28 11:53:16 +05:30
Santhosh Thottingal
a74aa852a9 unnecessary module additions in addModule
* ext.uls.init is enough since it take care of all other dependecies

Change-Id: I8588006ea690391c417ced30cad1413e16406198
2012-08-21 15:28:12 +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
Reedy
0f0732f865 Fixup a few minor documentation issues
Added some newlines

Left a FIXME in LanguageNameIndexer.php

Losslessly compressed display.png

Change-Id: I884b423d3812ddb964a6a70f75a6331a73371165
2012-08-19 01:19:46 +01:00
Siebrand Mazeland
72d2519c4d Fix some issues pointed out by IDE.
* 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
2012-08-15 17:32:49 +02: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
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
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30
Santhosh Thottingal
8959f2a9b0 Language Stickiness
* use setlang parameter to change language preference
* language preference will be persistant for all users
* for anonymous users, cookie 'language' will be used
* for logged in users, preference 'language' will be used
* uselang parameter can be used for temporary switching
* language codes will be sanitized.

Change-Id: I2472aee9a7dcd824b622edd38e83f20212f09945
2012-07-31 22:45:25 +05:30
Santhosh Thottingal
5703f0f1ad Fix Bug 38665 - Show clean 'x' icon on the search box only when useful
Change-Id: I3fc295728f25cce7a326101467146f8ee3415116
2012-07-30 22:44:28 +05:30
pginer
d8038afad9 (bug 38686) Autocompletion support
Provide atocopletion capabilities to the search box: showing the remaining
 part of the matching element and allow user selection with keyboard.

Change-Id: Ic591c3c87632fb56af16b9b15ecedbf9558d674a
2012-07-30 15:40:03 +05:30
pginer
5b055bdf5b (bug 38670) Provide a no results found view
Provide a view showing:
- A feedback message where the current search term is displayed.
- Suggested options: based on likely languages and languages with one
additional level of editing distance than the used in the search algorithm.
- Instructions for search and browse including links to all the sub-regions
available.

* Introduced success, noresults callbacks for language and region filters
* Region filter can be a link for a region alone.

Change-Id: I713b62911bb32e1b1427320ced767b144180c5c4
2012-07-30 14:47:21 +05:30
Santhosh Thottingal
b1b7c2feb3 Use grid based css design (made css resets local)
Introduced foundation based grid css
Related changes in example, template html

Change-Id: I8b1c1bae1c733ea0ed997d8317b9954592cf6eca
2012-07-23 16:49:00 +05:30
Niklas Laxström
966416872e Replace Foo Americas with just America
Change-Id: Id11dc72c6f7e93ad88076441e5fff5ed69f7b069
2012-07-19 10:22:40 +00:00
Amir E. Aharoni
7f3b3b1210 Save source files as UTF-8
Non-ASCII characters broke the functionality.
Saving as UTF-8 fixes this.

Also removed an unneded <?php statement from a JS file and replaced
non-ASCII pretty apostrophes with straight ASCCI.

Change-Id: Ic6719fe0863bc5d8ae19abbf01cfbb7b2b714f12
2012-07-18 15:29:17 +03:00
Siebrand Mazeland
4041e7dca1 Implement dual license GPLv2 and MIT.
Should only be merged after +1 by all current contributors that are added as
reviewers.

Change-Id: Ie0480019524fa7b45ec6635d92b63e8b7880a2a0
2012-07-13 15:16:06 -04:00
Santhosh Thottingal
851d07dd8c Correct the naming of region and region groups
Change-Id: I857178bc9f830e1ecee7c34541ebab3fbbe95fbd
2012-07-03 10:23:10 +05:30
Santhosh Thottingal
7a9b801a79 Introduce Language Category Display (LCD)
Introduce $.fn.lcd - displaying languages by categories.

Added the jquery.viewport.js module by Mika Tuupola (MIT license).

More tests for language utils.

Change-Id: I804b6da8ab0a2d518e17ae8bbd35e1c1da4bab3f
2012-07-02 10:20:16 +05:30
Amir E. Aharoni
03df48a609 Created script groups, introduce $.uls.data
Gave script groups clear names and sorted them.
Documentation in comments.
Add tests to check that no script has been left behind.
Corrected Lath to Latn (thanks to testing).

Rename langdb.js to ext.uls.data.js

Add ResourceLoader module ext.uls.data

Change-Id: I91fafa94ffd1eaf2d12c954fe3a71064276533f9
2012-06-27 15:08:07 +05:30
Santhosh Thottingal
a759f0ecbe Introduce regionfilter
RegionFilter is a basic jquery plugin to work with ULS
to select languages based on regions.

PS2: Added a css class for elements with regionfilter.
Used it for visual indication of selection. Plus some
clean up.

Change-Id: Ib01b4077435f98665075310e285e68f8538eeb4e
2012-06-26 16:53:15 +05:30
Santhosh Thottingal
9087825e6d Basic language selector
* uses setlang attribute in URL to switch language
* introduced a language filter widget by extending
  jquery.ui.autocomplete
* UI rendering is done by using SkinAfterContent hook

Change-Id: Ifa63a04ba1d060b6db8fba14bb868045cf6b97c3
2012-06-21 20:08:47 +05:30
Santhosh Thottingal
8527e33475 Skeleton extension for Universal Language Selector
* Basic extension code with i18n
* Adds a link to personal links to trigger ULS
* Core uls javascript code, to plug to the given trigger.
* Qunit, PHPUnit framework in place.
* and lot of TODOs and FIXMEs

Patch set 2:
* A tiny whitespace fix.

Change-Id: I300647a21e0b7f65b7d9dc6101014ea9389c9f2a
2012-06-15 10:49:18 +03:00