fix mix usage for prod

This commit is contained in:
Graham McIntire 2025-07-08 12:20:40 -05:00
parent 9053f0840a
commit 032b9a31ca
No known key found for this signature in database

View file

@ -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