From 08909b0d3ac37aa16b631fcf408c2a43c635c3e9 Mon Sep 17 00:00:00 2001
From: Kurt Trowbridge <kurt@gravityworksdesign.com>
Date: Tue, 18 Mar 2025 20:57:00 -0400
Subject: [PATCH] Added language context when comparing current revision to
 original for changes

---
 src/Entity/Paragraph.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Entity/Paragraph.php b/src/Entity/Paragraph.php
index 55e65e4f..a2d32d88 100644
--- a/src/Entity/Paragraph.php
+++ b/src/Entity/Paragraph.php
@@ -688,6 +688,8 @@ class Paragraph extends ContentEntityBase implements ParagraphInterface {
     $original = $this->original ?: NULL;
     if (!$original) {
       $original = $this->entityTypeManager()->getStorage($this->getEntityTypeId())->loadRevision($this->getLoadedRevisionId());
+      // Get the translation in the same language as the current paragraph.
+      $original = \Drupal::service('entity.repository')->getTranslationFromContext($original, $this->language()->getId());
     }
 
     // If the current revision has just been added, we have a change.
-- 
GitLab