Commit Graph

13 Commits

Author SHA1 Message Date
Abijeet
daa44ed137 Update composer dependencies
Update the following dependencies:

* php-unit
* mediawiki-codesniffer

Use specific dependencies.

Fix issues highlighted by new rules in mediawiki-codesniffer
2022-01-18 13:12:47 +02:00
Amir Aharoni
a73375d0df Add a newline to the end of language-data.json
This helps Git and Vim be less confused about diffs.
It somehow sometimes happens that a newline is added to
the end of language-data.json, but sometimes it is not added,
and then Git diff shows it as removed or added. This change
ensures that it's always added.
2021-03-08 17:30:07 +05:30
Niklas Laxström
07efae50c5 Update PHP development dependencies (#139) 2021-01-28 14:35:10 +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
Abijeet Patro
61d3d26e4c Bump eslint-config-wikimedia to 0.17.0 (#120)
Had to update eslint to ^7.9.0 since we are using new rules:
* no-loss-of-precision
* no-unreachable-loop

Bug: T266462
2020-10-27 17:09:39 +05:30
Abijeet Patro
6348e1589b Add phpunit configuration file
Use the configuration file to pass the location of the tests and
autoload class files.

Pass -sp to phpcs command
2020-05-18 15:45:15 +03:00
Abijeet
f216187aba Rename class from LanguageData to LanguageUtil to have better namespacing
Update the documentation also
2020-05-18 15:45:15 +03:00
Abijeet
f342099b3c Rename class from LanguageData to LanguageUtil to have better namespacing
Update the documentation also
2020-05-15 10:26:11 +03:00
Abijeet
e9a6c467f3 Move spyc to composer.json 2020-05-12 16:03:31 +03:00
Abijeet
8b0ca32167 Move documentation to Read the Docs
Read the docs is used to host the documentation.
https://language-data.readthedocs.io/en/latest/

The following documentation has been moved,

* Introduction
* Using the PHP / Node.js libraries
* Adding new languages
* PHP API documentation

Updated the README.md to point to the new documentation.

Doxygen is used to pull out the PHPDoc comments into XML.
This is parsed via doxyphp2sphinx into Sphinx which is
then used by Read the docs to generate the documentation.

Read the docs has been configured to update the code documentation
under the docs/api folder automatically whenever a commit is made
so no manual work is needed.

Bug: T218639
2020-05-12 16:00:25 +03:00
Abijeet Patro
1849fa134f Fix incorrect data directory usage in ulsdata2json.php (#89)
This was happening because the location of the data directory has
been updated, but this script - `ulsdata2json.php` was not properly
updated.

Bug: T249210
Fixes: #88
2020-04-03 15:06:17 +05:30
Abijeet
a182ddb215 Add users with more than 5 commits to credits / authors
Also update authors to be alphabetically ordered.
2020-02-24 16:35:43 +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