Commit Graph

41 Commits

Author SHA1 Message Date
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
Santhosh Thottingal
fd00333e56 Add jquery.webfonts
Upstream : https://github.com/santhoshtr/jquery.webfonts

Change-Id: I8cf90b8ea538505faedb4c5880357205e68a4288
2012-08-13 20:01:25 +05:30
Santhosh Thottingal
1648899c45 Introduce display settings link at the top of ULS
Extend $.fn.uls render method to add additional rendering of display
settings link.

Add css for the new element.

Add display.png icon from the Agora icon set.

Change-Id: I7a29b4892be02526969b0dd786c74bdb7551c074
2012-08-09 16:25:16 +03:00
Santhosh Thottingal
878313d2ec Rearranging Files
* Seperating standalone jQuery ULS plugin and extension related code
* lib/jquery.uls can be submodule, but not now.

Change-Id: I7d9cb47daa88dd1a27ceda602a08cab0073caf33
2012-08-03 12:24:04 +05:30
Santhosh Thottingal
8d1985b9fb Undo feature for language selection
* Use jQuery tipsy plugin to show previous language
* previous language is stored in cookie

Change-Id: Iaae668c33209e32a74dee00211bb22c7b3562456
2012-08-02 17:51:31 +03:00
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
08c14dafa4 Cross-language language name search
Implementation of Also Written As language name
search algorithm.
See http://etherpad.wikimedia.org/l10n-uls-language-search

Change-Id: Iff84408c531b650a44d031b63d5c823737cceafc
2012-07-30 14:08:26 +05:30
Santhosh Thottingal
e728a690a3 Extension authors
Change-Id: Iecba54b1745b3061374cf8502641ea4524076c67
2012-07-26 12:04:15 +05:30
Santhosh Thottingal
964f508533 onSelect callback option for ULS
* Correct the dependencies for ext.uls.core, it need not depend on
mediawiki.Uri.
* Move the setlang function out of ULS core js.
* Add a callback function to the example.

Change-Id: Ie3598236b2a884580092194c57558ec109d20803
2012-07-23 17:42:00 +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
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
566651b9f6 Fix the language display scroll sync with regions map
* Remove jquery.viewport which was not able to give correct viewport
relative to container.
* The scroll syncing part is written by Niklas

Change-Id: I1cbeaa2a5c297deab7338f331d8db69c17aa2214
2012-07-03 11:15:34 +00:00
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
Santhosh Thottingal
f71174a02e Remove the dependency on jquery.ui.autocomplete
Implement the search functionality in the module itself.

Change-Id: I2193e3f92fc21c90bbcc163c38affa8fb1ffa406
2012-07-01 20:32:39 +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
Amir E. Aharoni
93ca0e5a48 Actually enabled running the JS tests
Change-Id: I5e66be0b5307024e6d21eaedf918ffcbd03d5ed3
2012-06-27 08:13:18 +03:00
Niklas Laxström
16d2b1c33d Proof of concept language database database
Change-Id: I5d6b9ff4ce46c8e2d48bf56ab08f093287672467
2012-06-22 17:34:43 +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