Commit Graph

595 Commits

Author SHA1 Message Date
Amir E. Aharoni
20261a806d Fix whitespace
Change-Id: I9c8fb4a8d9cf2a38207d60ea28084d3d3a3d3cea
2012-08-09 17:33:35 +03:00
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
b42728334b Fix issue : Undo language tooltip present in all pages
Show only in next page after language change.

Change-Id: I044001366328c7a87af6c0f274d9372a9211818c
2012-08-07 15:23:30 +05:30
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
96304a6d22 Merge "Undo feature for language selection" 2012-08-02 15:22:37 +00:00
pginer
7ab7c826c5 ULS headings font and spacing fixes
Adjusting typographic properties to avoid them to be overriden when
the ULS is integrated in a different project

Change-Id: I85fc855c80d170bbfe62cc72bb917b737f2b3b1d
2012-08-02 20:47:20 +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
pginer
fa16376501 Trigger icon size fix
Reduce the icon size to fit the size of the language trigger label of the personal
toolbar.

Change-Id: I1946c91a2aa8b47eefa61f10c84b8059949dfc3d
2012-08-02 15:47:52 +02:00
Santhosh Thottingal
baf066f86a Minor cleanup
Remove unused CSS and reorder css, js imports in example/index.html

Change-Id: Iabffe20a683dc4dad07bac95b01f29e7a2159680
2012-08-01 10:59:02 +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
Santhosh Thottingal
388f9cde80 Search performance improvement
Avoid calling the search for each keypress. It will make
browser unresponsive. Call search on timeout. That is when
user stops typing for 500 millisecond

Change-Id: I93a0e5c5d1035463be9a25047134b042f6743fb8
2012-07-30 18:25:59 +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
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
fb11c720b5 Use autonyms for displaying search results
And use English names in tooltip

Change-Id: Ibf8e4035677f3c0467fe5165c680bce15e3b3bb5
2012-07-26 18:33:47 +05:30
Santhosh Thottingal
af3f6ac58d Loop optimization and cleanup
Reduced the complexity of search loops
And some cleanup.

Change-Id: I772b02abd14d50ad1965e933d8dbb6d3eb4e0b1d
2012-07-25 16:14:16 +03:00
Santhosh Thottingal
05eb91bee3 cleanup and optimization
* reused jquery object  $( 'input#languagefilter' )
* handled the clean button click and escape press on ULS
* some code cleanup.

Change-Id: I5b8b597dceb4cf273a7eff2761f42557828e630b
2012-07-24 14:29:32 +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
Niklas Laxström
6187cc45a5 Fix the location of America and Asia in RTL languages
Change-Id: I51485b35518d32c239962bf0943bd63f010ddc3b
2012-07-19 10:28:53 +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
6cc7c75458 Merge "Implement dual license GPLv2 and MIT." 2012-07-18 05:35:30 +00:00
Niklas Laxström
6af3c4c9b8 Fix usage of console causing errors on browsers not having it
https://translatewiki.net/wiki/Thread:Support/Loss_of_script_functionality

Change-Id: Iace2ba107221673514942331d0e43559ff6b4c19
2012-07-14 01:40:28 +00: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
493cfbe2c4 Fix the search icon location in search field.
Change-Id: Ib6253e6a002e02f0b04bce3b31220809ffea79d9
2012-07-04 12:02:16 +05:30
Santhosh
3c32f82cef Merge "Filter out unknown languages." 2012-07-03 14:52:59 +00:00
Amir E. Aharoni
1b058500be Filter out unknown languages.
Change-Id: Ia001c33915d00750a68877bde03a6ceb5d373da1
2012-07-03 14:44:18 +00:00
Amir E. Aharoni
31e483a19e Sort languages by script in the initial view
* Added new utility functions to return all languages by script group.
* Used that function to sort languages initially.
* Added tests.

Change-Id: I405cb73e6af13f59c307da5a7f2269049ecba698
2012-07-03 17:26:03 +03:00
Santhosh Thottingal
5625f6eb70 Misc UI fixes
* Fix the columns breaking when language name breaks to new line
* Fix the Map highlighting when no region id in viewport.
* Correction of color codes, margins according to design.

Change-Id: I0121de92bdf5340bf2365c3b7d6045ef963e6d2a
2012-07-03 11:46:46 +00: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
Amir E. Aharoni
607abaa201 Sorting languages by script.
* Clarified naming: separated regions from region groups.
* New utility functions for sorting and grouping languages.
* JSHint fixes.
* Added tests.

Change-Id: I8153a2b89fbc7b9a7d6b7deeb87208efc9f4d021
2012-07-03 13:59:00 +03: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
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
Santhosh Thottingal
666bec2633 Smart search for the languages
A search match happens if any of the following passes:
a) Language name in current user interface language
   'starts with' or 'contains' search string.
b) Language autonym 'starts with' or 'contains' search string.
c) ISO 639 code match with search string.
d) ISO 15924 code for the script match the search string.

Change-Id: I7690f06423c931fade3bee1da3a445b4b586e13c
2012-06-30 17:53:21 +05:30
Amir E. Aharoni
43d7604203 Adding utility functions for the ULS langdb
* More functions for making useful queries to the langdb.
* Tests.

Change-Id: I29a3a25ef1b15d5925df2aa3d06f9221f8e5231e
2012-06-29 08:11:16 +03:00
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
Niklas Laxström
4a782cbd65 Move the text to bottom-left as in prototypes
Change-Id: Iffb3bcee43cd0e0c76e7abd7e29cf8fa0e7ede98
2012-06-25 07:36:27 +00:00
Niklas Laxström
16d2b1c33d Proof of concept language database database
Change-Id: I5d6b9ff4ce46c8e2d48bf56ab08f093287672467
2012-06-22 17:34:43 +05:30
Santhosh
2fd23fe2e0 Merge "Focus the search field by default" 2012-06-22 10:08:11 +00:00
Niklas Laxström
db360d7b9d Don't highlight empty strings (between each letter)
Change-Id: I6608c8954f415eeaa8a40da4a1c0e22638a9f860
2012-06-22 09:56:28 +00:00
Niklas Laxström
73b08997a5 Focus the search field by default
Change-Id: I0b14ccbccb4870094f0e72c1bf29e0d167e4a6b7
2012-06-22 09:53:55 +00:00
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