This happens when you type language code and hit enter very fast, without
a pause. A matched language is not available when enter is hit, so it goes
noop.
Handled this special case by checking whether the input is a valid language
code and calling onselect on it.
Change-Id: Icaf809f8db8162264d990247a164449b02b2f418
* Refactor the code for frequent languages and introduce
mw.uls.getFrequentLanguageList
* Use it for showing previous languages in language settings
* Show the frequent/common language list in the language selector
opened from display settings.
Change-Id: Ic0f8ea6b9e9ba137b22649e8425fce8014ad456c
Small fix that make global scrolling to affect the ULS (using absolute positioning instead of fixed).
It solves the problem behind bug 39414 without the need for making the window draggable.
Change-Id: Icc3ca81c4b48040b38a5efb42422bdb53e0e2422
Also adds landing page feature. But candidate list is hardcoded
for now. Example html file updated.
show method of lcd renamed to render.
Introduced a trigger searchclear
Introduced mw.uls.changeLanguage, setPreviousLanguages
getPreviousLanguages and getBrowserLanguage methods
Region groups re-numbered - from [4, 1, 2, 3] to [1, 2, 3, 4].
Change-Id: Iac1edf628708e6f40e41578df70d40c42f15289a
A very simple mechanism for importing per-country language lists
from CLDR to ULS' langdb.
If I understand correctly, we only need languages spoken in a country
ordered by number of speakers. The CLDR data already has it and it should be
mostly useful.
Also added a utility function and a test.
Some tweaks to override the CLDR data are still needed:
* The data as it is omits some useful languages. For example, Amharic is not
listed in Eritrea.
* Some countries have a very large number of languages. Ideally it's right,
but is not practical currently, for example India with 75. Maybe
hand-picking or limiting the choice to top X languages can be useful,
but requires thought.
* Some language codes are standard, but different from Wikipedia practice,
for example "pa_Guru" (we just write "pa"). Maybe a mapping of codes
is needed.
Change-Id: I3c0cd5a9118997ba39a4f3695978e359f3de6956
* 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
Small adjustments on color to make it compliant with the Agora palette,
cross-browser gradient code added according to CSS WMF guidelines, and
adjustment of element sizes.
And whitespace and new line cleanups
Change-Id: I08890009eff9ed5edec77855467529eb07eaeb57
* Introduced deactivate (clear without showing all languages)
* Renamed noresult in region filter to noresults to match the
callback in languagefilter
* Some comments to help understand the code
Change-Id: I544a29b860a6d3f4a5aa770f84cc8a72ae4a4b9d
* WW can flip sides, other regions not
* Display settings icon now changes side and doesn't overlap with text
Change-Id: I35a6c93448a8dd178e657ba25093cf77199227c8
* Expose two options: left and top
* Make the init script pass that.
* Introduce position method in jquery.uls
Change-Id: I21f4d956f1ed2c56528731ab09ecc6a89834f796
* 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
Small CSS adjustments to:
* Reduce ULS vertical size to adapt to the 8-row layout.
* Use more contrast in colors to better comply with WCAG.
* Add overflow properties to regions in map to avoidlong texts to overlap.
Change-Id: I0498f68e32b978f2e1d8c2d4c5e788c71483590d
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
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
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
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
Added license and upstream information and a
script to compile repoconfig automatically
from metadata.
also contains integration code
Change-Id: Ib39668249dd568a1f6017f0c08a3b9d1e2067ae4
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
* 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