maelsoucaze/phpbb-translation-validator

This package is abandoned and no longer maintained. No replacement package was suggested.

This console application allows you to validate phpBB language packages.

v2.0.7 2018-10-30 19:28 UTC

README

Build Status StyleCI

This console application allows you to validate phpBB language packages.

Informations

This validator is compatible with phpBB 3.2.x and is released under the GNU General Public License 2.0. Please see the license terms.

Installation

  1. Download the British English language package.
  2. Run git clone https://github.com/milescellar/phpbb-translation-validator.git to clone this repository.
  3. Run php src/Phpbb/TranslationValidator/PhpbbTranslationValidator.php to download the dependencies.

For the easiest results, create a directory called 3.2 in the root of the validator. Upload the en language page into this directory, along with the languages you wish to test.

The simplest way to validate is to run the command php translation.php validate fr. Please note that the final argument is the language you wish to test and that has already been uploaded to the 3.2 directory, for example fr for French.

There are more arguments that can be supplied. For example, suppose you wanted to have your 3.2 directory in a different location, you wanted to explicitly specify phpBB version 3.2, you wanted to run in safe mode and you wanted to see all notices displayed. In that case, you would run the following command:

php translation.php validate fr 
  --package-dir=/path/to/your/3.2 
  --phpbb-version=3.2 
  --safe-mode 
  --display-notices

The --safe-mode flag indicates that you want to parse files instead of directly including them. This is useful if you want to run validations on a web server.

Tests

Firstly, add the validator as a dependency to your composer.json file:

    {
        "require-dev": {
            "milescellar/phpbb-translation-validator": "2.1.*"
        }
    }

Then add the php translation.php command in the script section to your .travis.yml file.

We use Travis CI as a continous integration server and PHPUnit for our unit testing.

Finally, you can run the command php vendor/phpunit/phpunit/phpunit tests/ if you want to run the unit tests locally.