Skip to content

Assert changed translations too, not just added or deleted - #32

Open
mikadamczyk wants to merge 2 commits into
5.0from
feature/5.0-assert-changed-translations
Open

Assert changed translations too, not just added or deleted#32
mikadamczyk wants to merge 2 commits into
5.0from
feature/5.0-assert-changed-translations

Conversation

@mikadamczyk

@mikadamczyk mikadamczyk commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue N/A

Related PRs:

Description:

AbstractTranslationCase only failed when a message id was added or deleted. That left a gap: if someone edited the English text of an existing key in code, the id stayed the same, the changeset came back empty, and the test passed while the translation file on disk was already stale. Every package inheriting this case had that blind spot.

It now also fails on changed messages, using the getChangedMessages() API added in the related PR, and lists the offending ids with a hint to re-run translation:extract. The assertion moved into a static method so it can be unit-tested directly, without booting a kernel — the new test covers all four cases: empty changeset, added, deleted and changed.

Kept as a draft because getChangedMessages() is not merged or released yet, so CI here stays red until the related PR lands.

For QA:

Nothing to test manually.

Documentation:

Depends on jms-translation-bundle's new ChangeSet::getChangedMessages().
Assertion logic extracted into a static method so it's unit-testable
without booting a kernel.
@mikadamczyk mikadamczyk self-assigned this Aug 5, 2026
@mikadamczyk mikadamczyk changed the title Assert changed translations too, not just added/deleted Assert changed translations too, not just added or deleted Aug 5, 2026
@mikadamczyk
mikadamczyk requested a review from a team August 5, 2026 14:29
@mikadamczyk
mikadamczyk marked this pull request as ready for review August 5, 2026 14:29
Comment thread tests/lib/Translation/AbstractTranslationCaseTest.php
@konradoboza
konradoboza requested a review from a team August 5, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants