Support multiple locales formally
authorTusooa Zhu <tusooa@kazv.moe>
Thu, 3 Mar 2022 07:03:44 +0000 (02:03 -0500)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:47:10 +0000 (20:47 +0100)
commitfa95bc87253e1c707511cafd9404a8a902338518
treeb21b8d6b9164d745813bf40b6f7bed440346f136
parent845e5769ceb424b6f6dae5811efed5ab55042334
Support multiple locales formally

elixir gettext current does not fully support fallback to another language [0].
But it might in the future. We adapt it so that all languages in Accept-Language
headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated
list.

[0]: https://github.com/elixir-gettext/gettext/issues/303
lib/pleroma/web/gettext.ex
lib/pleroma/web/plugs/set_locale_plug.ex
test/pleroma/web/plugs/set_locale_plug_test.exs