Skip to content

Commit

Permalink
Implement localized store
Browse files Browse the repository at this point in the history
  • Loading branch information
RodoMa92 committed Nov 19, 2023
1 parent 7c3ae9b commit 0c91048
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/src/store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,17 @@ export async function getPluginList(): Promise<StorePlugin[]> {
headers: {
'X-Decky-Version': version.current,
},
}).then((r) => r.json());
}).then((r) => {
let res = JSON.parse(JSON.stringify(r.json()));
const lng = navigator.language;
if (res.hasOwnProperty('name-' + lng)) {
res.name = res['name-' + lng];
}
if (res.hasOwnProperty('description-' + lng)) {
res.description = res['description-' + lng];
}
return res;
});
}

export async function installFromURL(url: string) {
Expand Down

0 comments on commit 0c91048

Please sign in to comment.