mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 09:22:22 +00:00
Fix loading list of languages after ex_cldr update
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ed4a55b4b6
commit
e7ce24966b
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
|
|||
def get_list_of_languages(_parent, %{codes: codes}, _resolution) when is_list(codes) do
|
||||
locale = Mobilizon.Cldr.locale_or_default(Gettext.get_locale())
|
||||
|
||||
case Language.known_languages(locale) do
|
||||
case Language.known_languages(String.to_existing_atom(locale)) do
|
||||
data when is_map(data) ->
|
||||
data
|
||||
|> Enum.map(fn {code, elem} -> %{code: code, name: elem.standard} end)
|
||||
|
@ -193,7 +193,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
|
|||
def get_list_of_languages(_parent, _args, _resolution) do
|
||||
locale = Gettext.get_locale()
|
||||
|
||||
case Language.known_languages(locale) do
|
||||
case Language.known_languages(String.to_existing_atom(locale)) do
|
||||
data when is_map(data) ->
|
||||
data = Enum.map(data, fn {code, elem} -> %{code: code, name: elem.standard} end)
|
||||
{:ok, data}
|
||||
|
|
Loading…
Reference in a new issue