Commit Graph

77 Commits

Author SHA1 Message Date
Santhosh Thottingal
5b728ec413 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
d29364989f 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
df34d47723 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
6d9bb6f6a5 (bug 39833) Make language code search case insensitive
Change-Id: I67b98f058f969cd2fe9fa22085f8f781b29dce3f
2012-09-06 09:59:35 +00:00
Santhosh Thottingal
b7d61c3607 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
bad1394c6a 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
8134f523dc Add grunt to jquery.uls
This library is supposed to be hosted outside WMF gerrit. So adding a
build, test system.
* Add js lint and css lint
* minifier for css and js
* css lint does not pass now.

Change-Id: Iaadfad786f5de4b2ab95e24d3ea4f1d21952af75
2012-09-05 15:03:54 +03:00
Santhosh Thottingal
dd3d214cb5 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
126af493b7 (bug 39946) Add Portuguese to WW
Change-Id: I1b54971ae4e4d1ec9e1eac98a46291504d53bb61
2012-09-03 20:04:46 +03:00
Siebrand
b4b3a4894d Merge "Fix Bug 39921 - World wide languages need not be repeated in all regions." 2012-09-03 16:58:27 +00:00
Siebrand
65f63a143b Merge "Fix Bug 39926 - Australia region inconsistent visibility" 2012-09-03 16:39:54 +00:00
Siebrand
9b185f9f35 Merge "Fix Bug 39829 - Language Selection does not work while using Language Code" 2012-09-03 16:35:12 +00:00
Santhosh Thottingal
97cbd51b49 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
9354d197d3 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
3609e1f42e 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
7a64e48321 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
01b41b9783 Message consistency
* Removed title case
* "language used for menus"

Change-Id: If5c0323f5e49f2e71a3b6257b62ce5a08c74704c
2012-09-03 09:10:08 +00:00
Santhosh Thottingal
472cb8ba55 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
de3abc3315 (bug 38679) Replacing regions NA, LA, SA with AM
Change-Id: Ib484dd9cb0453ec1bd214e0196119b14d96ac128
2012-09-01 10:09:16 +03:00
Santhosh
953e0fb60b Merge "Fix to allow using the ULS when it is bigger than the viewport" 2012-08-31 11:03:10 +00:00
pginer
70b0dc79fb Fix to allow using the ULS when it is bigger than the viewport
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
2012-08-31 12:16:11 +02:00
Amir E. Aharoni
b0f4742eb1 Filtering out languages that the ULS doesn't recognize
Change-Id: Ifda0caa640434254cf99c25a70887126f83427d2
2012-08-31 08:29:34 +03:00
Niklas Laxström
99d3d152b4 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
730d4df846 Sort language names in the landing page
Change-Id: I7463cd08fb42e79f9e089809e3d16567c1ab1a60
2012-08-30 16:16:05 +03:00
Niklas Laxström
64c26ad137 Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
2012-08-30 15:36:51 +03:00
Santhosh Thottingal
fde6b18e40 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
ca411138c7 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
67dd765e13 Add basic information and utils for RTL scripts
Change-Id: Ie01b58cd3627e8f0bf726f0bb296bffb25efcbb5
2012-08-22 18:16:01 +03:00
Amire80
08cd11b4fb Merge "Cache the region filter results" 2012-08-21 14:14:17 +00:00
Santhosh Thottingal
79139e650d Avoid jquery filter for the region div for each language
Keep it in an object and reuse.

Change-Id: I1a367132e9b99b4fc6b2b8ff4023f638e6bc183f
2012-08-21 17:56:22 +05:30
Santhosh Thottingal
5760df80d3 Bind the language links using jquery on and not in loop
Change-Id: Ic4d2dd2b06acae57060bced9938a219bf8cebd73
2012-08-21 17:44:23 +05:30
Santhosh Thottingal
fbb55dfe6f Cache the region filter results
Change-Id: Ia303774d3c1171f3e8c1b3f7ca8b102c79e68300
2012-08-21 17:06:41 +05:30
Santhosh Thottingal
01ceb4c4f8 Move regionfilter to a seperate javascript file
To lib/jquery.uls/src/jquery.uls.regionfilter.js

Change-Id: I5f4e424ff68d7a7ed6407f48ddf84cdadfe90a52
2012-08-21 16:20:03 +05:30
Niklas Laxström
d40e51c4f0 Stray space
Change-Id: I2c6e3a6670f99769b1227578c26579e4678fe781
2012-08-20 11:14:09 +00:00
Santhosh Thottingal
ca4ba4f270 Fix the close button of ULS
Regression from I9d16cbac

Change-Id: Ib0a64a9d8909e10c6f83727d4056f663c49d7ec7
2012-08-20 10:15:34 +05:30
Santhosh Thottingal
3f3608200a Fix region highlight when result is scrolled.
Regresssion from I48e2e167

Change-Id: Ibe7e49a21d5527ee56d466a68e19c051b0f6e39a
2012-08-20 10:12:05 +05:30
Santhosh Thottingal
d67771fa01 Display Settings - ULS - Display settings navigation
Change-Id: I9d16cbac8f0f897378f769b0b98e48441503fe1a
2012-08-19 19:49:11 +03:00
Santhosh Thottingal
f3ffe8bead jQuery.uls bug fixes and keep template with the plugin
* 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
2012-08-19 18:29:37 +03:00
pginer
7b15032626 CSS adjustments on color and sizes
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
2012-08-17 17:23:39 +05:30
Amir E. Aharoni
a080bf8056 Remove double space
Change-Id: I01098eb637bbfe6170901dae68d5ea0fe1570aa6
2012-08-16 18:39:02 +03:00
Niklas Laxström
ee7f16526c (bug 39230) Autocompletion does not get cleared on region change
* 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
2012-08-16 09:33:39 +00:00
Santhosh
7ab6960645 Merge "Fix bug 39417 - Scrollbars appear for ULS regions" 2012-08-16 09:27:44 +00:00
Niklas Laxström
ea47df33e0 Two RTL fixes
* WW can flip sides, other regions not
* Display settings icon now changes side and doesn't overlap with text

Change-Id: I35a6c93448a8dd178e657ba25093cf77199227c8
2012-08-16 08:57:16 +00:00
pginer
eb9ea46496 Fix bug 39417 - Scrollbars appear for ULS regions
Modified overflow property to avoid vertical scrollbars.

Change-Id: I93fdb98207348e8b105c223f3d4518b8bbed9bee
2012-08-16 10:46:37 +02:00
Santhosh Thottingal
398f9ef949 Position the language settings
* Expose two options: left and top
* Make the init script pass that.
* Introduce position method in jquery.uls

Change-Id: I21f4d956f1ed2c56528731ab09ecc6a89834f796
2012-08-15 21:25:16 +03:00
Siebrand Mazeland
72d2519c4d Fix some issues pointed out by IDE.
* 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
2012-08-15 17:32:49 +02:00
Santhosh Thottingal
dbcdd63e69 Documentation for methods
Change-Id: I290a2019b80370d3ae462c63fa64abcdceb7c1e8
2012-08-15 20:10:28 +05:30
pginer
a4ee53b827 CSS fixes for colors and size consistency
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
2012-08-15 14:24:53 +02:00
Amir E. Aharoni
05a878ba9f Added French to NA (Quebec), SA (Guiana) and WW
Also updated tests accordingly.
Patch originally proposed by Aude.

Change-Id: Id83f6fb80d394e6fac4d7486ba2feae9e9c5bd99
2012-08-15 09:37:16 +03:00
Santhosh Thottingal
0f65329aaf Merge "Visual prefix" 2012-08-15 06:10:20 +00:00