diff --git a/.gitattributes b/.gitattributes index 1844770ea..e407a9f65 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,9 +6,10 @@ /.phive/ export-ignore /.php-cs-fixer.php export-ignore /.php_cs.dist export-ignore +/Build/ export-ignore +/CODE_OF_CONDUCT.md export-ignore /Configuration/FunctionalTests.xml export-ignore /Configuration/UnitTests.xml export-ignore -/CODE_OF_CONDUCT.md export-ignore /Resources/Private/Patches/ export-ignore /Tests/ export-ignore /crowdin.yml export-ignore diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 872d0a093..a3d4d7236 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,6 +19,7 @@ updates: - dependency-name: "phpunit/phpunit" versions: [ ">= 10" ] - dependency-name: "sjbr/static-info-tables" + - dependency-name: "symfony/*" - dependency-name: "typo3/cms-*" - dependency-name: "typo3/coding-standards" versions: [ ">= 0.7.0" ] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ecea2266..81b581984 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,7 @@ jobs: - "php:cs-fixer" - "php:sniff" - "php:stan" + - "xliff:lint" php-version: - "8.3" rector: diff --git a/Build/bin/console b/Build/bin/console new file mode 100644 index 000000000..08b74be0c --- /dev/null +++ b/Build/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env php +add(new XliffLintCommand(null, null, null, false)); +$application->add(new LintCommand()); + +exit($application->run()); diff --git a/CHANGELOG.md b/CHANGELOG.md index 557bb814a..97afc0bbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Added +- Add XLIFF linting to the CI workflow (#1907) + ### Changed - Require Fluid >= 2.7.4 (#1906) diff --git a/composer.json b/composer.json index b1d8357a9..19b04a992 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,7 @@ "squizlabs/php_codesniffer": "3.10.2", "ssch/typo3-rector": "2.6.5", "ssch/typo3-rector-testing-framework": "2.0.1", + "symfony/translation": "^5.4.42 || ^6.3.12 || ^7.1.3", "typo3/coding-standards": "0.6.1", "typo3/testing-framework": "7.1.0", "webmozart/assert": "^1.11.0" @@ -125,7 +126,8 @@ "@ci:php:lint", "@ci:php:sniff", "@ci:php:cs-fixer", - "@ci:php:stan" + "@ci:php:stan", + "@ci:xliff:lint" ], "ci:tests": [ "@ci:tests:unit", @@ -133,6 +135,7 @@ ], "ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c Configuration/FunctionalTests.xml {}';", "ci:tests:unit": ".Build/vendor/bin/phpunit -c Configuration/UnitTests.xml Tests/Unit", + "ci:xliff:lint": "php Build/bin/console lint:xliff Resources/Private/Language", "coverage:create-directories": "mkdir -p build/logs .Build/coverage", "fix": [ "@fix:composer", @@ -151,6 +154,7 @@ "rm -rf .Build", "rm -rf .github", "rm -rf .phive", + "rm -rf Build", "rm -rf Tests", "rm -rf tools", "rm .editorconfig", @@ -177,6 +181,7 @@ "ci:php:rector": "Checks for code for changes by Rector.", "ci:php:stan": "Checks the types with PHPStan.", "ci:static": "Runs all static code analysis checks for the code.", + "ci:xliff:lint": "Lints the XLIFF files.", "coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.", "fix": "Runs all automatic code style fixes.", "fix:composer": "Normalizes all composer.json files.",