From 032b9a31caf6898665433ab88080bf32a5218374 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 8 Jul 2025 12:20:40 -0500 Subject: [PATCH] fix mix usage for prod --- lib/aprsme_web/live/locale_hook.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/aprsme_web/live/locale_hook.ex b/lib/aprsme_web/live/locale_hook.ex index 946fb23..f9f452e 100644 --- a/lib/aprsme_web/live/locale_hook.ex +++ b/lib/aprsme_web/live/locale_hook.ex @@ -3,6 +3,7 @@ defmodule AprsmeWeb.LocaleHook do LiveView hook for setting locale based on Accept-Language header. This ensures that LiveView updates maintain the correct locale. """ + import Config, only: [config_env: 0] import Phoenix.Component # Cache supported locales at compile time @@ -11,7 +12,7 @@ defmodule AprsmeWeb.LocaleHook do def on_mount(:set_locale, params, session, socket) do # Only set locale in production to allow seeing "xx" placeholders in dev locale = - if Mix.env() == :prod do + if config_env() == :prod do get_locale_from_session(session) || "en" end