mirror of
https://github.com/flarum/framework.git
synced 2025-01-22 18:05:32 +08:00
23 lines
736 B
PHP
23 lines
736 B
PHP
@extends('flarum.forum::layouts.basic')
|
|
|
|
@section('content')
|
|
<p>
|
|
{{-- TODO: Change below to @php when Laravel is upgraded --}}
|
|
<?php
|
|
$getTranslationIfExists = function ($code) use ($translator, $settings) {
|
|
$key = 'core.views.error.'.$code.'_message';
|
|
$translation = $translator->trans($key, ['{forum}' => $settings->get('forum_title')]);
|
|
|
|
return $translation === $key ? false : $translation;
|
|
};
|
|
|
|
if (! $translation = $getTranslationIfExists($error->getCode())) {
|
|
if (! $translation = $getTranslationIfExists(500)) {
|
|
$translation = 'An error occurred while trying to load this page.';
|
|
}
|
|
}
|
|
?>
|
|
{{ $translation }}
|
|
</p>
|
|
@endsection
|