mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add English (UK) as locale (#11768)
* "English" gets renamed into "English (US)" * "English (UK)" replaces "English" @discourse-translator-bot keep_translations_and_approvals
This commit is contained in:
@@ -13,11 +13,11 @@ describe I18n::Backend::FallbackLocaleList do
|
||||
expect(list[:en]).to eq([:en])
|
||||
end
|
||||
|
||||
it "works when default_locale is English (United States)" do
|
||||
SiteSetting.default_locale = :en_US
|
||||
it "works when default_locale is English (UK)" do
|
||||
SiteSetting.default_locale = :en_GB
|
||||
|
||||
expect(list[:ru]).to eq([:ru, :en])
|
||||
expect(list[:en_US]).to eq([:en_US, :en])
|
||||
expect(list[:en_GB]).to eq([:en_GB, :en])
|
||||
expect(list[:en]).to eq([:en])
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ describe I18n::Backend::FallbackLocaleList do
|
||||
expect(list[:ru]).to eq([:ru, :en])
|
||||
expect(list[:de]).to eq([:de, :en])
|
||||
expect(list[:en]).to eq([:en])
|
||||
expect(list[:en_US]).to eq([:en_US, :en])
|
||||
expect(list[:en_GB]).to eq([:en_GB, :en])
|
||||
end
|
||||
|
||||
context "when plugin registered fallback locale" do
|
||||
@@ -50,14 +50,14 @@ describe I18n::Backend::FallbackLocaleList do
|
||||
expect(list[:en]).to eq([:en])
|
||||
end
|
||||
|
||||
it "works when default_locale is English (United States)" do
|
||||
SiteSetting.default_locale = :en_US
|
||||
it "works when default_locale is English (UK)" do
|
||||
SiteSetting.default_locale = :en_GB
|
||||
|
||||
expect(list[:de_AT]).to eq([:de_AT, :de, :en])
|
||||
expect(list[:"de_AT-formal"]).to eq([:"de_AT-formal", :de_AT, :de, :en])
|
||||
expect(list[:de]).to eq([:de, :en])
|
||||
expect(list[:en]).to eq([:en])
|
||||
expect(list[:en_US]).to eq([:en_US, :en])
|
||||
expect(list[:en_GB]).to eq([:en_GB, :en])
|
||||
end
|
||||
|
||||
it "works when default_locale is not English" do
|
||||
|
||||
@@ -22,7 +22,7 @@ describe Search do
|
||||
it "maps locales to correct Postgres dictionaries" do
|
||||
expect(Search.ts_config).to eq("english")
|
||||
expect(Search.ts_config("en")).to eq("english")
|
||||
expect(Search.ts_config("en_US")).to eq("english")
|
||||
expect(Search.ts_config("en_GB")).to eq("english")
|
||||
expect(Search.ts_config("pt_BR")).to eq("portuguese")
|
||||
expect(Search.ts_config("tr")).to eq("turkish")
|
||||
expect(Search.ts_config("xx")).to eq("simple")
|
||||
|
||||
Reference in New Issue
Block a user