5 Commits

Author SHA1 Message Date
Amir E. Aharoni
655657fbc5 Updates for the unique autonyms test (#383)
* Move the unique autonyms test to the "autonyms" section

It was in the "redirects" section, and it makes
much more sense for it to be in the "autonyms" section.

* Case-insensitive test for unique autonyms

Autonyms for some languages are very similar or even identical,
but they should be unique in this system so that users
would be able to find the correct language unambiguously.

It's conceivable that someone (including myself) would add
an autonym that will be different only in its usage of
capital letters. This change modifies the test for
unique autonyms so that such cases would be prevented.

---------

Co-authored-by: SrishAkaTux <ssethi@wikimedia.org>
2024-09-17 17:23:07 -07:00
Amir E. Aharoni
349589fc1f Consistently use parentheses in Chinese-script autonyms (#148)
Addresses #141.

Co-authored-by: Kartik Mistry <kartikm@users.noreply.github.com>
2021-03-08 17:55:27 +05:30
Amir Aharoni
4a61360950 Return an empty array if there are no languages in territory
Only JavaScript is modified here. The corresponding PHP function
is unchanged to preserve consistency with other PHP functions.

Corresponding pull request in jquery.uls:
https://github.com/wikimedia/jquery.uls/pull/370

Downstream bug:
https://phabricator.wikimedia.org/T265158
2020-12-23 15:01:28 +02:00
Amir E. Aharoni
4901f51ee5 Add a simple test for validity of language codes (#132)
The reason I'm adding it is that recently I almost submitted
a patch in which I wrote a language code with the Cyrillic letter о
instead of the corresponding Latin letter. It's not a perfect test,
but it's good enough for a basic check.
2020-12-22 16:17:19 +02:00
Abijeet
09ab6024fe Add a PHP interface to work with the language data
Additional changes in this PR include,

  * Added composer.json
  * Refactored the folder structure.
  * Added editorconfig.
  * Added PHPCS and formatted existing code.
  * Changes to use a single license - GPL-2.0-or-later
  * ESLint related fixes

Bug: T218639
2020-01-31 23:00:46 +05:30