From 076c47b7b0ca3d6c7592678c229efdb00a634145 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Mon, 1 May 2023 19:30:57 +0200 Subject: [PATCH] feat: prefer en language as top (#2042) --- components/publish/PublishLanguagePicker.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/publish/PublishLanguagePicker.vue b/components/publish/PublishLanguagePicker.vue index cf92aa7a..7c128a08 100644 --- a/components/publish/PublishLanguagePicker.vue +++ b/components/publish/PublishLanguagePicker.vue @@ -20,6 +20,10 @@ const languages = $computed(() => ? fuse.search(languageKeyword).map(r => r.item) : [...languagesNameList].filter(entry => !userSettings.value.disabledTranslationLanguages.includes(entry.code)) .sort(({ code: a }, { code: b }) => { + // Put English on the top + if (a === 'en') + return -1 + return a === modelValue ? -1 : b === modelValue ? 1 : a.localeCompare(b) }), )