From 49d1c351fc43fd0693c3abf7924d2c4640cc69a9 Mon Sep 17 00:00:00 2001
From: Masoud Hedayati
Date: Mon, 22 Jan 2024 11:24:55 +0100
Subject: [PATCH] consider deleted string contents when updating outdated
translations
---
Classes/Ui/Changes/UpdateOutdatedTranslations.php | 5 ++++-
.../Private/Fusion/Frontend/Collection/InfoRenderer.fusion | 2 +-
.../Private/Fusion/Frontend/Document/InfoRenderer.fusion | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Classes/Ui/Changes/UpdateOutdatedTranslations.php b/Classes/Ui/Changes/UpdateOutdatedTranslations.php
index 0176138..e201d13 100644
--- a/Classes/Ui/Changes/UpdateOutdatedTranslations.php
+++ b/Classes/Ui/Changes/UpdateOutdatedTranslations.php
@@ -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;
}
}
diff --git a/Resources/Private/Fusion/Frontend/Collection/InfoRenderer.fusion b/Resources/Private/Fusion/Frontend/Collection/InfoRenderer.fusion
index a050a69..503ebec 100644
--- a/Resources/Private/Fusion/Frontend/Collection/InfoRenderer.fusion
+++ b/Resources/Private/Fusion/Frontend/Collection/InfoRenderer.fusion
@@ -31,7 +31,7 @@ prototype(Sitegeist.LostInTranslation:Collection.TranslationInformation) < proto
Missing Contents: {item.node.label}
- Outdated Contents: {item.node.label}
+ Outdated Contents: {item.node.label}
diff --git a/Resources/Private/Fusion/Frontend/Document/InfoRenderer.fusion b/Resources/Private/Fusion/Frontend/Document/InfoRenderer.fusion
index 6f8cec0..e1326ed 100644
--- a/Resources/Private/Fusion/Frontend/Document/InfoRenderer.fusion
+++ b/Resources/Private/Fusion/Frontend/Document/InfoRenderer.fusion
@@ -30,7 +30,7 @@ prototype(Sitegeist.LostInTranslation:Document.TranslationInformation) < prototy
Missing Contents: {item.node.label}
- Outdated Contents: {item.node.label}
+ Outdated Contents: {item.node.label}