refactor: sort alphabetically

This commit is contained in:
WoWnik
2024-11-19 18:53:52 +03:00
parent cda66606ec
commit a83b62f62b
4 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark", "system"], {
required_error: "Please select a theme.",
}),
language: z.enum(["en", "pl", "zh-Hans", "ru"], {
language: z.enum(["en", "pl", "ru", "zh-Hans"], {
required_error: "Please select a language.",
}),
});
@@ -175,8 +175,8 @@ export function AppearanceForm() {
{[
{ label: "English", value: "en" },
{ label: "Polski", value: "pl" },
{ label: "简体中文", value: "zh-Hans" },
{ label: "Русский", value: "ru" },
{ label: "简体中文", value: "zh-Hans" },
].map((preset) => (
<SelectItem key={preset.label} value={preset.value}>
{preset.label}

View File

@@ -2,7 +2,7 @@
module.exports = {
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "zh-Hans", "ru"],
locales: ["en", "pl", "ru", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",

View File

@@ -71,7 +71,7 @@ export default api.withTRPC(
{
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "zh-Hans", "ru"],
locales: ["en", "pl", "ru", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",

View File

@@ -1,6 +1,6 @@
import Cookies from "js-cookie";
const SUPPORTED_LOCALES = ["en", "pl", "zh-Hans", "ru"] as const;
const SUPPORTED_LOCALES = ["en", "pl", "ru", "zh-Hans"] as const;
type Locale = (typeof SUPPORTED_LOCALES)[number];