Commit Graph

87 Commits

Author SHA1 Message Date
Santhosh Thottingal
04c5cc1e23 Merge branch 'master' of github.com:wikimedia/jquery.uls
Conflicts:
	examples/index-i18n.html
2012-10-09 19:44:01 +05:30
Santhosh Thottingal
76094b8e03 i18n the placeholder text in language selector and correct the onready
callback
2012-10-09 19:41:32 +05:30
Amir E. Aharoni
77e62c99a5 Changed $( this ) into meaningful variables 2012-10-08 17:34:35 +02:00
Amir E. Aharoni
f14073a21a Rename the variable that to lcd 2012-10-08 17:22:01 +02:00
Amir E. Aharoni
2e22c5c550 Initial whitespace cleanup 2012-10-08 17:04:05 +02:00
Santhosh Thottingal
dfe6fcbb13 Merge pull request #8 from amire80/2012/bug_39932/no_cyclical_region_click
Do nothing if the clicked region is already selected
2012-10-08 02:35:30 -07:00
Amir E. Aharoni
c40caf4a29 Update the remaining calls to deprecated functions 2012-10-08 08:27:50 +02:00
Amir E. Aharoni
faeac72491 .languagesByScript* -> .getLanguagesByScript* 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
bd355b249d .allRegions -> .getAllRegions 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
d74d9b003b .autonyms -> .getAutonyms 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
5e16abf26d .autonym -> .getAutonym 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
7d48ec230b .regions -> .getRegions 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
17f525f510 Replace .script with .getScript 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
c007ba3427 (bug 39963) Add "get" to function names
Kept the old names and gave them simple deprecation marking.
2012-10-08 08:13:34 +02:00
Amir E. Aharoni
972247b895 Remove unecessary whitespace 2012-10-07 17:17:36 +02:00
Amir E. Aharoni
97194de047 Do nothing if the clicked region is already selected
Supposed to fix bug
https://bugzilla.wikimedia.org/show_bug.cgi?id=39932
2012-10-05 08:38:43 +02:00
Santhosh Thottingal
ca7ba74e5e Merge pull request #5 from amire80/cldr_handling_updates
CLDR handling updates
2012-09-24 17:46:48 -07:00
amire80
9ce06d2112 Whitespace in jquery.uls.data.utils.js 2012-09-24 17:34:53 -07:00
amire80
72fe9f1e82 Update ulsdata2json.php for cleaner codes handling
Add supplementalData.xml to .gitignore.
Tweaks to make CLDR codes usable in ULS.
2012-09-24 17:32:22 -07:00
Santhosh Thottingal
61649c567b Merge pull request #4 from amire80/master
Starting RTL support (copied from Gerrit, except the tests)
2012-09-24 16:57:17 -07:00
amire80
7f16137efc Fix whitespace 2012-09-24 16:51:03 -07:00
amire80
f9e3e148e3 Add basic support for dir and lang attributes for autonyms
Added a util function for getting the language's direction.

Added lang and dir attributes for every language item in the list.
2012-09-24 16:34:06 -07:00
Santhosh Thottingal
9d988dbafe Scroll improvements
* Load the next region when scroll reached half of the current
  region
* Fix the scroll sync with region highlight in both up and down
  scrolls
* Address Bug 39923 - Make scroll to next region more fluent
2012-09-23 21:35:37 -07:00
Santhosh Thottingal
2bdc515930 Correct the jquery object for i18n
Change-Id: Ic6fc68f27f9944d869206076951e3b7cdaac6f07
2012-09-22 10:05:01 -07:00
Santhosh Thottingal
0781f022dd Internationalize ULS
* internationalize ULS when jquery.i18n is present. Otherwise use the
fallback English interface
* Example with and without i18n
* Message files for few languages
2012-09-21 22:24:06 -07:00
Santhosh Thottingal
0747e74365 User region names instead of region codes
* Till i18n is in place, use a workaround to show region names in
  English

Change-Id: I6e14ab67600ad32263f04eb0aa6b931177425e5a
2012-09-09 07:50:16 +00:00
Nikerabbit
ccbd1dcdde Merge changes I83d4808a,If8ea8c1f
* changes:
  JsHint fixes - Move the invocation into the parens that contain the function.
  Fix Bug 39096 - Narayam compatibility with ULS
2012-09-07 11:07:10 +00:00
Santhosh Thottingal
f3967d9b11 Fix Bug 39096 - Narayam compatibility with ULS
* Correct the event propagation
* Narayam blue background prevents the autocomplete visible. Overriding
 background color with transparent, but that does not look good. May be we
should consider this while designing jquery.ime

