From da5b617537288f95ec9a142f920cfdf9c05934e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 11 Jan 2021 12:33:00 +0300 Subject: [PATCH] timeline create text fixed.. --- app/Abstracts/View/Components/DocumentShow.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index ac1d2363a..73cb73204 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -1052,7 +1052,15 @@ abstract class DocumentShow extends Base return $textTimelineCreateTitle; } - $default_key = 'create_' . $type; + $default_key = 'create_' . str_replace('-', '_', $type); + + $translation = $this->getTextFromConfig($type, 'timeline_create_title', $default_key); + + if (!empty($translation)) { + return $translation; + } + + $default_key = 'create_' . str_replace('-', '_', config('type.' . $type . '.alias'); $translation = $this->getTextFromConfig($type, 'timeline_create_title', $default_key);