Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test for translation extraction #151

Merged
merged 11 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
14 changes: 14 additions & 0 deletions .github/actions/composer-install/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Install Composer dependencies'
description: 'Set Composer root version from branch alias and install dependencies'
runs:
using: "composite"
steps:
- run: |
version=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json)
echo "version=$version" >> $GITHUB_ENV
shell: bash
- uses: ramsey/composer-install@v2
with:
dependency-versions: "highest"
env:
COMPOSER_ROOT_VERSION: ${{ env.version }}
20 changes: 5 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jobs:
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- uses: ./.github/actions/composer-install

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr
Expand Down Expand Up @@ -57,9 +55,7 @@ jobs:
extensions: pdo_sqlite, gd
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- uses: ./.github/actions/composer-install

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -109,9 +105,7 @@ jobs:
extensions: pdo_pgsql, gd
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- uses: ./.github/actions/composer-install

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -162,9 +156,7 @@ jobs:
extensions: pdo_mysql, gd
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- uses: ./.github/actions/composer-install

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -201,9 +193,7 @@ jobs:
php-version: 7.4
coverage: none

- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- uses: ./.github/actions/composer-install

- name: Run integration test suite
run: composer integration-solr
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.7.5",
"ibexa/admin-ui": "dev-update-richtext-dependency as 4.6.x-dev",
"ibexa/ci-scripts": "^0.2@dev",
"ibexa/doctrine-schema": "~4.6.0@dev",
"ibexa/search": "^4.6.x-dev",
"ibexa/solr": "~4.6.0@dev",
"ibexa/test-core": "^4.6.x-dev",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-symfony": "^1.2",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5",
"symfony/finder": "^5.0",
"symfony/notifier": "^5.4",
"symfony/proxy-manager-bridge": "^5.3",
"matthiasnoback/symfony-config-test": "^4.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
Expand Down
3 changes: 3 additions & 0 deletions phpunit-integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<testsuite name="integration_persistence">
<directory>tests/integration/Persistence</directory>
</testsuite>
<testsuite name="integration_translation_extraction">
<file>tests/integration/TranslationTest.php</file>
</testsuite>
</testsuites>
<php>
<env name="DATABASE_URL" value="sqlite://i@i/test.db" />
Expand Down
256 changes: 0 additions & 256 deletions src/bundle/Resources/translations/alloy_editor.en.xliff

This file was deleted.

4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/ck_editor.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<body>
<trans-unit id="a31bc2d766bef988d3d4e2e0892c79b64d2aadd9" resname="anchor_btn.error.unique">
<source>Anchor name must be unique.</source>
<target>Anchor name must be unique.</target>
<target state="new">Anchor name must be unique.</target>
<note>key: anchor_btn.error.unique</note>
</trans-unit>
<trans-unit id="88d893050d5eea476d9559abba8b7cdda519154a" resname="anchor_btn.error.valid">
<source>A valid anchor link is needed.</source>
<target>A valid anchor link is needed.</target>
<target state="new">A valid anchor link is needed.</target>
<note>key: anchor_btn.error.valid</note>
</trans-unit>
<trans-unit id="2fec67b71cd77563c4e494477e691ba9661d95fe" resname="anchor_btn.label">
Expand Down
Loading
Loading