phpbb / phpbb-translation-validator

A tool checking packages for compliance with the policies https://area51.phpbb.com/docs/dev/3.2.x/language/guidelines.html
GNU General Public License v2.0
8 stars 9 forks source link

Text bug with error level information #11

Closed carlo94it closed 10 years ago

carlo94it commented 10 years ago

When running Validator with debug, it print:

NUsing plural rule #1 for validation.

The letter "N" which specifies the error level is on the same line of the phrase that identifies the plural rule.

carlo94it commented 10 years ago

@nickvergessen why there is $this->printErrorLevel($this->output); on the line 136 of file ValidateRunner.php?

It print always the letter N, but why? It don't validate anything.

nickvergessen commented 10 years ago

N means that there was a notice error. Add --debug to see thr notice messages in the report

nickvergessen commented 10 years ago

Basically the message about plurals should be printed before the output starts

carlo94it commented 10 years ago

Yes, but N is printed before starting validating.

nickvergessen commented 10 years ago

Please post the complete output you get

carlo94it commented 10 years ago

With debug enabled:

Running Language Pack Validator on language it.

Setup ValidatorRunner
Validating FileList...
NUsing plural rule #1 for validation.

Validating File: language/it/acp/attachments.php
F
Validating File: language/it/acp/ban.php
N
Validating File: language/it/acp/board.php
F
Validating File: language/it/acp/bots.php
.
[ remove ]

Without debug:

Running Language Pack Validator on language it.

NFNF.F..FF..F.N....WFE...F...................................... 64 / 96 ( 66%)
...............FF.F..F..FF..F....

Test results for language pack:
[ removed ]

In this case, if you manually count the tests, they are 97 and not 96, because the first N is printed by default.

carlo94it commented 10 years ago

After investigating, I can say that the first value is the result of FileListValidator.

We need to move the FileListValidator result after plural information (with debug enabled), and increase by 1 the number of tests. Do you agree?

carlo94it commented 10 years ago

You should remove the line 168, or replace the point with an empty line, because it seems to be a test.