Skip to content

Commit de46382

Browse files
committed
Add check for valid language iso in composer.json
1 parent 1451e78 commit de46382

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Phpbb/TranslationValidator/Validator/FileValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@ public function validateJsonFile($originFile)
630630
{
631631
$this->output->addMessage(Output::FATAL, 'The language-iso should only contain small letters from a to z and maximum two underscores.', $originFile);
632632
}
633+
elseif ($jsonContent['extra']['language-iso'] != $this->originIso)
634+
{
635+
$this->output->addMessage(Output::FATAL, 'Language iso is not valid', $originFile);
636+
}
633637
// Check for english name
634638
if ($jsonContent['extra']['english-name'] == '' || preg_match('/^[a-zA-Z\s]+$/', $jsonContent['extra']['english-name']))
635639
{

0 commit comments

Comments
 (0)