From 13a2ad6c215c398330e49a2200577a7e55610e24 Mon Sep 17 00:00:00 2001 From: Ihor Vansach Date: Tue, 23 Feb 2021 16:53:48 +0200 Subject: [PATCH] Fix issue 32257 --- app/code/Magento/Translation/Model/Inline/Parser.php | 6 +++--- .../Magento/Framework/Translate/Inline/ParserInterface.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Translation/Model/Inline/Parser.php b/app/code/Magento/Translation/Model/Inline/Parser.php index 9c0c8dc696c1b..8783c92aa44dc 100644 --- a/app/code/Magento/Translation/Model/Inline/Parser.php +++ b/app/code/Magento/Translation/Model/Inline/Parser.php @@ -422,7 +422,7 @@ private function _getTranslateData(string $regexp, string &$text, callable $loca [ 'shown' => htmlspecialchars_decode($matches[1][0]), 'translated' => htmlspecialchars_decode($matches[2][0]), - 'original' => htmlspecialchars_decode($matches[3][0]), + 'original' => htmlspecialchars_decode($matches[4][0]), 'location' => htmlspecialchars_decode($locationCallback($matches, $options)), ] ); @@ -682,9 +682,9 @@ private function _otherText() [ 'shown' => $matches[1][0], 'translated' => $matches[2][0], - 'original' => $matches[3][0], + 'original' => $matches[4][0], 'location' => 'Text', - 'scope' => $matches[4][0], + 'scope' => $matches[5][0], ], JSON_HEX_QUOT ); diff --git a/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php index 78093d99729b7..ea20c22535b69 100644 --- a/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php +++ b/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php @@ -16,7 +16,7 @@ interface ParserInterface /** * Regular Expression for detected and replace translate */ - const REGEXP_TOKEN = '\{\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\}'; + const REGEXP_TOKEN = '\{\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\}'; /** * Parse and save edited translation