Skip to content

Asserted changed translations in addition to added and deleted ones - #32

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

Asserted changed translations in addition to added and deleted ones#32
mikadamczyk wants to merge 9 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
@mikadamczyk mikadamczyk changed the title Assert changed translations too, not just added or deleted Asserted changed translations in addition to added and deleted ones Aug 18, 2026
Source in src/contracts/ imports JMS\TranslationBundle classes directly,
so it should be a require rather than an implicit transitive dependency.
This also makes the dependencies.json CI override apply to it.
… branch

ibexa/jms-translation-bundle#5 merged into 2.x and its feature branch was
deleted (delete_branch_on_merge), so the VCS override here 404'd. The fix
now lives on 2.x itself (not yet tagged past 2.6.0), so track that branch
instead.
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