From bf127c2cf1f4bd74e4ae59a0d214fede754fe8ed Mon Sep 17 00:00:00 2001 From: Gabriel Jenik Date: Mon, 29 Aug 2022 06:25:53 -0300 Subject: [PATCH] Fixed issue #18242: Quick translation: end note not shown (#2556) * Fixed issue #18242: Quick translation: end note not shown * Fixed issue #18242: Quick translation: end note not shown * Fixed issue #18242: Quick translation: end note not shown Co-authored-by: encuestabizdevgit --- application/controllers/admin/Translate.php | 7 +++++-- application/views/admin/translate/translatefields_view.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/application/controllers/admin/Translate.php b/application/controllers/admin/Translate.php index 01465f92c63..f6d577c8d11 100644 --- a/application/controllers/admin/Translate.php +++ b/application/controllers/admin/Translate.php @@ -244,9 +244,12 @@ private function displayUntranslatedFields($iSurveyID, $tolang, $baselang, $tab_ $gid = ($amTypeOptions["gid"] == true) ? $gid = $aRowfrom['gid'] : null; $qid = ($amTypeOptions["qid"] == true) ? $qid = $aRowfrom['qid'] : null; - $textform_length = strlen(trim($textfrom)); + $textfrom_length = strlen(trim($textfrom)); + $textfrom2_length = $associated ? strlen(trim($textfrom2)) : 0; - $all_fields_empty = !($textform_length > 0); + if ($textfrom_length > 0 || $textfrom2_length > 0) { + $all_fields_empty = false; + } $aData = array_merge($aData, array( 'textfrom' => $this->cleanup($textfrom, array()), diff --git a/application/views/admin/translate/translatefields_view.php b/application/views/admin/translate/translatefields_view.php index 57235e6400d..838948fb067 100644 --- a/application/views/admin/translate/translatefields_view.php +++ b/application/views/admin/translate/translatefields_view.php @@ -1,4 +1,4 @@ - 0) : ?> + 0 || strlen(trim((string)$textfrom2)) > 0) : ?>