Skip to content

Commit

Permalink
fix asc/desc in dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
PartyWumpus committed Dec 19, 2023
1 parent e56fcbf commit b76256a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions backend/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@
"about": "About",
"alph_asce": "Alphabetical (Z to A)",
"alph_desc": "Alphabetical (A to Z)",
"date_asce": "Oldest first",
"date_desc": "Newest first",
"downloads_asce": "Most Downloaded",
"downloads_desc": "Least Downloaded",
"date_asce": "Newest First",
"date_desc": "Oldest First",
"downloads_asce": "Most Downloaded First",
"downloads_desc": "Least Downloaded First",
"title": "Browse"
},
"store_testing_cta": "Please consider testing new plugins to help the Decky Loader team!",
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/components/store/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ const BrowseTab: FC<{ children: { setPluginCount: Dispatch<SetStateAction<number

const dropdownSortOptions = useMemo(
(): DropdownOption[] => [
{ data: [SortOptions.name, SortDirections.descending], label: t('Store.store_tabs.alph_desc') },
{ data: [SortOptions.name, SortDirections.ascending], label: t('Store.store_tabs.alph_asce') },
{ data: [SortOptions.date, SortDirections.descending], label: t('Store.store_tabs.date_desc') },
// ascending and descending order are the wrong way around for the alphabetical sort
// this is because it was initially done incorrectly for i18n and 'fixing' it would
// make all the translations incorrect
{ data: [SortOptions.name, SortDirections.ascending], label: t('Store.store_tabs.alph_desc') },
{ data: [SortOptions.name, SortDirections.descending], label: t('Store.store_tabs.alph_asce') },
{ data: [SortOptions.date, SortDirections.ascending], label: t('Store.store_tabs.date_asce') },
{ data: [SortOptions.downloads, SortDirections.descending], label: t('Store.store_tabs.downloads_desc') },
{ data: [SortOptions.date, SortDirections.descending], label: t('Store.store_tabs.date_desc') },
{ data: [SortOptions.downloads, SortDirections.ascending], label: t('Store.store_tabs.downloads_asce') },
{ data: [SortOptions.downloads, SortDirections.descending], label: t('Store.store_tabs.downloads_desc') },
],
[],
);
Expand Down

0 comments on commit b76256a

Please sign in to comment.