Fix instance view

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-11-10 22:15:49 +01:00
parent c9e9f25f00
commit e675fed7e9

View file

@ -212,14 +212,18 @@ defp translation_config do
enabled = Pleroma.Language.Translation.configured?()
source_languages =
case Pleroma.Language.Translation.supported_languages(:source) do
{:ok, languages} -> languages
with true <- enabled,
{:ok, languages} <- Pleroma.Language.Translation.supported_languages(:source) do
languages
else
_ -> nil
end
target_languages =
case Pleroma.Language.Translation.supported_languages(:target) do
{:ok, languages} -> languages
with true <- enabled,
{:ok, languages} <- Pleroma.Language.Translation.supported_languages(:target) do
languages
else
_ -> nil
end