-
Notifications
You must be signed in to change notification settings - Fork 17
Installation notes
You will need PHP:
sudo apt-get install libapache2-mod-php # assuming you're using Apache HTTPD
With these modules installed and enabled:
php-curl
php-intl
php-mbstring
php-xml
The checker is run by invoking www/check.php
; the default page, www/index.php
.
In the live version of the checker, the www
is not part of the URL (eg, http://localhost/
).
There is some documentation of the basic code structure. I'm not sure how up to date it is. You can find it in the docs
directory.
What is up to date is the file doc/checker.en.php
. This lists all the checks made by the checker, and points to source information and tests for each check. It draws the text of the messages etc. directly from the langs/en.properties
file. Because you can't run PHP from github, this file is copied to https://www.w3.org/International/quicktips/doc/checker when a checker update is released.
The package comes with a set of regression tests. Run the file www/test.php
.
The test prompts are in the tests_xxx.properties
files in the tests
directory.
The tests i18n.conf
file in the conf
directory points to the location of the tests themselves after test_url=
. Because github can't run PHP files, the expectation is that the tests will be run on a PHP-aware client during development. That location should point to your local installation with a path ending in tests/generate
.
In the tests
directory you will find the files generate.php, data.php and non-nfc.php, which are used for running the tests. The file data.php contains the actual logic for the tests.
A copy of the files can be found under https://www.w3.org/International/tests/i18n-checker/ when a checker update is released. To run the tests from this directory you will need to change the test_url setting to point to them.
The class.Parser.php file contains two lists of valid language subtags in the variables $languages
and $otherSubtags
. These need to be updated periodically, as IANA updates its registry. To do so, run tools/createsubtagvars.php in a browser, and replace the current source code with the output produced by the tool.
- copy the test files to /International/tests/i18n-checker/
- copy the checker.en.php file and the en.properties file to /International/quicktips/doc/
- update the version in the footer_version variable in en.properties (and any translations eventually)