Commit Graph

403 Commits

Author SHA1 Message Date
Amir Aharoni
9a1f5c0e5a Return an empty array if there are no languages in territory
Downstream bug:
https://phabricator.wikimedia.org/T265158
2020-11-16 10:19:11 +02:00
jdlrobson
967eec093e Always send event when triggering onSelect
The $.uls function in jquery.uls.core in createLanguageFilter
passes the onSelect function to the
$.fn.languagefilter so the onSelect there should be made
compatible.

Bug: T261973
2020-11-05 11:06:36 +02:00
Amir Aharoni
5b615109ea Update language-data from upstream
Changes:
* Update autonyms for Altay languages (alt, atv)
* Add redirect from cbk-zam to cbk.
  (Addresses downstream bug https://phabricator.wikimedia.org/T263717 .)

Updating to
51685b542b
2020-09-29 13:29:25 +05:30
Amir Aharoni
8ba1d8e9a0 Update language-data
Adding languages:
* Altay (alt)
* Obolo (ann)
* Southern Altay (atv)
* Baoule (bci)
* Nuxalk (blc)
* Mara (mrh)

Also update autonym for Madurese.

Updating to
762dd9c5f0
2020-07-24 16:35:26 +03:00
Amir Aharoni
b332a6587e Update language-data
* Add Madurese (mad) and Vertical Mongolian (mvf)
* Add America region to Venetian

Updating to
d60d8bd629
2020-05-26 12:09:45 +03:00
Amir Aharoni
9d8b9cb69c Update language-data
* Add syl
* Update moe autonym
* Change script and update autonym for ary

Updating to
4a6e18a137
2020-04-28 19:23:08 +05:30
Amir Aharoni
d97c2e9d8d Update language-data
* Update sjd autonym
* Move ms-arab a few lines (automatic change from CLDR)

Updating to
b485f5a134
2020-04-07 16:35:13 +03:00
Amir Aharoni
0b4357621b Update language-data
* Add Chuckhi (ckt)
* Remove shy and szy, which are not standard in CLDR for the territories.

Updating to
6ca93c0966
2019-12-17 09:25:06 +05:30
Amir Aharoni
783ee39251 Update language-data
* Rename ais to szy
* Add shy-latn

Updating to
ecb14194d9
2019-11-26 23:09:42 +02:00
Ed Sanders
d53beca719 Update linters
* Update eslint and stylelint config
* Fix Gruntfile.js to actually run stylelint
2019-11-13 04:14:16 +02:00
Amir Aharoni
c4f0fdab15 Update language-data
Adding languages:
* Bajau (bdr)
* Cakma (ccp); also adds support for the Chakma script
* Jeju (jje)

Also adds Aragonese as a language of Spain.

Updating to
d7a5e8db99
2019-11-08 08:14:33 +05:30
Amir Aharoni
e79ea4b4e6 Update language-data 2019-09-03
* Change autonyms for Sunda and Banjar
* Add Osing

Updating to
c77e901498
2019-09-03 15:26:15 +03:00
Amir E. Aharoni
0d0bd11860 Update language-data (#347)
* Add awa and mrv
* Update autonyms for min, mni, and sju

Updating to
ac6fc6786e
2019-08-29 16:51:33 +05:30
Amir Aharoni
d9405c9839 Update language-data from upstream
* Revert the BCP 47 standardization patch. Will be restored some time soon.
* Update autonyms: ban, gcr, hyw, jv
* Add languages: ksw, pov, rej, vai

Updating to
6313c6a9f8
2019-05-21 13:06:45 +03:00
Santhosh Thottingal
4ba3b6b1bc Update jquery.uls.data with latest language-data
*  Add proper BCP 47 names for various languages by cscott
2019-01-18 17:40:02 +02:00
Kartik Mistry
27c21219b4 Update package.json and fix eslint issues (#322) 2018-09-06 15:41:27 +05:30
Amir Aharoni
9ab4deeb4e Update language-data from upstream
Add Montenegrin (cnr).
2018-09-05 17:05:18 +03:00
Amir Aharoni
248e43a76a Update language-data from upstream
* Remove capital letter from the  Armenian autonym
* Update Santali autonym to the Ol Chiki script
* Add Eastern Pwo (kjp)
* Add Fula language to several countris in regions data

Updating to
5e8bf8b95f6123ab7522ec7876c8399ffd3f6e04
2018-09-03 09:07:53 +03:00
Niklas Laxström
9ff574c8cf Update language data to 9384a83
Add cak
2018-08-29 18:40:12 +05:30
jhsoby
61fa235e84 Update language-data from upstream
* Adding Fang (fan)
* Adding Bunun (bnn)
* Adding Garhwali (gbm)

Updating to
wikimedia/language-data@9e30563
2018-08-07 11:45:11 +02:00
Amire80
37651ed7c1 Update language-data from upstream
* Fixing the Fon autonym
* Adding Kaqchikel
* Fixing es-419 spelling

Updating to
d52eb59fd8
2018-06-24 21:54:53 +03:00
Pl217
44bd07f038 Fix onInputChange being called twice
ULS input element had onInputChange() handler attached to
change, textInput and input events.

That caused onInputChange() to be called twice when there is user
input and ULS gets closed, since 'change' event fires when
<input type="text"> element loses focus.

Registering handler only for 'input' is sufficient for the intent.
2018-05-29 15:21:11 +03:00
Pl217
5dfca5fd8a Replace jQuery.proxy() with Function.prototype.bind() 2018-05-28 12:06:38 +03:00
Amire80
2c1b2dd1b8 Group languages in each region by script group
sortByScriptGroup and getLanguagesByScriptGroup are updated from language-data.
(jquery.uls.data.utils should be merged to language-data.)

This resolves downstream bug
https://phabricator.wikimedia.org/T189090
2018-05-22 17:50:44 +03:00
Amire80
4088411430 Update language-data with the Fon language 2018-05-18 20:03:10 +03:00
Amire80
f4f2808f49 Update language-data from upstream
* Add gor and btm
* Update autonym for brx

Updating to
057affa5a1
2018-04-30 13:51:03 +05:30
Amir E. Aharoni
e5ec92f35c Update language-data from upstream (#311)
Add the following languages:
* Northern Ndebele (nd)
* Okanagan (oka)

Update autonyms for the following languages:
* Kurdish (ku)
* Korean (DPRK variant, ko-kp)

Updating to
aab40a4f6f
2018-04-02 14:25:37 +05:30
Amire80
31696b4074 Add maxlength to the languagefilter input
This input field is only for language names. There's no reason for it
to have something longer. Looking at the logs of searches,
people sometimes write very long things there: gibberish,
URLs, inappropriate search strings, mistaken pastes from other places,
and so on.

So it should be limited by maxlength.

It's practically never useful after 20 characters, but setting at 40
just to be on the safe side. The longest language name in langdb is 34.
2018-03-26 15:13:15 +03:00
Amire80
274f7b15a1 Add documentation for the event argument 2018-03-26 11:41:54 +03:00
Amire80
119f3565f1 Pass the event to ULS core select()
Follow up to #305.
2018-03-26 11:41:54 +03:00
Amire80
99c979edcf Update options defaults and documentation
* Add ulsPurpose to README
* Add default undefined for noResultsTemplate
* Reorder options in the README according to defaults in jquery.uls.core.js
2018-03-21 11:04:43 +02:00
Niklas Laxström
798e200b56 Merge pull request #305 from amire80/T189582
Pass the event object when calling the click handler
2018-03-15 18:15:50 +02:00
Amire80
1120ab276c Update the argument for noResults in lcd
Follow up to #306.
2018-03-15 17:05:01 +02:00
Amire80
970d073efa Send a data object in $.trigger
There was a mistake in #299: the $.trigger() must take only one argument
for extraParameters. Sending another parameter causes NULL to be logged in
EventLogging for ulsPurpose.
2018-03-15 11:57:02 +02:00
Amire80
f11634e6d3 Pass the event object when calling the click handler
This will allow distinguishing Click and Ctrl/Command-Click.
See downstream bug https://phabricator.wikimedia.org/T189582
2018-03-13 14:34:11 +02:00
Niklas Laxström
c9c2056d04 Update language-data to 9a506b9 2018-03-05 18:56:02 +05:30
Amire80
00ff49e190 Convert ulsPurpose from a data attribute to an languagefilter option 2018-03-05 12:58:00 +02:00
Amire80
ddb691a918 Allow identifying the context of the different ULS panels within one app
Add the ulsPurpose option. Empty string by default.

This is useful for web application that use ULS in several different context,
and need to distinguish what was the purpose of the particular ULS panel.

An example of usage can be found at
https://phabricator.wikimedia.org/T179402
2018-03-04 23:01:35 +02:00
Santhosh Thottingal
1f900843fe i18n for the noResultsTemplate
See https://phabricator.wikimedia.org/T187390
2018-02-16 09:34:54 +05:30
Pl217
4cb4fe2370 Merge pull request #275 from wikimedia/srpski
Fix "srpski" not finding results in Wikipedia compact links
2018-02-08 15:52:03 +01:00
Niklas Laxström
eccd0e1945 Change code structure a bit per code review comments 2018-02-08 15:26:15 +02:00
Santhosh Thottingal
c2eb7a7850 Use Array.prototype.indexOf instead of $.inArray
All our supported browsers now have this ES5 method.
2018-02-08 17:23:12 +05:30
Niklas Laxström
0352b3df0d Fix to avoid displaying duplicate results caused by redirects 2018-02-07 15:24:15 +02:00
Pl217
819b3b0414 Make ULS responsive
* Make ULS responsive
* Depend on both screen size and number of languages when calculating
ULS menu width.
* Introduce resize listener to responsively recreate ULS when screen
size changes.
2018-02-07 17:30:52 +05:30
Niklas Laxström
9fba3ab728 Fix my broken merge conflict result 2018-02-06 16:41:26 +02:00
Niklas Laxström
2b1cc8678f Merge branch 'master' into srpski 2018-02-06 16:31:46 +02:00
Pl217
54a466ee52 Merge pull request #283 from santhoshtr/keydown-simplify
Simplify key press event handlers
2018-02-06 11:19:45 +01:00
Santhosh Thottingal
3161b34b2b language-data update: Add Western Armenian to known languages 2018-02-02 11:55:54 +05:30
Niklas Laxström
bb8b48aa38 Stop rendering languages twice on initial display
The resultHandler is responsible for updating the `LanguageCategoryDisplay`, so we should not call `render` separately in `search` when there is no search query.

https://phabricator.wikimedia.org/T185086
2018-01-31 16:52:23 +05:30
Santhosh Thottingal
081310b45e Style adjustments for no-results
* 20px spacing above and below the "No results found" message.
* 12px spacing above and below the search indications ("You can search by...")
* Adjusting the text color to use Base20 (#54595D)
* Adjust the background to use the same background color as the area above it (#FCFCFC).
* Add a top border in Base80 (#EAECF0) to separate both areas.

See https://phabricator.wikimedia.org/T175235
2018-01-30 12:52:47 +05:30