fix: add a final fallback if we have default_language: nil in instance config

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-11-21 18:10:54 +01:00
parent 262d1fcd4d
commit cd53062c01
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -53,6 +53,8 @@ defmodule Mobilizon.Web.ErrorView do
locale = locale =
Mobilizon.Config.instance_config() Mobilizon.Config.instance_config()
|> Keyword.get(:default_language, "en") |> Keyword.get(:default_language, "en")
# Just in case
|> Kernel.||("en")
Gettext.put_locale(locale) Gettext.put_locale(locale)