Commit Graph

2509 Commits

Author SHA1 Message Date
Santhosh Thottingal
3625e110e4 Visual prefix
Make sure that suggestion is not only prefix but also visually prefix.
Checks the ending character is pre-base vowel.
There might be characters with this property in non-indic languages, but
I am not aware of now.

Change-Id: I91abd4dee6c4349e901777ebd6972731808daf45
2012-08-14 19:28:53 +00: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
3d2e85664f Partly reverting the langdb
Multiple scripts and autonyms are not currently supported by ULS utils.
I commented out the problematic lines and left the current de-facto
situation in Wikipedia.
This is a TODO item, but it needs proper specification.

Also updated the tests somewhat.

Change-Id: I8cdc6ae430f5bb5af4b1890abf6e71a91b6beb3d
2012-08-14 16:46:11 +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
Siebrand
e2af6470fb Merge "Add header to jquery.uls.data to say it's generated programatically" 2012-08-12 16:12:41 +00:00
Reedy
b696e24a99 Don't use json_encode directly
Also pass "true" to "isHtml", which reflects to prettify

Change-Id: Ifdefe4dc2bcccb06f4b13774b60c16a6c7066b1a
2012-08-12 17:01:18 +01:00
Reedy
254e6da88f Add header to jquery.uls.data to say it's generated programatically
Also add the same comment to the ulsdata2json.php script

Change-Id: I61f795ea6e4545e7b668f171f759a231cc995437
2012-08-12 16:57:04 +01:00
Reedy
f8387a1e07 Reformat JS so its actually readable
Rather than 13,000 characters wide..

Change-Id: I1f7be4162ecf701aed250146dd3b906f592817b0
2012-08-12 16:31:47 +01:00
Santhosh Thottingal
db0606f2fb Add langnames.ser
Change-Id: I49351f62bb786961c49aa08c18de05347ab2ef43
2012-08-10 12:07:35 +05:30
Siebrand
64f10a570e Merge "Add a test for checking that all languages have autonyms" 2012-08-09 21:00:58 +00:00
Santhosh Thottingal
66999e5c75 Merge "Fix bug 38847 Clear suggested text when input no longer matches" 2012-08-09 15:48:02 +00:00
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
Amir E. Aharoni
7382813788 Add a test for checking that all languages have autonyms
DRAFT
Some languages don't yet have autonyms, but probably all languages should
have them. It currently fails, because there are many such languages and
I am not aware of a nice way to skip it in QUnit (there is a proper skipping
mechanism in Perl testing, for example).

Also change orphanScripts() to return all scripts without groups.

Change-Id: I21c13d7bba89f3b991bc340e6ff6e040c704beb8
2012-08-09 16:04:02 +03:00
Santhosh Thottingal
bb4871f6e5 Fix bug 38847 Clear suggested text when input no longer matches
Change-Id: I6651f38830fcb54bf6b4290eeeedcf48841a8314
2012-08-09 10:23:22 +00:00
Nikerabbit
8855af1428 Merge "Add a test for autonym sorting" 2012-08-09 08:10:59 +00:00
Nikerabbit
c3e42fcc2a Merge "Handling enter key in language filter" 2012-08-08 13:54:27 +00:00
Amir E. Aharoni
3a6e45e364 Add a test for autonym sorting
Change-Id: Ib323ad3ac88bf69487eefb340cfc0fb687a35f70
2012-08-08 16:17:44 +03:00
Santhosh Thottingal
b8a9413ccc Always use autonyms for search results
Change-Id: Iacbaa78c9f66b0c754ac9faf9bb2752f95b35693
2012-08-07 19:24:46 +05:30
Nikerabbit
8925d872f4 Merge "Fix issue : Undo language tooltip present in all pages" 2012-08-07 13:06:03 +00:00
Santhosh Thottingal
315d529aed Handling enter key in language filter
* if the search string is language code, select it
* else if the autocompletion available select it
* else select the first language matching the query

Change-Id: If66f5c547a471026b7b2aebcde3c3b056e1c2917
2012-08-07 18:13:27 +05:30
Amire80
a7d3479d81 Merge "Implement visual language grouping in ULS" 2012-08-07 10:59:15 +00:00
Santhosh Thottingal
a9e49acf79 Fix issue: search strings like 't', 'a' are not giving results
There are languges starting with those letters, but without autonyms
Add a null check for undefined autonyms to prevent js error

Change-Id: I88a1d79b3bb23beac7238c1e8817cd6eac614613
2012-08-07 16:22:38 +05:30
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
1a10318acb Implement visual language grouping in ULS
Added a utility callback function to sort languages by autonym.
Added CSS fix for group separatos.

Change-Id: I73c7c6518a85e4ea7999be3ef92a121e877610e8
2012-08-07 13:42:20 +05:30
Niklas Laxström
13403af261 Fix the map in RTL, again
Change-Id: Idde206fd968757cacf778ba41140b99e7f322cc7
2012-08-07 06:41:14 +00:00
Santhosh Thottingal
fc5c291536 Do not perform full search on page load
Do it on first click.

Change-Id: I403aef108cf5d4993f6e8fbc9ebf372893e48e3d
2012-08-06 14:20:32 +05:30
Santhosh Thottingal
12d947860a Fix a regression - region filter not working
Change-Id: I13261b96e75de601720f58eb3c045447034dd7b0
2012-08-06 12:32:41 +05:30
Santhosh Thottingal
16c82503fb Misc. performance tweaks
* Do not hit search API if there are results to show from front end
* Avoid the lcd exists check
* slightly reduce the timeout of search term typing
* show autofill for search api results too.
* correct the tooltip text of results.

Change-Id: Id102fbf3bc09eb926d9e36f125ed6291943007f9
2012-08-04 11:30:37 +05:30
Reedy
8813bddbba Half the size of the png files (yay for lossless compression)
Change-Id: I99a32a73549cc9b57a45758551e141734386e96f
2012-08-03 13:33:09 +01:00
Santhosh Thottingal
76f9038aff Allow typo in search key
* Introduce Levenshtein algorithm
* New API param 'typos' to give number of typos allowed
* test cases

Change-Id: I22bf34d08a910d1509d7eab5adc292eadc9a7c7d
2012-08-03 07:33:12 +00: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
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
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
3d9807e7f2 Fix php warnings.
Change-Id: Icd1302f7db425157def4771ffe0d7c816164eb23
2012-07-31 16:03:52 +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