diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | backend/decky_loader/loader.py | 4 | ||||
| -rw-r--r-- | backend/decky_loader/locales/ar-AA.json (renamed from backend/locales/ar-AA.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/bg-BG.json (renamed from backend/locales/bg-BG.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/cs-CZ.json (renamed from backend/locales/cs-CZ.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/de-DE.json (renamed from backend/locales/de-DE.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/el-GR.json (renamed from backend/locales/el-GR.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/en-US.json (renamed from backend/locales/en-US.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/es-ES.json (renamed from backend/locales/es-ES.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/fi-FI.json (renamed from backend/locales/fi-FI.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/fr-FR.json (renamed from backend/locales/fr-FR.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/it-IT.json (renamed from backend/locales/it-IT.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/ja-JP.json (renamed from backend/locales/ja-JP.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/ko-KR.json (renamed from backend/locales/ko-KR.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/nl-NL.json (renamed from backend/locales/nl-NL.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/pl-PL.json (renamed from backend/locales/pl-PL.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/pt-BR.json (renamed from backend/locales/pt-BR.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/pt-PT.json (renamed from backend/locales/pt-PT.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/ru-RU.json (renamed from backend/locales/ru-RU.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/sq-AL.json (renamed from backend/locales/sq-AL.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/sv-SE.json (renamed from backend/locales/sv-SE.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/tr-TR.json (renamed from backend/locales/tr-TR.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/uk-UA.json (renamed from backend/locales/uk-UA.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/zh-CN.json (renamed from backend/locales/zh-CN.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/locales/zh-TW.json (renamed from backend/locales/zh-TW.json) | 0 | ||||
| -rw-r--r-- | backend/decky_loader/main.py | 2 | ||||
| -rw-r--r-- | backend/pyinstaller.spec | 4 | ||||
| -rw-r--r-- | backend/pyproject.toml | 5 | ||||
| -rw-r--r-- | frontend/i18next-parser.config.mjs | 2 | ||||
| -rw-r--r-- | frontend/rollup.config.js | 4 |
30 files changed, 13 insertions, 10 deletions
@@ -153,7 +153,7 @@ dmypy.json cython_debug/ # static files are built -backend/static +backend/decky_loader/static # ignore settings.json # prevents leaking login details diff --git a/backend/decky_loader/loader.py b/backend/decky_loader/loader.py index 4fc03237..e8a073a9 100644 --- a/backend/decky_loader/loader.py +++ b/backend/decky_loader/loader.py @@ -106,12 +106,12 @@ class Loader: self.watcher.disabled = False async def handle_frontend_assets(self, request: web.Request): - file = Path(__file__).parents[1].joinpath("static").joinpath(request.match_info["path"]) + file = Path(__file__).parent.joinpath("static").joinpath(request.match_info["path"]) return web.FileResponse(file, headers={"Cache-Control": "no-cache"}) async def handle_frontend_locales(self, request: web.Request): req_lang = request.match_info["path"] - file = Path(__file__).parents[1].joinpath("locales").joinpath(req_lang) + file = Path(__file__).parent.joinpath("locales").joinpath(req_lang) if exists(file): return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"}) else: diff --git a/backend/locales/ar-AA.json b/backend/decky_loader/locales/ar-AA.json index f5c11016..f5c11016 100644 --- a/backend/locales/ar-AA.json +++ b/backend/decky_loader/locales/ar-AA.json diff --git a/backend/locales/bg-BG.json b/backend/decky_loader/locales/bg-BG.json index b9c4d803..b9c4d803 100644 --- a/backend/locales/bg-BG.json +++ b/backend/decky_loader/locales/bg-BG.json diff --git a/backend/locales/cs-CZ.json b/backend/decky_loader/locales/cs-CZ.json index ca8114e4..ca8114e4 100644 --- a/backend/locales/cs-CZ.json +++ b/backend/decky_loader/locales/cs-CZ.json diff --git a/backend/locales/de-DE.json b/backend/decky_loader/locales/de-DE.json index e0013bc7..e0013bc7 100644 --- a/backend/locales/de-DE.json +++ b/backend/decky_loader/locales/de-DE.json diff --git a/backend/locales/el-GR.json b/backend/decky_loader/locales/el-GR.json index 62562935..62562935 100644 --- a/backend/locales/el-GR.json +++ b/backend/decky_loader/locales/el-GR.json diff --git a/backend/locales/en-US.json b/backend/decky_loader/locales/en-US.json index 94e1ed3d..94e1ed3d 100644 --- a/backend/locales/en-US.json +++ b/backend/decky_loader/locales/en-US.json diff --git a/backend/locales/es-ES.json b/backend/decky_loader/locales/es-ES.json index 6c47eb06..6c47eb06 100644 --- a/backend/locales/es-ES.json +++ b/backend/decky_loader/locales/es-ES.json diff --git a/backend/locales/fi-FI.json b/backend/decky_loader/locales/fi-FI.json index b0ff1309..b0ff1309 100644 --- a/backend/locales/fi-FI.json +++ b/backend/decky_loader/locales/fi-FI.json diff --git a/backend/locales/fr-FR.json b/backend/decky_loader/locales/fr-FR.json index d3f37b9c..d3f37b9c 100644 --- a/backend/locales/fr-FR.json +++ b/backend/decky_loader/locales/fr-FR.json diff --git a/backend/locales/it-IT.json b/backend/decky_loader/locales/it-IT.json index 26bf39fd..26bf39fd 100644 --- a/backend/locales/it-IT.json +++ b/backend/decky_loader/locales/it-IT.json diff --git a/backend/locales/ja-JP.json b/backend/decky_loader/locales/ja-JP.json index 251807fb..251807fb 100644 --- a/backend/locales/ja-JP.json +++ b/backend/decky_loader/locales/ja-JP.json diff --git a/backend/locales/ko-KR.json b/backend/decky_loader/locales/ko-KR.json index b2c6dbac..b2c6dbac 100644 --- a/backend/locales/ko-KR.json +++ b/backend/decky_loader/locales/ko-KR.json diff --git a/backend/locales/nl-NL.json b/backend/decky_loader/locales/nl-NL.json index 68256c7a..68256c7a 100644 --- a/backend/locales/nl-NL.json +++ b/backend/decky_loader/locales/nl-NL.json diff --git a/backend/locales/pl-PL.json b/backend/decky_loader/locales/pl-PL.json index c7cec3d7..c7cec3d7 100644 --- a/backend/locales/pl-PL.json +++ b/backend/decky_loader/locales/pl-PL.json diff --git a/backend/locales/pt-BR.json b/backend/decky_loader/locales/pt-BR.json index 53fdb6fe..53fdb6fe 100644 --- a/backend/locales/pt-BR.json +++ b/backend/decky_loader/locales/pt-BR.json diff --git a/backend/locales/pt-PT.json b/backend/decky_loader/locales/pt-PT.json index b4e0ab9a..b4e0ab9a 100644 --- a/backend/locales/pt-PT.json +++ b/backend/decky_loader/locales/pt-PT.json diff --git a/backend/locales/ru-RU.json b/backend/decky_loader/locales/ru-RU.json index af8c0a38..af8c0a38 100644 --- a/backend/locales/ru-RU.json +++ b/backend/decky_loader/locales/ru-RU.json diff --git a/backend/locales/sq-AL.json b/backend/decky_loader/locales/sq-AL.json index fe9d7eec..fe9d7eec 100644 --- a/backend/locales/sq-AL.json +++ b/backend/decky_loader/locales/sq-AL.json diff --git a/backend/locales/sv-SE.json b/backend/decky_loader/locales/sv-SE.json index 4961956a..4961956a 100644 --- a/backend/locales/sv-SE.json +++ b/backend/decky_loader/locales/sv-SE.json diff --git a/backend/locales/tr-TR.json b/backend/decky_loader/locales/tr-TR.json index 501f6c78..501f6c78 100644 --- a/backend/locales/tr-TR.json +++ b/backend/decky_loader/locales/tr-TR.json diff --git a/backend/locales/uk-UA.json b/backend/decky_loader/locales/uk-UA.json index 09fbca1b..09fbca1b 100644 --- a/backend/locales/uk-UA.json +++ b/backend/decky_loader/locales/uk-UA.json diff --git a/backend/locales/zh-CN.json b/backend/decky_loader/locales/zh-CN.json index 3f414d99..3f414d99 100644 --- a/backend/locales/zh-CN.json +++ b/backend/decky_loader/locales/zh-CN.json diff --git a/backend/locales/zh-TW.json b/backend/decky_loader/locales/zh-TW.json index 091eb9d0..091eb9d0 100644 --- a/backend/locales/zh-TW.json +++ b/backend/decky_loader/locales/zh-TW.json diff --git a/backend/decky_loader/main.py b/backend/decky_loader/main.py index a1e683da..fe93c11b 100644 --- a/backend/decky_loader/main.py +++ b/backend/decky_loader/main.py @@ -88,7 +88,7 @@ class PluginManager: for route in list(self.web_app.router.routes()): self.cors.add(route) # pyright: ignore [reportUnknownMemberType] - self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), '..', 'static'))]) + self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), 'static'))]) def exception_handler(self, loop: AbstractEventLoop, context: Dict[str, str]): if context["message"] == "Unclosed connection": diff --git a/backend/pyinstaller.spec b/backend/pyinstaller.spec index a9eba6a4..91ff4e5b 100644 --- a/backend/pyinstaller.spec +++ b/backend/pyinstaller.spec @@ -6,8 +6,8 @@ from PyInstaller.utils.hooks import copy_metadata a = Analysis( ['main.py'], datas=[ - ('locales', 'locales'), - ('static', 'static'), + ('decky_loader/locales', 'decky_loader/locales'), + ('decky_loader/static', 'decky_loader/static'), ] + copy_metadata('decky_loader'), hiddenimports=['logging.handlers', 'sqlite3', 'decky_plugin', 'decky'], ) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 0d5b65b0..a5474e6a 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -8,7 +8,10 @@ packages = [ {include = "decky_loader"}, {include = "decky_loader/main.py"} ] -include = ["decky_loader/static/*"] +include = [ + "decky_loader/locales/*", + "decky_loader/static/*" +] [tool.poetry.dependencies] python = ">=3.10,<3.13" diff --git a/frontend/i18next-parser.config.mjs b/frontend/i18next-parser.config.mjs index 8de58cfc..0e36964d 100644 --- a/frontend/i18next-parser.config.mjs +++ b/frontend/i18next-parser.config.mjs @@ -43,7 +43,7 @@ export default { // Namespace separator used in your translation keys // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance. - output: '../backend/locales/$LOCALE.json', + output: '../backend/decky_loader/locales/$LOCALE.json', // Supports $LOCALE and $NAMESPACE injection // Supports JSON (.json) and YAML (.yml) file formats // Where to write the locale files relative to process.cwd() diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index e86fbf07..911cf06d 100644 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -14,7 +14,7 @@ const hiddenWarnings = ['THIS_IS_UNDEFINED', 'EVAL']; export default defineConfig({ input: 'src/index.ts', plugins: [ - del({ targets: '../backend/static/*', force: true }), + del({ targets: '../backend/decky_loader/static/*', force: true }), commonjs(), nodeResolve({ browser: true, @@ -38,7 +38,7 @@ export default defineConfig({ ], preserveEntrySignatures: false, output: { - dir: '../backend/static', + dir: '../backend/decky_loader/static', format: 'esm', chunkFileNames: (chunkInfo) => { return 'chunk-[hash].js'; |
