diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 41d7fa95b4..d317b67b2c 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Log; use Illuminate\View\View; /** @@ -106,6 +107,7 @@ class ForgotPasswordController extends Controller } $host = request()->host(); if ($configuredHost !== $host) { + Log::error(sprintf('Host header is "%s", APP_URL is "%s".', $host, $configuredHost)); throw new FireflyException('The Host-header does not match the host in the APP_URL environment variable. Please make sure these match. See also: https://bit.ly/FF3-host-header'); } } diff --git a/app/Support/Twig/Translation.php b/app/Support/Twig/Translation.php index eaeac5ca6c..4167f64c31 100644 --- a/app/Support/Twig/Translation.php +++ b/app/Support/Twig/Translation.php @@ -49,6 +49,7 @@ class Translation extends AbstractExtension { return [ $this->journalLinkTranslation(), + $this->laravelTranslation(), ]; } @@ -68,4 +69,19 @@ class Translation extends AbstractExtension ['is_safe' => ['html']] ); } + + public function laravelTranslation(): TwigFunction + { + return new TwigFunction( + '__', + static function (string $key) { + $translation = trans($key); + if ($key === $translation) { + return $key; + } + + return $translation; + } + ); + } } diff --git a/resources/views/partials/password-modal-twig.twig b/resources/views/partials/password-modal-twig.twig new file mode 100644 index 0000000000..f8365acc9a --- /dev/null +++ b/resources/views/partials/password-modal-twig.twig @@ -0,0 +1,35 @@ +