mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-11 12:28:23 +02:00
feat: show a hint for the candidates textarea and gate translations in CI
Add a help hint on the add-candidates form explaining one candidate per line, and translate it plus a few strings from the earlier reset-progress feature that had been missed. Also add a CI step that re-runs translation:extract and fails the build if it produces uncommitted changes, so untranslated/stale strings can't slip through review again.
This commit is contained in:
@@ -95,6 +95,15 @@ jobs:
|
|||||||
id: rector
|
id: rector
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: docker compose exec -T php vendor/bin/rector process --dry-run --no-progress-bar --output-format=github
|
run: docker compose exec -T php vendor/bin/rector process --dry-run --no-progress-bar --output-format=github
|
||||||
|
- name: Translations
|
||||||
|
id: translations
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
docker compose exec -T php bin/console translation:extract --force --format=xliff --sort=asc nl
|
||||||
|
if ! git diff --exit-code -- translations; then
|
||||||
|
echo "::error::Translations are out of date. Run 'just translations' and commit the changes."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Check HTTP reachability
|
- name: Check HTTP reachability
|
||||||
run: curl -v --fail-with-body http://localhost
|
run: curl -v --fail-with-body http://localhost
|
||||||
- name: Assert all checks passed
|
- name: Assert all checks passed
|
||||||
@@ -113,6 +122,7 @@ jobs:
|
|||||||
check "Twig Coding Style" "${{ steps.twig_cs.outcome }}"
|
check "Twig Coding Style" "${{ steps.twig_cs.outcome }}"
|
||||||
check "PHPStan" "${{ steps.phpstan.outcome }}"
|
check "PHPStan" "${{ steps.phpstan.outcome }}"
|
||||||
check "Rector" "${{ steps.rector.outcome }}"
|
check "Rector" "${{ steps.rector.outcome }}"
|
||||||
|
check "Translations" "${{ steps.translations.outcome }}"
|
||||||
exit $failed
|
exit $failed
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ GitHub Actions workflow (`.github/workflows/ci.yml`):
|
|||||||
- Twig-CS-Fixer style check
|
- Twig-CS-Fixer style check
|
||||||
- PHPStan static analysis
|
- PHPStan static analysis
|
||||||
- Rector dry-run
|
- Rector dry-run
|
||||||
|
- Translation extraction check (fails if `translation:extract` produces uncommitted changes)
|
||||||
3. **Integration Tests**:
|
3. **Integration Tests**:
|
||||||
- Docker image build and start services
|
- Docker image build and start services
|
||||||
- Database creation and migration
|
- Database creation and migration
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ class AddCandidatesFormType extends AbstractType
|
|||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('candidates', TextareaType::class, [
|
->add('candidates', TextareaType::class, [
|
||||||
'label' => $this->translator->trans('Candidates'), 'translation_domain' => false,
|
'label' => $this->translator->trans('Candidates'),
|
||||||
|
'help' => $this->translator->trans('One candidate per line'),
|
||||||
|
'translation_domain' => false,
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,6 +117,10 @@
|
|||||||
<source>Are you sure you want to delete this quiz?</source>
|
<source>Are you sure you want to delete this quiz?</source>
|
||||||
<target>Weet je zeker dat je deze test wilt verwijderen?</target>
|
<target>Weet je zeker dat je deze test wilt verwijderen?</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="6XTrab." resname="Are you sure you want to reset progress for this candidate? Their given answers for this quiz will be deleted.">
|
||||||
|
<source>Are you sure you want to reset progress for this candidate? Their given answers for this quiz will be deleted.</source>
|
||||||
|
<target>Weet je zeker dat je de voortgang van deze kandidaat wilt resetten? De ingevulde antwoorden voor deze test worden verwijderd.</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="4bcq6sL" resname="Assign">
|
<trans-unit id="4bcq6sL" resname="Assign">
|
||||||
<source>Assign</source>
|
<source>Assign</source>
|
||||||
<target>Toewijzen</target>
|
<target>Toewijzen</target>
|
||||||
@@ -161,6 +165,10 @@
|
|||||||
<source>Candidate not found</source>
|
<source>Candidate not found</source>
|
||||||
<target>Kandidaat niet gevonden</target>
|
<target>Kandidaat niet gevonden</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="fl.hjdA" resname="Candidate progress reset">
|
||||||
|
<source>Candidate progress reset</source>
|
||||||
|
<target>Voortgang kandidaat gereset</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="QH4e_Ho" resname="Candidate renamed">
|
<trans-unit id="QH4e_Ho" resname="Candidate renamed">
|
||||||
<source>Candidate renamed</source>
|
<source>Candidate renamed</source>
|
||||||
<target>Kandidaat hernoemd</target>
|
<target>Kandidaat hernoemd</target>
|
||||||
@@ -541,6 +549,10 @@
|
|||||||
<source>Number of dropouts:</source>
|
<source>Number of dropouts:</source>
|
||||||
<target>Aantal afvallers:</target>
|
<target>Aantal afvallers:</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="vxaREnf" resname="One candidate per line">
|
||||||
|
<source>One candidate per line</source>
|
||||||
|
<target>Eén kandidaat per regel</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="_SqArFZ" resname="Open">
|
<trans-unit id="_SqArFZ" resname="Open">
|
||||||
<source>Open</source>
|
<source>Open</source>
|
||||||
<target>Openen</target>
|
<target>Openen</target>
|
||||||
@@ -761,6 +773,10 @@
|
|||||||
<source>Reset password</source>
|
<source>Reset password</source>
|
||||||
<target>Wachtwoord herstellen</target>
|
<target>Wachtwoord herstellen</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="SSMxy68" resname="Reset progress">
|
||||||
|
<source>Reset progress</source>
|
||||||
|
<target>Voortgang resetten</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="eyayNGN" resname="Reset your password">
|
<trans-unit id="eyayNGN" resname="Reset your password">
|
||||||
<source>Reset your password</source>
|
<source>Reset your password</source>
|
||||||
<target>Wachtwoord herstellen</target>
|
<target>Wachtwoord herstellen</target>
|
||||||
|
|||||||
Reference in New Issue
Block a user