tractorcow-farm / silverstripe-fluent

Multi-language translate module for Silverstripe, without having to manage separate site trees.
BSD 3-Clause "New" or "Revised" License
91 stars 109 forks source link

FIX: Source locale indicator correction. #840

Open mfendeksilverstripe opened 5 months ago

mfendeksilverstripe commented 5 months ago

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.

319797975-24c993d8-8ac2-4704-8a61-694797fa6d64

This change should have no impact on actual content rendering.

Change-set breakdown

Manual testing steps

class CampaignPage extends Page
{
    private static string $frontend_publish_required = FluentExtension::INHERITANCE_MODE_EXACT;
}

Most common scenarios:

The source locale indicator should be in line with what is shown on the frontend.

Issues

Pull request checklist

mfendeksilverstripe commented 5 months ago

This is ready for a review @GuySartorelli

GuySartorelli commented 5 months ago

Please also avoid @ing me on each PR unless it is something you crucially need to be checked in the immediate future.

mfendeksilverstripe commented 5 months ago

New changes added: updated API so they match minor constraints, so this can be based on 7 branch.

GuySartorelli commented 5 months ago

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.

mfendeksilverstripe commented 4 months ago

I've added test setup details into the description of this PR as requested @GuySartorelli