Skip to content

Commit 8b63f9e

Browse files
authored
Merge pull request #58 from phpbb/develop
v1.5.0 Release
2 parents dc7bf18 + e3e8bcf commit 8b63f9e

File tree

159 files changed

+789
-492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+789
-492
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/bin/
44
/3.0/
55
/3.1/
6+
/3.2/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ php:
55
- 7.1
66

77
install:
8-
- php composer.phar install --dev --no-interaction --prefer-source
8+
- composer install --dev --no-interaction --prefer-source
99

1010
script:
11-
- bin/phpunit
11+
- vendor/phpunit/phpunit/phpunit
1212

1313
matrix:
1414
allow_failures:

README.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,57 @@
1-
# phpBB Translation Validator Extension
1+
# phpBB Translation Validator
22

3-
Allows to validate **phpBB** language packages.
3+
This console application allows you to validate [phpBB](https://www.phpbb.com) language packages.
44

5-
## Requirement
5+
## Requirements
66

7-
This extension requires PHP 5.6 to 7.1 to be set up.
7+
This extension requires PHP 5.5.9 or above.
88

9-
## Installation for validating a language package locally
9+
### Installation
1010

11-
*Note:* the validator only works when you have the source language pack in your directory (default source language is `en`).
11+
Firstly, download the latest British English (`en`) [language pack from phpBB.com](http://www.phpbb.com/customise/db/translation/british_english/) as this is the default source language. Then clone this repository and download the dependencies:
1212

13-
1. [Download](https://github.com/nickvergessen/phpbb-translation-validator/archive/master.zip) the package.
14-
2. Run `php composer.phar install` to download the dependencies
15-
3. Run `php src/Phpbb/TranslationValidator/PhpbbTranslationValidator.php` to get information how to run the validator
13+
git clone https://github.com/phpbb/phpbb-translation-validator.git
14+
composer.phar install
1615

17-
## Installation for validating a language package on TravisCI
16+
For the easiest results, create a directory called `3.2` in the root of the Translation Validator. Upload the `en` language page into this directory, along with the languages you wish to test. Which leads e.g. to:
1817

19-
1. Add the TranslationValidator as a dependecy:
18+
phpbb-translation-validator/3.2/en/
19+
phpbb-translation-validator/3.2/fr/
20+
phpbb-translation-validator/translation.php
21+
22+
The simplest way to validate is to then run this command (the final argument is the language you wish to test and that has already been uploaded to the `3.2` directory; eg. `fr` for French):
23+
24+
php translation.php validate fr
25+
26+
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 - you would run this command:
27+
28+
php translation.php validate fr
29+
--package-dir=/path/to/your/3.2
30+
--phpbb-version=3.2
31+
--safe-mode
32+
--display-notices
33+
34+
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.
35+
36+
## Tests
37+
38+
[![Build Status](https://travis-ci.org/phpbb/phpbb-translation-validator.png?branch=master)](https://travis-ci.org/phpbb/phpbb-translation-validator)
39+
40+
Add the TranslationValidator as a dependency:
2041

2142
{
2243
"require-dev": {
23-
"phpbb/translation-validator": "1.4.*"
44+
"phpbb/translation-validator": "1.5.*"
2445
}
2546
}
2647

27-
2. Add the `php vendor/bin/PhpbbTranslationValidator.php` call you run locally to your `.travis.yml`
48+
Then add the `php translation.php` call you run locally to your `.travis.yml` file.
2849

29-
## Tests and Continuous Intergration
50+
We use Travis-CI as a continous intergtation server and phpunit for our unit testing. See more information on the [phpBB development wiki](https://wiki.phpbb.com/Unit_Tests).
3051

31-
[![Build Status](https://travis-ci.org/phpbb/phpbb-translation-validator.png?branch=master)](https://travis-ci.org/phpbb/phpbb-translation-validator)
52+
To run the unit tests locally, use this command:
3253

33-
We use Travis-CI as a continous intergtation server and phpunit for our unit testing. See more information on the [phpBB development wiki](https://wiki.phpbb.com/Unit_Tests).
54+
php vendor/phpunit/phpunit/phpunit tests/
3455

3556
## License
3657

composer.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,37 @@
22
"name": "phpbb/translation-validator",
33
"description": "A language package validator for phpBB language packs. Language packs are required to pass the validator when submitted to the language pack database.",
44
"homepage": "https://github.com/phpbb/phpbb-translation-validator",
5-
"version": "1.4.1",
6-
"license": "GPL-2.0",
5+
"version": "1.5.0",
6+
"license": "GPL-2.0-only",
77
"authors": [
88
{
99
"name": "Joas Schilling",
1010
"email": "[email protected]",
1111
"homepage": "http://www.phpbb.com/",
1212
"role": "Developer"
13+
},
14+
{
15+
"name": "Battye",
16+
"email": "[email protected]",
17+
"homepage": "https://www.phpbb.com",
18+
"role": "Developer"
1319
}
1420
],
1521
"minimum-stability": "stable",
1622
"require": {
17-
"php": ">=5.6",
18-
"symfony/yaml": "2.6.*",
19-
"symfony/console": "2.6.*",
20-
"symfony/finder": "2.6.*"
23+
"php": ">=5.5.9",
24+
"symfony/yaml": "~3.0",
25+
"symfony/console": "~3.0",
26+
"symfony/finder": "~3.0",
27+
"battye/php-array-parser": "~1.0"
2128
},
2229
"require-dev": {
2330
"phpunit/phpunit": "~5.7"
2431
},
25-
"bin": [
26-
"src/Phpbb/TranslationValidator/PhpbbTranslationValidator.php"
27-
],
28-
"config": {
29-
"bin-dir": "bin"
30-
},
3132
"autoload": {
3233
"classmap": [
33-
"src/"
34+
"src/",
35+
"tests/"
3436
]
3537
}
3638
}

0 commit comments

Comments
 (0)