From 729ab66ff2c88002a1f605d56c17f02f9c652ce2 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Mon, 10 Oct 2022 19:28:54 +0100 Subject: [PATCH 1/2] Prepare originals later to prepare both root and variant --- gp-templates/translation-row-preview.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gp-templates/translation-row-preview.php b/gp-templates/translation-row-preview.php index 4c175c6..6bb4e06 100644 --- a/gp-templates/translation-row-preview.php +++ b/gp-templates/translation-row-preview.php @@ -54,10 +54,10 @@ $singular_translation = esc_translation( $translation->translations[0] ); // Check if has root. if ( isset( $translation->root_id ) ) { - $singular_translation = prepare_original( GP_Convert_PT_AO90\Portuguese_AO90::highlight_diff( esc_translation( $translation->root_translation_0 ), esc_translation( $translation->translations[0] ) ) ); + $singular_translation = GP_Convert_PT_AO90\Portuguese_AO90::highlight_diff( esc_translation( $translation->root_translation_0 ), esc_translation( $translation->translations[0] ) ); } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - echo '' . $singular_translation . ''; + echo '' . prepare_original( $singular_translation ) . ''; else : ?>