From 134ba508e277e869d6d50a74fab5b657a16c7c19 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Feb 2022 12:01:05 -0500 Subject: [PATCH] Fix i18n --- app/Http/Controllers/Base/LocaleController.php | 4 ++-- resources/scripts/i18n.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Base/LocaleController.php b/app/Http/Controllers/Base/LocaleController.php index 3bb6fbfba..c7b78148e 100644 --- a/app/Http/Controllers/Base/LocaleController.php +++ b/app/Http/Controllers/Base/LocaleController.php @@ -31,8 +31,8 @@ class LocaleController extends Controller { $data = $this->translator->getLoader()->load($locale, str_replace('.', '/', $namespace)); - return JsonResponse::create($data, 200, [ - 'E-Tag' => md5(json_encode($data)), + return new JsonResponse($data, 200, [ + 'E-Tag' => md5(json_encode($data)), // @phpstan-ignore-line ]); } } diff --git a/resources/scripts/i18n.ts b/resources/scripts/i18n.ts index 1f80a2e13..9f6861b25 100644 --- a/resources/scripts/i18n.ts +++ b/resources/scripts/i18n.ts @@ -8,7 +8,7 @@ i18n .use(Backend) .use(initReactI18next) .init({ - debug: process.env.NODE_ENV !== 'production', + debug: process.env.I18N_DEBUG === 'true', lng: 'en', fallbackLng: 'en', keySeparator: '.',