From 9876a67a186111cdfb14162dbfdcd6e8ba065bc2 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Mon, 19 Feb 2024 12:03:22 -0500 Subject: [PATCH] docker improvements --- docker/nginx.conf | 14 +++++++------- src/i18n.ts | 16 +++------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index ed22c55..b0d588c 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -4,14 +4,14 @@ http { server { listen 8280; - access_log off; - error_log off; + access_log /dev/null; + error_log /dev/null; - location / { - root /app; - index index.html; - try_files $uri $uri/ /index.html; - } + location / { + root /app; + index index.html; + try_files $uri $uri/ /index.html; + } } } \ No newline at end of file diff --git a/src/i18n.ts b/src/i18n.ts index 981b901..48b6b09 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -15,23 +15,13 @@ import uk from '@/locales/uk.json' import de from '@/locales/de.json' import zh_Hans from '@/locales/zh_Hans.json' -let locale = import.meta.env.SAFETWITCH_DEFAULT_LOCALE || 'en-US' -const fallbackLocale = import.meta.env.SAFETWITCH_FALLBACK_LOCALE || 'en-US' - -if (locale == 'en' ) { - locale = 'en-US' -} - -if (fallbackLocale == 'en' ) { - locale = 'en-US' -} - export default createI18n({ legacy: false, - locale, - fallbackLocale, + locale: import.meta.env.SAFETWITCH_DEFAULT_LOCALE || 'en-US', + fallbackLocale: import.meta.env.SAFETWITCH_FALLBACK_LOCALE || 'en-US', globalInjection: true, messages: { + 'en': en, 'en-US': en, 'es-ES': es, 'nl-NL': nl,