From 703e94f3252feb71edb90634cad95575f17dd09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Mon, 8 Jul 2024 12:53:56 +0100 Subject: [PATCH] misc: Switch to British English as the default language. --- .../autocomplete/{eng-US.json => eng-GB.json} | 0 .../commands/{eng-US.json => eng-GB.json} | 0 .../localisations/entry/{eng-US.json => eng-GB.json} | 0 .../events/{eng-US.json => eng-GB.json} | 0 .../interactions/{eng-US.json => eng-GB.json} | 0 .../languages/{eng-US.json => eng-GB.json} | 0 .../licences/{eng-US.json => eng-GB.json} | 0 .../modals/{eng-US.json => eng-GB.json} | 0 .../parameters/{eng-US.json => eng-GB.json} | 0 .../policies/{eng-US.json => eng-GB.json} | 0 .../localisations/roles/{eng-US.json => eng-GB.json} | 0 .../localisations/rules/{eng-US.json => eng-GB.json} | 0 .../services/{eng-US.json => eng-GB.json} | 0 .../localisations/time/{eng-US.json => eng-GB.json} | 0 .../localisations/words/{eng-US.json => eng-GB.json} | 0 source/constants/defaults.ts | 12 ++++++------ test/source/constants/languages/learning.spec.ts | 4 ++-- test/source/constants/languages/localisation.spec.ts | 10 +++++----- 18 files changed, 13 insertions(+), 13 deletions(-) rename assets/localisations/autocomplete/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/commands/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/entry/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/events/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/interactions/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/languages/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/licences/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/modals/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/parameters/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/policies/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/roles/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/rules/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/services/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/time/{eng-US.json => eng-GB.json} (100%) rename assets/localisations/words/{eng-US.json => eng-GB.json} (100%) diff --git a/assets/localisations/autocomplete/eng-US.json b/assets/localisations/autocomplete/eng-GB.json similarity index 100% rename from assets/localisations/autocomplete/eng-US.json rename to assets/localisations/autocomplete/eng-GB.json diff --git a/assets/localisations/commands/eng-US.json b/assets/localisations/commands/eng-GB.json similarity index 100% rename from assets/localisations/commands/eng-US.json rename to assets/localisations/commands/eng-GB.json diff --git a/assets/localisations/entry/eng-US.json b/assets/localisations/entry/eng-GB.json similarity index 100% rename from assets/localisations/entry/eng-US.json rename to assets/localisations/entry/eng-GB.json diff --git a/assets/localisations/events/eng-US.json b/assets/localisations/events/eng-GB.json similarity index 100% rename from assets/localisations/events/eng-US.json rename to assets/localisations/events/eng-GB.json diff --git a/assets/localisations/interactions/eng-US.json b/assets/localisations/interactions/eng-GB.json similarity index 100% rename from assets/localisations/interactions/eng-US.json rename to assets/localisations/interactions/eng-GB.json diff --git a/assets/localisations/languages/eng-US.json b/assets/localisations/languages/eng-GB.json similarity index 100% rename from assets/localisations/languages/eng-US.json rename to assets/localisations/languages/eng-GB.json diff --git a/assets/localisations/licences/eng-US.json b/assets/localisations/licences/eng-GB.json similarity index 100% rename from assets/localisations/licences/eng-US.json rename to assets/localisations/licences/eng-GB.json diff --git a/assets/localisations/modals/eng-US.json b/assets/localisations/modals/eng-GB.json similarity index 100% rename from assets/localisations/modals/eng-US.json rename to assets/localisations/modals/eng-GB.json diff --git a/assets/localisations/parameters/eng-US.json b/assets/localisations/parameters/eng-GB.json similarity index 100% rename from assets/localisations/parameters/eng-US.json rename to assets/localisations/parameters/eng-GB.json diff --git a/assets/localisations/policies/eng-US.json b/assets/localisations/policies/eng-GB.json similarity index 100% rename from assets/localisations/policies/eng-US.json rename to assets/localisations/policies/eng-GB.json diff --git a/assets/localisations/roles/eng-US.json b/assets/localisations/roles/eng-GB.json similarity index 100% rename from assets/localisations/roles/eng-US.json rename to assets/localisations/roles/eng-GB.json diff --git a/assets/localisations/rules/eng-US.json b/assets/localisations/rules/eng-GB.json similarity index 100% rename from assets/localisations/rules/eng-US.json rename to assets/localisations/rules/eng-GB.json diff --git a/assets/localisations/services/eng-US.json b/assets/localisations/services/eng-GB.json similarity index 100% rename from assets/localisations/services/eng-US.json rename to assets/localisations/services/eng-GB.json diff --git a/assets/localisations/time/eng-US.json b/assets/localisations/time/eng-GB.json similarity index 100% rename from assets/localisations/time/eng-US.json rename to assets/localisations/time/eng-GB.json diff --git a/assets/localisations/words/eng-US.json b/assets/localisations/words/eng-GB.json similarity index 100% rename from assets/localisations/words/eng-US.json rename to assets/localisations/words/eng-GB.json diff --git a/source/constants/defaults.ts b/source/constants/defaults.ts index f0938313b..f87fff115 100644 --- a/source/constants/defaults.ts +++ b/source/constants/defaults.ts @@ -7,13 +7,13 @@ import type { } from "logos:constants/languages"; import type { RateLimit, TimeStruct } from "logos/models/guild"; -const FEATURE_LOCALE: Locale = "eng-US"; +const FEATURE_LOCALE: Locale = "eng-GB"; const FEATURE_LANGUAGE: FeatureLanguage = "English"; -const LEARNING_LOCALE: Locale = "eng-US"; -const LEARNING_LANGUAGE: LearningLanguage = "English/American"; -const LOCALISATION_LOCALE: Locale = "eng-US"; -const LOCALISATION_LANGUAGE: LocalisationLanguage = "English/American"; -const TRANSLATION_LANGUAGE: TranslationLanguage = "English/American"; +const LEARNING_LOCALE: Locale = "eng-GB"; +const LEARNING_LANGUAGE: LearningLanguage = "English/British"; +const LOCALISATION_LOCALE: Locale = "eng-GB"; +const LOCALISATION_LANGUAGE: LocalisationLanguage = "English/British"; +const TRANSLATION_LANGUAGE: TranslationLanguage = "English/British"; const COMMAND_RATE_LIMIT: RateLimit = { uses: 5, within: [10, "second"] }; const REPORT_RATE_LIMIT: RateLimit = { uses: 50, within: [1, "day"] }; diff --git a/test/source/constants/languages/learning.spec.ts b/test/source/constants/languages/learning.spec.ts index afd3e46e6..4388e9e38 100644 --- a/test/source/constants/languages/learning.spec.ts +++ b/test/source/constants/languages/learning.spec.ts @@ -27,14 +27,14 @@ describe("isLocale()", () => { describe("getLocaleByLanguage()", () => { it("returns the language corresponding to the passed learning locale.", () => { - expect(getLogosLocaleByLanguage("English/American")).to.equal("eng-US"); + expect(getLogosLocaleByLanguage("English/British")).to.equal("eng-GB"); expect(getLogosLocaleByLanguage("German")).to.equal("deu"); }); }); describe("getWiktionaryLanguageName()", () => { it("returns the Wiktionary name for the learning language if available.", () => { - expect(getWiktionaryLanguageName("English/American")).to.equal("English"); + expect(getWiktionaryLanguageName("English/British")).to.equal("English"); expect(getWiktionaryLanguageName("Norwegian/Bokmal")).to.equal("Norwegian Bokmål"); }); }); diff --git a/test/source/constants/languages/localisation.spec.ts b/test/source/constants/languages/localisation.spec.ts index 68990a144..f580c0da2 100644 --- a/test/source/constants/languages/localisation.spec.ts +++ b/test/source/constants/languages/localisation.spec.ts @@ -34,7 +34,7 @@ describe("isLogosLanguage()", () => { describe("isLogosLocale()", () => { it("returns true if the passed locale is supported by Logos.", () => { - expect(isLogosLocale("eng-US")).to.be.true; // American English + expect(isLogosLocale("eng-GB")).to.be.true; // British English }); it("returns false if the passed locale is not supported by Logos.", () => { @@ -44,21 +44,21 @@ describe("isLogosLocale()", () => { describe("getDiscordLocaleByLanguage()", () => { it("returns the language corresponding to the passed locale.", () => { - expect(getDiscordLocaleByLanguage("English/American")).to.equal("en-US"); + expect(getDiscordLocaleByLanguage("English/British")).to.equal("en-GB"); expect(getDiscordLocaleByLanguage("German")).to.equal("de"); }); }); describe("getLogosLocaleByLanguage()", () => { it("returns the language corresponding to the passed locale.", () => { - expect(getLogosLocaleByLanguage("English/American")).to.equal("eng-US"); + expect(getLogosLocaleByLanguage("English/British")).to.equal("eng-GB"); expect(getLogosLocaleByLanguage("German")).to.equal("deu"); }); }); describe("getDiscordLanguageByLocale()", () => { it("returns the language corresponding to the passed locale if the locale is valid.", () => { - expect(getDiscordLanguageByLocale("en-US")).to.equal("English/American"); + expect(getDiscordLanguageByLocale("en-GB")).to.equal("English/British"); expect(getDiscordLanguageByLocale("ro")).to.equal("Romanian"); }); @@ -70,7 +70,7 @@ describe("getDiscordLanguageByLocale()", () => { describe("getLogosLanguageByLocale()", () => { it("returns the language corresponding to the passed locale.", () => { - expect(getLogosLanguageByLocale("eng-US")).to.equal("English/American"); + expect(getLogosLanguageByLocale("eng-GB")).to.equal("English/British"); expect(getLogosLanguageByLocale("ron")).to.equal("Romanian"); }); });