Skip to content

Commit

Permalink
consider deleted string contents when updating outdated translations
Browse files Browse the repository at this point in the history
  • Loading branch information
hedayati-m committed Jan 22, 2024
1 parent 3b5e8d4 commit 49d1c35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Classes/Ui/Changes/UpdateOutdatedTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public function apply()
foreach ($translatableProperties as $translatableProperty) {
$name = $translatableProperty->getName();
$value = $referenceNode->getProperty($name);
if (!empty($value) && is_string($value) && strip_tags($value) !== '') {
if (
is_string($value)
&& (!empty($value) || !empty($node->getProperty($name) ?: ''))
) {
$propertiesToTranslate[$name] = $value;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ prototype(Sitegeist.LostInTranslation:Collection.TranslationInformation) < proto
Missing Contents: <Neos.Fusion:Loop items={props.status.missing} @glue=", ">{item.node.label}</Neos.Fusion:Loop>
</p>
<p @if={props.status.outdated}>
Outdated Contents: <Neos.Fusion:Loop items={props.status.outdated}>{item.node.label}</Neos.Fusion:Loop>
Outdated Contents: <Neos.Fusion:Loop items={props.status.outdated} @glue=", ">{item.node.label}</Neos.Fusion:Loop>
</p>
</Neos.Fusion:Fragment>
</lost-in-translation-info>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ prototype(Sitegeist.LostInTranslation:Document.TranslationInformation) < prototy
Missing Contents: <Neos.Fusion:Loop items={props.status.missing} @glue=", ">{item.node.label}</Neos.Fusion:Loop>
</p>
<p @if={props.status.outdated}>
Outdated Contents: <Neos.Fusion:Loop items={props.status.outdated}>{item.node.label}</Neos.Fusion:Loop>
Outdated Contents: <Neos.Fusion:Loop items={props.status.outdated} @glue=", ">{item.node.label}</Neos.Fusion:Loop>
</p>
</Neos.Fusion:Fragment>
</lost-in-translation-info>
Expand Down

0 comments on commit 49d1c35

Please sign in to comment.