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:
2026-07-10 23:50:44 +02:00
parent 5cfeeb57f0
commit ce415217bf
4 changed files with 30 additions and 1 deletions
+10
View File
@@ -95,6 +95,15 @@ jobs:
id: rector
continue-on-error: true
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
run: curl -v --fail-with-body http://localhost
- name: Assert all checks passed
@@ -113,6 +122,7 @@ jobs:
check "Twig Coding Style" "${{ steps.twig_cs.outcome }}"
check "PHPStan" "${{ steps.phpstan.outcome }}"
check "Rector" "${{ steps.rector.outcome }}"
check "Translations" "${{ steps.translations.outcome }}"
exit $failed
tests:
+1
View File
@@ -306,6 +306,7 @@ GitHub Actions workflow (`.github/workflows/ci.yml`):
- Twig-CS-Fixer style check
- PHPStan static analysis
- Rector dry-run
- Translation extraction check (fails if `translation:extract` produces uncommitted changes)
3. **Integration Tests**:
- Docker image build and start services
- Database creation and migration
+3 -1
View File
@@ -19,7 +19,9 @@ class AddCandidatesFormType extends AbstractType
{
$builder
->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,
])
;
}
+16
View File
@@ -117,6 +117,10 @@
<source>Are you sure you want to delete this quiz?</source>
<target>Weet je zeker dat je deze test wilt verwijderen?</target>
</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">
<source>Assign</source>
<target>Toewijzen</target>
@@ -161,6 +165,10 @@
<source>Candidate not found</source>
<target>Kandidaat niet gevonden</target>
</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">
<source>Candidate renamed</source>
<target>Kandidaat hernoemd</target>
@@ -541,6 +549,10 @@
<source>Number of dropouts:</source>
<target>Aantal afvallers:</target>
</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">
<source>Open</source>
<target>Openen</target>
@@ -761,6 +773,10 @@
<source>Reset password</source>
<target>Wachtwoord herstellen</target>
</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">
<source>Reset your password</source>
<target>Wachtwoord herstellen</target>