Skip to content

Commit

Permalink
feat: prefer en language as top (#2042)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed May 1, 2023
1 parent 98777f0 commit 076c47b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/publish/PublishLanguagePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}),
)
Expand Down

0 comments on commit 076c47b

Please sign in to comment.