empty page title exception

This commit is contained in:
Cihan Şentürk 2022-06-03 19:22:30 +03:00 committed by GitHub
parent 49d965ff88
commit 5d409b142a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,15 +124,17 @@ class EmptyPage extends Component
switch ($this->alias) {
case 'core':
$text = 'general.' . $this->page;
$text2 = 'general.' . Str::replace('-', '_', $this->page);
break;
default:
$text = $this->alias . '::general.' . $this->page;
$text2 = $this->alias . '::general.' . Str::replace('-', '_', $this->page);
}
$title = trans_choice($text, $number);
if ($title == $text) {
$title = trans_choice(Str::replace('-', '_', $text), $number);
$title = trans_choice($text2, $number);
}
return $title;
@ -147,15 +149,17 @@ class EmptyPage extends Component
switch ($this->alias) {
case 'core':
$text = 'general.empty.' . $this->page;
$text2 = 'general.empty.' . Str::replace('-', '_', $this->page);
break;
default:
$text = $this->alias . '::general.empty.' . $this->page;
$text2 = $this->alias . '::general.empty.' . Str::replace('-', '_', $this->page);
}
$description = trans($text);
if ($description == $text) {
$description = trans(Str::replace('-', '_', $text));
$description = trans($text2);
}
$docs_url = $this->getDocsUrl();