Commit Graph

17 Commits

Author SHA1 Message Date
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
08c14dafa4 Cross-language language name search
Implementation of Also Written As language name
search algorithm.
See http://etherpad.wikimedia.org/l10n-uls-language-search

Change-Id: Iff84408c531b650a44d031b63d5c823737cceafc
2012-07-30 14:08:26 +05:30
Santhosh Thottingal
af3f6ac58d Loop optimization and cleanup
Reduced the complexity of search loops
And some cleanup.

Change-Id: I772b02abd14d50ad1965e933d8dbb6d3eb4e0b1d
2012-07-25 16:14:16 +03:00
Amir E. Aharoni
7f3b3b1210 Save source files as UTF-8
Non-ASCII characters broke the functionality.
Saving as UTF-8 fixes this.

Also removed an unneded <?php statement from a JS file and replaced
non-ASCII pretty apostrophes with straight ASCCI.

Change-Id: Ic6719fe0863bc5d8ae19abbf01cfbb7b2b714f12
2012-07-18 15:29:17 +03:00
Siebrand Mazeland
6cc7c75458 Merge "Implement dual license GPLv2 and MIT." 2012-07-18 05:35:30 +00:00
Amir E. Aharoni
2775e6f5b3 Update tests and sync DBs after reordering regions
Followup I6fcf34dd

Change-Id: I2369f97ec978892a8db9fa15c17885de9cc841ec
2012-07-15 15:35:46 +00:00
Siebrand Mazeland
4041e7dca1 Implement dual license GPLv2 and MIT.
Should only be merged after +1 by all current contributors that are added as
reviewers.

Change-Id: Ie0480019524fa7b45ec6635d92b63e8b7880a2a0
2012-07-13 15:16:06 -04:00
Amir E. Aharoni
704a54647b Fixed a test that checks Greek script languages
Tests about the Greek script failed because new languages were added to
the language database. Also, it had to be deepEqual and not strictEqual.
I fixed the tests.

Change-Id: I68cf0593354d71bd35c53bac5afe7cabd25182a1
2012-07-10 09:55:26 -04:00
Siebrand Mazeland
fcbcf1a2a9 Merge "Updates for language database (~75 codes added)." 2012-07-03 15:00:15 +00:00
Amir E. Aharoni
31e483a19e Sort languages by script in the initial view
* Added new utility functions to return all languages by script group.
* Used that function to sort languages initially.
* Added tests.

Change-Id: I405cb73e6af13f59c307da5a7f2269049ecba698
2012-07-03 17:26:03 +03:00
Siebrand Mazeland
78ccbc57e6 Updates for language database (~75 codes added).
* Added codes used on translatewiki.net.
* Uncommented and updated a few codes.
* Put a few comments on a separate line, because when trailing, the conversion script b0rks.
* Updated the script groups with new scripts.
* Corrected the tests.

Change-Id: Ia53195834c2afc908d57d2f396bc317fadb2c7a9
2012-07-03 17:02:25 +03:00
Amir E. Aharoni
607abaa201 Sorting languages by script.
* Clarified naming: separated regions from region groups.
* New utility functions for sorting and grouping languages.
* JSHint fixes.
* Added tests.

Change-Id: I8153a2b89fbc7b9a7d6b7deeb87208efc9f4d021
2012-07-03 13:59:00 +03:00
Santhosh Thottingal
7a9b801a79 Introduce Language Category Display (LCD)
Introduce $.fn.lcd - displaying languages by categories.

Added the jquery.viewport.js module by Mika Tuupola (MIT license).

More tests for language utils.

Change-Id: I804b6da8ab0a2d518e17ae8bbd35e1c1da4bab3f
2012-07-02 10:20:16 +05:30
Amir E. Aharoni
43d7604203 Adding utility functions for the ULS langdb
* More functions for making useful queries to the langdb.
* Tests.

Change-Id: I29a3a25ef1b15d5925df2aa3d06f9221f8e5231e
2012-06-29 08:11:16 +03:00
Amir E. Aharoni
03df48a609 Created script groups, introduce $.uls.data
Gave script groups clear names and sorted them.
Documentation in comments.
Add tests to check that no script has been left behind.
Corrected Lath to Latn (thanks to testing).

Rename langdb.js to ext.uls.data.js

Add ResourceLoader module ext.uls.data

Change-Id: I91fafa94ffd1eaf2d12c954fe3a71064276533f9
2012-06-27 15:08:07 +05:30
Amir E. Aharoni
93ca0e5a48 Actually enabled running the JS tests
Change-Id: I5e66be0b5307024e6d21eaedf918ffcbd03d5ed3
2012-06-27 08:13:18 +03:00
Santhosh Thottingal
8527e33475 Skeleton extension for Universal Language Selector
* Basic extension code with i18n
* Adds a link to personal links to trigger ULS
* Core uls javascript code, to plug to the given trigger.
* Qunit, PHPUnit framework in place.
* and lot of TODOs and FIXMEs

Patch set 2:
* A tiny whitespace fix.

Change-Id: I300647a21e0b7f65b7d9dc6101014ea9389c9f2a
2012-06-15 10:49:18 +03:00