Skip to content

BUGFIX: Support multiple dimensions and content repositories - #96

Open
Sebobo wants to merge 3 commits into
sitegeist:retranslationUpmergefrom
Sebobo:bugfix/support-multiple-dimensions
Open

BUGFIX: Support multiple dimensions and content repositories#96
Sebobo wants to merge 3 commits into
sitegeist:retranslationUpmergefrom
Sebobo:bugfix/support-multiple-dimensions

Conversation

@Sebobo

@Sebobo Sebobo commented Jun 30, 2026

Copy link
Copy Markdown

With this change the CLI command can accept full DSP coordinates or merge a language value with the default configuration of the given CR.

In addition the UI plugin passes the content repository to the endpoints, so that it works for non-default CR cases.

* @return array<string,string>
*/
protected function getDefaultDimensionConfiguration(ContentRepository $cr): array
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super flaky and will most certainly result in hard to debug exceptions.
Neither are there single default values (multiple root values may appear as valid peers and using the first one is a dangerous simplification of this) nor is it guaranteed that the resolved coordinates are part of the allowed dimension subspace (they might not be allowed in combination)

$targetDimensionSpacePoint = DimensionSpacePoint::fromArray([
...$defaultDimensionConfiguration,
$this->languageDimensionName => $target
]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly suggest another approach here:
If only the language and no other dimension value is given, I'd interpret this as "translate all variants restricted to that language".
So instead of resolving a single target, we filter the allowed dimension subspace to the DSPs with the target language and iterate over those.

...$defaultDimensionConfiguration,
$this->languageDimensionName => $target
]);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as below: I'd rather iterate over the allowed dimension subspace and resolve valid matching pairs for source and target each

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.

2 participants