mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 22:31:59 +00:00
Small fix: handle missing localization in backend plus a small typo in the english language (#443)
* Hotfix for i18n where the detector was overriding localStorage * Please, pnpm, cooperate * Small fix regarding the backend getting hammered when switching to not supported languages plus a small english typo
This commit is contained in:
+6
-2
@@ -101,9 +101,13 @@ class Loader:
|
|||||||
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})
|
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})
|
||||||
|
|
||||||
async def handle_frontend_locales(self, request):
|
async def handle_frontend_locales(self, request):
|
||||||
file = path.join(path.dirname(__file__), "locales", request.match_info["path"])
|
req_lang = request.match_info["path"]
|
||||||
|
file = path.join(path.dirname(__file__), "locales", req_lang)
|
||||||
|
if exists(file):
|
||||||
return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"})
|
return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"})
|
||||||
|
else:
|
||||||
|
self.logger.info(f"Language {req_lang} not available, returning an empty dictionary")
|
||||||
|
return web.json_response(data={}, headers={"Cache-Control": "no-cache"})
|
||||||
|
|
||||||
async def get_plugins(self, request):
|
async def get_plugins(self, request):
|
||||||
plugins = list(self.plugins.values())
|
plugins = list(self.plugins.values())
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
"patch_notes_desc": "Patch Notes",
|
"patch_notes_desc": "Patch Notes",
|
||||||
"updates": {
|
"updates": {
|
||||||
"check_button": "Check For Updates",
|
"check_button": "Check For Updates",
|
||||||
"checking": "'Checking",
|
"checking": "Checking",
|
||||||
"cur_version": "Current version: {{ver}}",
|
"cur_version": "Current version: {{ver}}",
|
||||||
"install_button": "Install Update",
|
"install_button": "Install Update",
|
||||||
"label": "Updates",
|
"label": "Updates",
|
||||||
|
|||||||
Generated
+3
-3
@@ -1099,7 +1099,7 @@ packages:
|
|||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001482
|
caniuse-lite: 1.0.30001482
|
||||||
electron-to-chromium: 1.4.380
|
electron-to-chromium: 1.4.382
|
||||||
node-releases: 2.0.10
|
node-releases: 2.0.10
|
||||||
update-browserslist-db: 1.0.11(browserslist@4.21.5)
|
update-browserslist-db: 1.0.11(browserslist@4.21.5)
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1494,8 +1494,8 @@ packages:
|
|||||||
stream-shift: 1.0.1
|
stream-shift: 1.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron-to-chromium@1.4.380:
|
/electron-to-chromium@1.4.382:
|
||||||
resolution: {integrity: sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==}
|
resolution: {integrity: sha512-czMavlW52VIPgutbVL9JnZIZuFijzsG1ww/1z2Otu1r1q+9Qe2bTsH3My3sZarlvwyqHM6+mnZfEnt2Vr4dsIg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@8.0.0:
|
/emoji-regex@8.0.0:
|
||||||
|
|||||||
Reference in New Issue
Block a user