Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Build/Scripts/checkIntegrityXliff.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public function execute(array $argv = []): int
} else {
// Non-verbose: just show a summary line
if ($errors !== []) {
$output->writeln('<error>' . count($errors) . ' error(s) found in ' . count($testResults) . ' files.</error>');
$output->writeln(
'<error>' . count($errors) . ' error(s) found in ' . count($testResults) . ' files.</error>',
);
}
}

Expand Down Expand Up @@ -138,8 +140,8 @@ private function checkValidLabels(string $labelFile): array
$version = $attributes['@attributes']['version'] ?? '';
$supportedVersions = ['1.2', '2.0'];
if (!in_array($version, $supportedVersions, true)) {
$result['error'] = 'Incompatible version: ' . $version . ' (expected: ' . implode(', ',
$supportedVersions) . ')';
$result['error'] = 'Incompatible version: ' . $version
. ' (expected: ' . implode(', ', $supportedVersions) . ')';
$result['errorcode'] = 'XLF version';
return $result;
}
Expand Down Expand Up @@ -199,8 +201,8 @@ private function checkValidLabels(string $labelFile): array
$expectedOriginals[] = 'EXT:core/Resources/Private/Language/countries.xlf';
}
if (!in_array($original, $expectedOriginals, true)) {
$result['error'] = 'Invalid original: ' . $original . ' (expected: ' . implode(', ',
$expectedOriginals) . ')';
$result['error'] = 'Invalid original: ' . $original
. ' (expected: ' . implode(', ', $expectedOriginals) . ')';
$result['errorcode'] = 'file.original';
return $result;
}
Expand Down Expand Up @@ -281,7 +283,6 @@ private function checkValidLabels(string $labelFile): array

$seenUnitIds[$unitId] = true;
}

// XLIFF 2.0 has no deprecation syntax check yet.
}

Expand Down