Open mfendeksilverstripe opened 5 months ago
This is ready for a review @GuySartorelli
Please also avoid @
ing me on each PR unless it is something you crucially need to be checked in the immediate future.
New changes added: updated API so they match minor
constraints, so this can be based on 7
branch.
Can you please update the PR description to give actual step-by-step instructions for how to reproduce this from a fresh installation? Include any code samples for setting configuration, and exact steps required - assume I don't know anything about fluent :p
As it stands I'm not really sure what the behaviour was before this PR, what it should be afterward, and how to confirm either of those.
I've added test setup details into the description of this PR as requested @GuySartorelli
FIX: Source locale indicator correction.
Description
Source locale detection corrected to take into account locale inheritance settings for a specific model. Impacted methods are only used in the CMS UI to give indication to content authors on what to expect (what is the source locale of the content). Before this change the indicator could be inaccurate in a sense that it would indicate content and there would actually not be any content to display.
This change should have no impact on actual content rendering.
Change-set breakdown
RecordLocale::getSourceLocale()
now takes into account locale inheritance modeFluentExtension::getSourceLocale()
is now only a shorthand method to the above method instead of maintaining its own implementation that doesn't cover all the casesManual testing steps
Most common scenarios:
The source locale indicator should be in line with what is shown on the frontend.
Issues
Pull request checklist