diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-04-18 03:31:44 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-04-18 03:31:44 +0000 |
commit | 8517bc18aa0bb9d80b7601ac63573838e3252b21 (patch) | |
tree | c1263b8451d1900b9889ca995c3a4d0430288b6a /test | |
parent | a5d7e98de0ed7989d80e4698155676488afbb423 (diff) | |
parent | be08d9305b1dba9d146a1a1482e6728efb113285 (diff) | |
download | pleroma-8517bc18aa0bb9d80b7601ac63573838e3252b21.tar.gz pleroma-8517bc18aa0bb9d80b7601ac63573838e3252b21.zip |
Merge branch 'from/upstream-develop/tusooa/fix-en-fallback' into 'develop'
Fix incorrect fallback when English is set to first language
See merge request pleroma/pleroma!3656
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/gettext_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/pleroma/web/gettext_test.exs b/test/pleroma/web/gettext_test.exs index 9ede4827e..e186f1ab3 100644 --- a/test/pleroma/web/gettext_test.exs +++ b/test/pleroma/web/gettext_test.exs @@ -38,6 +38,17 @@ defmodule Pleroma.Web.GettextTest do end end + test "putting en locale at the front should not make gettext fallback unexpectedly" do + Pleroma.Web.Gettext.with_locales ["en", "en_test"] do + assert "Your account is awaiting approval" == + Pleroma.Web.Gettext.dpgettext( + "static_pages", + "approval pending email subject", + "Your account is awaiting approval" + ) + end + end + test "duplicated locale in list should not result in infinite loops" do Pleroma.Web.Gettext.with_locales ["x_unsupported", "x_unsupported", "en_test"] do assert "xxYour account is awaiting approvalxx" == |