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;