From b4d406096bec853932de858902046cd0b874e1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 11 Jan 2021 23:04:55 +0300 Subject: [PATCH] translation fixes.. --- app/Abstracts/View/Components/DocumentIndex.php | 2 +- app/Abstracts/View/Components/DocumentShow.php | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Abstracts/View/Components/DocumentIndex.php b/app/Abstracts/View/Components/DocumentIndex.php index 39c0da87b..5252c8f9c 100644 --- a/app/Abstracts/View/Components/DocumentIndex.php +++ b/app/Abstracts/View/Components/DocumentIndex.php @@ -714,7 +714,7 @@ abstract class DocumentIndex extends Base return $textDocumentStatus; } - $translation = $this->getTextFromConfig($type, 'document_status', '.statuses.'); + $translation = $this->getTextFromConfig($type, 'document_status', 'statuses.'); if (!empty($translation)) { return $translation; diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index 64657e9ce..27da0512c 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -536,7 +536,7 @@ abstract class DocumentShow extends Base return $textStatusMessage; } - $default_key = config('type.' . $type . '.translation.prefix') . '.messages.draft'; + $default_key = 'messages.draft'; $translation = $this->getTextFromConfig($type, 'status_message', $default_key); @@ -622,9 +622,7 @@ abstract class DocumentShow extends Base return $textHistories; } - $default_key = config('type.' . $type . '.translation.prefix') . '.histories'; - - $translation = $this->getTextFromConfig($type, 'histories', $default_key); + $translation = $this->getTextFromConfig($type, 'histories', 'histories'); if (!empty($translation)) { return $translation; @@ -639,7 +637,7 @@ abstract class DocumentShow extends Base return $textHistoryStatus; } - $translation = $this->getTextFromConfig($type, 'document_status', '.statuses.'); + $translation = $this->getTextFromConfig($type, 'document_status', 'statuses.'); if (!empty($translation)) { return $translation;