- π«π·France xavier.masson Haute-Normandie
xavier.masson β made their first commit to this issueβs fork.
- Merge request !148getParentEntity() does not respect translation fallbacks β (Open) created by xavier.masson
This is a follow-up to
#2790613: getParentEntity() does not return translated parent entity β
. Now that the getParentEntity()
method intends to return the translation of the parent entity that matches the translation of the paragraph, it could also respect language fallbacks. (Projects like
language hierarchy β
allow fallbacks to be specified, so a direct translation does not necessarily have to exist, but another translation gets used instead.)
Basically, rather than just using the hasTranslation()
method, the fallback candidates should be obtained and looped through to get the 'most appropriate' translation. This is what core's EntityRepository class does, so the forthcoming patch will be based on its getTranslationFromContext
method.
Needs review
1.0
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
xavier.masson β made their first commit to this issueβs fork.