Change-Id: If8ea8c1f074cc20b743805953a3bd68da62cb55b
2012-09-07 11:06:30 +05:30
Santhosh Thottingal
442af47190 (bug 39833) Make language code search case insensitive
Change-Id: I67b98f058f969cd2fe9fa22085f8f781b29dce3f
2012-09-06 09:59:35 +00:00
Santhosh Thottingal
c83baac893 Fix Bug 39930 - Common languages not always shown in the Worldwide region
Change-Id: I764af7ad88cf79e9e07b96f899f352ad3082df45
2012-09-06 14:15:05 +05:30
Santhosh Thottingal
badd5c95ac Fix the broken region links in 'noresults' screen.
It was commented out in some previous commits.
Also correct the region code of America from NA to AM

Change-Id: I6cec2560393134de1190291e1f49bc0ac4280af0
2012-09-05 18:15:45 +05:30
Santhosh Thottingal
298c91a68f Misc jshint fixes
* Move the invocation into the parens that contain the function.
* unescaped regex
* Do not wrap function literals in parens unless they are to be
  immediately invoked.

Change-Id: Ib3360f88fb7674af0e857d8a84a91fdac1fd8487
2012-09-04 16:02:28 +05:30
Amir E. Aharoni
da89d0088b (bug 39946) Add Portuguese to WW
Change-Id: I1b54971ae4e4d1ec9e1eac98a46291504d53bb61
2012-09-03 20:04:46 +03:00
Siebrand
98a64d7dbb Merge "Fix Bug 39921 - World wide languages need not be repeated in all regions." 2012-09-03 16:58:27 +00:00
Siebrand
6df99929ba Merge "Fix Bug 39926 - Australia region inconsistent visibility" 2012-09-03 16:39:54 +00:00
Siebrand
392ecf8b4b Merge "Fix Bug 39829 - Language Selection does not work while using Language Code" 2012-09-03 16:35:12 +00:00
Santhosh Thottingal
f837ed904a Fix Bug 39922 - The "No results found" view lacks suggested languages
noresultsview is part of uls.lcd now, moved the html template too.

Change-Id: I9aee0ab1b62e61c3ec0e2c89f7d07b7a4432ef33
2012-09-03 19:31:41 +05:30
Santhosh Thottingal
085f9f9e87 Fix Bug 39926 - Australia region inconsistent visibility
Removed AU region, using PA instead.

Change-Id: I088baf7de6d0c0d52a0cf42a159b6d3339793dcc
2012-09-03 18:44:25 +05:30
Santhosh Thottingal
5e86782803 Fix Bug 39829 - Language Selection does not work while using Language Code
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
2012-09-03 18:18:53 +05:30
Santhosh Thottingal
f37571a250 Fix Bug 39921 - World wide languages need not be repeated in all regions.
Change-Id: I4470a2a7976df17f6f0f8f97d15ce12163cc3c27
2012-09-03 18:10:31 +05:30
Niklas Laxström
a524e09cbf Message consistency
* Removed title case
* "language used for menus"

Change-Id: If5c0323f5e49f2e71a3b6257b62ce5a08c74704c
2012-09-03 09:10:08 +00:00
Santhosh Thottingal
992c16a209 Fix Bug 39535 Recent languages in languages settings
* 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
2012-09-03 08:46:47 +00:00
Amir E. Aharoni
e63a1e7eaf (bug 38679) Replacing regions NA, LA, SA with AM
Change-Id: Ib484dd9cb0453ec1bd214e0196119b14d96ac128
2012-09-01 10:09:16 +03:00
Amir E. Aharoni
fd8d6e2110 Filtering out languages that the ULS doesn't recognize
Change-Id: Ifda0caa640434254cf99c25a70887126f83427d2
2012-08-31 08:29:34 +03:00
Niklas Laxström
a4f103e78f Added/fixed some sami languages
Names taken from (en|fi).wiktionary.org

Change-Id: I6b08417e9a9d65753028d6c5f151b89485542484
2012-08-30 14:35:48 +00:00
Amir E. Aharoni
5172fcc253 Sort language names in the landing page
Change-Id: I7463cd08fb42e79f9e089809e3d16567c1ab1a60
2012-08-30 16:16:05 +03:00
Niklas Laxström
4eb214b66f Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
2012-08-30 15:36:51 +03:00
Santhosh Thottingal
035cfb08c4 Lazy loading of regions
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
2012-08-30 14:26:57 +03:00
Amir E. Aharoni
790065a1f9 Adding language presence by territory to langdb
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
2012-08-26 10:40:52 +03:00
Amir E. Aharoni
ee3cd5c8d1 Add basic information and utils for RTL scripts
Change-Id: Ie01b58cd3627e8f0bf726f0bb296bffb25efcbb5
2012-08-22 18:16:01 +03:00