Commit Graph

274 Commits

Author SHA1 Message Date
Santhosh
97758430ff Merge "Partly reverting the langdb" 2012-08-15 04:56:15 +00:00
Santhosh Thottingal
e62b50c9d8 WebFonts integration with ULS display settings.
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
2012-08-14 18:01:25 +03:00
Amir E. Aharoni
3d2e85664f Partly reverting the langdb
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
2012-08-14 16:46:11 +03:00
Niklas Laxström
3f4b5e4540 Mediawiki WebFonts repository for jquery.webfonts
Added license and upstream information and a
script to compile repoconfig automatically
from metadata.

also contains integration code

Change-Id: Ib39668249dd568a1f6017f0c08a3b9d1e2067ae4
2012-08-14 19:01:46 +05:30
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30
Amir E. Aharoni
7382813788 Add a test for checking that all languages have autonyms
DRAFT
Some languages don't yet have autonyms, but probably all languages should
have them. It currently fails, because there are many such languages and
I am not aware of a nice way to skip it in QUnit (there is a proper skipping
mechanism in Perl testing, for example).

Also change orphanScripts() to return all scripts without groups.

Change-Id: I21c13d7bba89f3b991bc340e6ff6e040c704beb8
2012-08-09 16:04:02 +03:00
Amir E. Aharoni
3a6e45e364 Add a test for autonym sorting
Change-Id: Ib323ad3ac88bf69487eefb340cfc0fb687a35f70
2012-08-08 16:17:44 +03:00
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