Refactor languages and fix hooks logic bugs.

This commit is contained in:
Marco Rodolfi
2023-01-31 15:27:28 +01:00
parent eaf7239dd1
commit 25e3f84ddd
45 changed files with 777 additions and 335 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ def get_csrf_token():
@middleware
async def csrf_middleware(request, handler):
if str(request.method) == "OPTIONS" or request.headers.get('Authentication') == csrf_token or str(request.rel_url) == "/auth/token" or str(request.rel_url).startswith("/plugins/load_main/") or str(request.rel_url).startswith("/static/") or str(request.rel_url).startswith("/locales/") or str(request.rel_url).startswith("/legacy/") or str(request.rel_url).startswith("/steam_resource/") or str(request.rel_url).startswith("/frontend/") or assets_regex.match(str(request.rel_url)) or frontend_regex.match(str(request.rel_url)):
if str(request.method) == "OPTIONS" or request.headers.get('Authentication') == csrf_token or str(request.rel_url) == "/auth/token" or str(request.rel_url).startswith("/plugins/load_main/") or str(request.rel_url).startswith("/static/") or str(request.rel_url).startswith("/legacy/") or str(request.rel_url).startswith("/steam_resource/") or str(request.rel_url).startswith("/frontend/") or assets_regex.match(str(request.rel_url)) or frontend_regex.match(str(request.rel_url)):
return await handler(request)
return Response(text='Forbidden', status='403')
+129
View File
@@ -0,0 +1,129 @@
{
"branch_select": {
"update_channel": {
"label": "Update Channel"
}
},
"reload": "Reload",
"uninstall": "Uninstall",
"Developer": {
"enabling": "Enabling",
"disabling": "Disabling",
"5secreload": "Reloading in 5 seconds"
},
"DeveloperIndex": {
"valve_internal": {
"label": "Enable Valve Internal",
"desc1": "Enables the Valve internal developer menu.",
"desc2": "Do not touch anything in this menu unless you know what it does."
},
"react_devtools": {
"label": "Enable React DevTools",
"desc": "Enables connection to a computer running React DevTools. Changing this setting will reload Steam. Set the IP address before enabling."
}
},
"PluginCard": {
"plugin_version_label": "Plugin Version",
"plugin_full_access": "This plugin has full access to your Steam Deck.",
"plugin_install": "Install",
"plugin_no_desc": "No description provided."
},
"PluginInstallModal": {
"install": {
"title": "Install {{artifact}}",
"desc": "Are you sure you want to install {{artifact}} {{version}}?",
"button_idle": "Install",
"button_processing": "Installing"
}
},
"PluginListIndex": {
"list_no_plugin": "No plugins installed!",
"list_update_to": "Update to {{name}}",
"list_plug_actions_label": "Plugin Actions"
},
"PluginLoader": {
"enabling": "Enabling",
"disabling": "Disabling",
"decky_update_available": "Update to {{tag_name}} available!",
"plugin_update_one": "Updates available for 1 plugin!",
"plugin_update_other": "Updates available for {{number}} plugins!",
"plugin_uninstall": {
"title": "Uninstall {{name}}",
"desc": "Are you sure you want to uninstall {{name}}?",
"button": "Uninstall"
},
"plugin_load": {
"plugin_load_error": "Error loading plugin {{name}}",
"plugin_load_error_toast": "Error loading {{name}}"
},
"error": "Error",
"plugin_error_uninstall": "Please go to {{-icon}} in the Decky menu if you need to uninstall this plugin.",
"file_picker_cancel_text": "User canceled"
},
"RemoteDebugging": {
"remote_cef": {
"label": "Allow Remote CEF Debugging",
"desc": "Allow unauthenticated access to the CEF debugger to anyone in your network"
}
},
"SettingsGeneralIndex": {
"developer_mode": {
"label": "Developer mode",
"desc": "Enables Decky's developer settings."
},
"manual_plugin": {
"label": "Manual plugin install",
"button": "Install"
}
},
"SettingsIndex": {
"general_title": "General",
"plugins_title": "Plugins",
"developer_title": "Developer",
"navbar_settings": "Decky Settings"
},
"Store": {
"store_tabs": {
"title": "Browse",
"about": "About",
"alph_desc": "Alphabetical (A to Z)",
"alph_asce": "Alphabetical (Z to A)"
},
"store_sort": {
"label": "Sort",
"label_def": "Last Updated (Newest)"
},
"store_filter": {
"label": "Filter",
"label_def": "All"
},
"store_search_label": "Search",
"store_testing_cta": "Please consider testing new plugins to help the Decky Loader team!",
"store_contrib": {
"label": "Contributing",
"desc": "If you would like to contribute to the Decky Plugin Store, check the SteamDeckHomebrew/decky-plugin-template repository on GitHub. Information on development and distribution is available in the README."
},
"store_source": {
"label": "Source Code",
"desc": "All plugin source code is available on SteamDeckHomebrew/decky-plugin-database repository on GitHub."
}
},
"StoreSelect": {
"store_channel_label": "Store Channel",
"custom_store_label": "Custom Store"
},
"Updater": {
"no_patch_notes_desc": "no patch notes for this version",
"decky_updates": "Decky Updates",
"updates": {
"label": "Updates",
"cur_version": "Current version: {{ver}}",
"lat_version": "Latest version: {{ver}}",
"checking": "'Checking",
"check_button": "Check For Updates",
"install_button": "Install Update",
"reloading": "Reloading",
"updating": "Updating"
}
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"update_channel":{
"label": "Update Channel"
}
}
-4
View File
@@ -1,4 +0,0 @@
{
"reload": "Reload",
"uninstall": "Uninstall"
}
-11
View File
@@ -1,11 +0,0 @@
{
"valve_internal":{
"label": "Enable Valve Internal",
"desc1": "Enables the Valve internal developer menu.",
"desc2": "Do not touch anything in this menu unless you know what it does."
},
"react_devtools":{
"label": "Enable React DevTools",
"desc": "Enables connection to a computer running React DevTools. Changing this setting will reload Steam. Set the IP address before enabling."
}
}
-6
View File
@@ -1,6 +0,0 @@
{
"plugin_version_label": "Plugin Version",
"plugin_full_access": "This plugin has full access to your Steam Deck.",
"plugin_install": "Install",
"plugin_no_desc": "No description provided."
}
@@ -1,8 +0,0 @@
{
"install":{
"title": "Install {{artifact}}",
"desc": "Are you sure you want to install {{artifact}} {{version}}?",
"button_idle": "Install",
"button_processing": "Installing"
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"list_no_plugin": "No plugins installed!",
"list_update_to": "Update to {{name}}",
"list_plug_actions_label": "Plugin Actions"
}
-6
View File
@@ -1,6 +0,0 @@
{
"remote_cef":{
"label": "Allow Remote CEF Debugging",
"desc": "Allow unauthenticated access to the CEF debugger to anyone in your network"
}
}
@@ -1,10 +0,0 @@
{
"developer_mode":{
"label": "Developer mode",
"desc": "Enables Decky's developer settings."
},
"manual_plugin":{
"label": "Manual plugin install",
"button": "Install"
}
}
-6
View File
@@ -1,6 +0,0 @@
{
"general_title": "General",
"plugins_title": "Plugins",
"developer_title": "Developer",
"navbar_settings": "Decky Settings"
}
-28
View File
@@ -1,28 +0,0 @@
{
"store_tabs":{
"title": "Browse",
"about": "About",
"alph_desc": "Alphabetical (A to Z)",
"alph_asce": "Alphabetical (Z to A)"
},
"store_sort":{
"label": "Sort",
"label_def": "Last Updated (Newest)"
},
"store_filter":{
"label": "Filter",
"label_def": "All"
},
"store_search_label": "Search",
"store_testing_cta": "Please consider testing new plugins to help the Decky Loader team!",
"store_contrib":{
"label": "Contributing",
"desc": "If you would like to contribute to the Decky Plugin Store, check the SteamDeckHomebrew/decky-plugin-template repository on GitHub. Information on development and distribution is available in the README."
},
"store_source":{
"label": "Source Code",
"desc": "All plugin source code is available on SteamDeckHomebrew/decky-plugin-database repository on GitHub."
}
}
-4
View File
@@ -1,4 +0,0 @@
{
"store_channel_label": "Store Channel",
"custom_store_label": "Custom Store"
}
-15
View File
@@ -1,15 +0,0 @@
{
"no_patch_notes_desc": "no patch notes for this version",
"decky_updates": "Decky Updates",
"updates":{
"label": "Updates",
"cur_version": "Current version: {{ver}}",
"lat_version": "Latest version: {{ver}}",
"checking": "'Checking",
"check_button": "Check For Updates",
"install_button": "Install Update",
"reloading": "Reloading",
"updating": "Updating"
}
}
-15
View File
@@ -1,15 +0,0 @@
{
"enabling": "Enabling",
"disabling": "Disabling",
"decky_update_available": "Update to {{tag_name}} available!",
"plugin_update_one": "Updates available for 1 plugin!",
"plugin_update_other": "Updates available for {{number}} plugins!",
"plugin_uninstall_title":"Uninstall {{name}}",
"plugin_uninstall_desc": "Are you sure you want to uninstall {{name}}?",
"plugin_uninstall_button": "Uninstall",
"plugin_load_error": "Error loading plugin {{name}}",
"plugin_load_error_toast": "Error loading {{name}}",
"error": "Error",
"plugin_error_uninstall": "Please go to {{-icon}} in the Decky menu if you need to uninstall this plugin.",
"file_picker_cancel_text": "User canceled"
}
+127
View File
@@ -0,0 +1,127 @@
{
"update_channel": {
"label": "Canale di aggiornamento"
},
"reload": "Ricarica",
"uninstall": "Rimuovi",
"Developer": {
"enabling": "Abilitando",
"disabling": "Disabilitando",
"5secreload": "Ricaricando in 5 secondi"
},
"DeveloperIndex": {
"valve_internal": {
"label": "Abilita Menu Sviluppatore",
"desc1": "Abilita il menu di sviluppo interno di Valve.",
"desc2": "Non toccare nulla in questo menu se non sai quello che fa."
},
"react_devtools": {
"label": "Abilita i DevTools di React",
"desc": "Abilita la connessione ad un computer che esegue i DevTools di React. Cambiando questa impostazione ricaricherà Steam. Imposta l'indirizzo IP prima di abilitarlo."
}
},
"PluginCard": {
"plugin_version_label": "Versione Plugin",
"plugin_full_access": "Questo pluugin ha accesso completo al tuo Steam Deck.",
"plugin_install": "Installa",
"plugin_no_desc": "Nessuna descrizione fornita."
},
"PluginInstallModal": {
"install": {
"title": "Installa {{artifact}}",
"desc": "Sei sicuro di voler installare {{artifact}} {{version}}?",
"button_idle": "Installa",
"button_processing": "Installando"
}
},
"PluginListIndex": {
"list_no_plugin": "Nessun plugin installato!",
"list_update_to": "Aggiornamento a {{name}}",
"list_plug_actions_label": "Operazioni sui plugins"
},
"PluginLoader": {
"enabling": "Abilitando",
"disabling": "Disabilitando",
"decky_update_available": "Disponibile aggiornamento a {{tag_name}}!",
"plugin_update_one": "Aggiornamento disponibile per un plugin!",
"plugin_update_other": "Aggiornamento disponibile per {{number}} plugins!",
"plugin_uninstall": {
"title": "Rimozione di {{name}}",
"desc": "Rimuovo {{name}}?",
"button": "Rimuovi"
},
"plugin_load_error": {
"message": "Errore caricando il plugin {{name}}",
"toast": "Errore caricando {{name}}"
},
"error": "Errore",
"plugin_error_uninstall": "Per rimuovere questo plugin vai su {{-icon}} nel menu di Decky.",
"file_picker_cancel_text": "Annullato dall'utente"
},
"RemoteDebugging": {
"remote_cef": {
"label": "Permetti il debug remoto di CEF",
"desc": "Permetti l'accesso non autenticato a chiunque sulla tua rete locale al debugger di CEF."
}
},
"SettingsGeneralIndex": {
"developer_mode": {
"label": "Modalità sviluppatore",
"desc": "Abilità le impostazioni di sviluppo di Decky."
},
"manual_plugin": {
"label": "Installazione manuale plugins",
"button": "Installa"
}
},
"SettingsIndex": {
"general_title": "Generali",
"plugins_title": "Plugins",
"developer_title": "Sviluppatore",
"navbar_settings": "Impostazioni Decky"
},
"Store": {
"store_tabs": {
"title": "Naviga",
"about": "About",
"alph_desc": "Alfabetico (A a Z)",
"alph_asce": "Alfabetico (Z a A)"
},
"store_sort": {
"label": "Ordina",
"label_def": "Ultimo aggiornato (Più recente)"
},
"store_filter": {
"label": "Filtra",
"label_def": "Tutto"
},
"store_search_label": "Cerca",
"store_testing_cta": "Valuta la possibilità di testare nuovi plugin per aiutare il team di Decky Loader!",
"store_contrib": {
"label": "Contribuisci",
"desc": "Se desideri contribuire allo store di Decky, puoi trovare un template caricato su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-template. Informazioni riguardo sviluppo e distribuzione sono disponibili nel README."
},
"store_source": {
"label": "Codice Sorgente",
"desc": "Tutto il codice sorgente dei plugin è disponibile su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-database"
}
},
"StoreSelect": {
"store_channel_label": "Canale del negozio",
"custom_store_label": "Negozio custom"
},
"Updater": {
"no_patch_notes_desc": "nessuna patch notes per questa versione",
"decky_updates": "Aggiornamenti di Decky",
"updates": {
"label": "Aggiornamenti",
"cur_version": "Versione attuale: {{ver}}",
"lat_version": "Ultima versione: {{ver}}",
"checking": "Controllando",
"check_button": "Cerca aggiornamenti",
"install_button": "Installa aggiornamento",
"reloading": "Ricaricando",
"updating": "Aggiornando"
}
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"update_channel":{
"label": "Canale di aggiornamento"
}
}
-4
View File
@@ -1,4 +0,0 @@
{
"reload": "Ricarica",
"uninstall": "Rimuovi"
}
-11
View File
@@ -1,11 +0,0 @@
{
"valve_internal":{
"label": "Abilita Menu Sviluppatore",
"desc1": "Abilita il menu interno di sviluppo di Valve.",
"desc2": "Non toccare nulla in questo menu se non sai quello che fa."
},
"react_devtools":{
"label": "Abilita i DevTools di React",
"desc": "Abilita la connessione ad un computer che esegue i DevTools di React. Cambiando questa impostazione ricaricherà Steam. Imposta l'indirizzo IP prima di abilitarlo."
}
}
-6
View File
@@ -1,6 +0,0 @@
{
"plugin_version_label": "Versione Plugin",
"plugin_full_access": "Questo pluugin ha accesso completo al tuo Steam Deck.",
"plugin_install": "Installa",
"plugin_no_desc": "Nessuna descrizione fornita."
}
@@ -1,8 +0,0 @@
{
"install":{
"title": "Installa {{artifact}}",
"desc": "Sei sicuro di voler installare {{artifact}} {{version}}?",
"button_idle": "Installa",
"button_processing": "Installando"
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"list_no_plugin": "Nessun plugin installato!",
"list_update_to": "Aggiornamento a {{name}}",
"list_plug_actions_label": "Operazioni sui plugins"
}
-6
View File
@@ -1,6 +0,0 @@
{
"remote_cef":{
"label": "Permetti il debug remoto di CEF",
"desc": "Permetti l'accesso non autenticato a chiunque sulla tua rete locale al debugger di CEF."
}
}
@@ -1,10 +0,0 @@
{
"developer_mode":{
"label": "Modalità sviluppatore",
"desc": "Abilità le impostazioni di sviluppo di Decky."
},
"manual_plugin":{
"label": "Installazione manuale plugins",
"button": "Installa"
}
}
-6
View File
@@ -1,6 +0,0 @@
{
"general_title": "Generali",
"plugins_title": "Plugins",
"developer_title": "Sviluppatore",
"navbar_settings": "Impostazioni Decky"
}
-29
View File
@@ -1,29 +0,0 @@
{
"store_tabs":{
"title": "Naviga",
"about": "About",
"alph_desc": "Alfabetico (A a Z)",
"alph_asce": "Alfabetico (Z a A)"
},
"store_sort":{
"label": "Ordina",
"label_def": "Ultimo aggiornato (Più recente)"
},
"store_filter":{
"label": "Filtra",
"label_def": "Tutto"
},
"store_search_label": "Cerca",
"store_testing_cta": "Valuta la possibilità di testare nuovi plugin per aiutare il team di Decky Loader!",
"store_contrib":{
"label": "Contribuisci",
"desc": "Se desideri contribuire allo store di Decky, puoi trovare un template caricato su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-template. Informazioni riguardo sviluppo e distribuzione sono disponibili nel README."
},
"store_source":{
"label": "Codice Sorgente",
"desc": "Tutto il codice sorgente dei plugin è disponibile su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-database"
}
}
-4
View File
@@ -1,4 +0,0 @@
{
"store_channel_label": "Canale del negozio",
"custom_store_label": "Negozio custom"
}
-15
View File
@@ -1,15 +0,0 @@
{
"no_patch_notes_desc": "nessuna patch notes per questa versione",
"decky_updates": "Aggiornamenti di Decky",
"updates":{
"label": "Aggiornamenti",
"cur_version": "Versione attuale: {{ver}}",
"lat_version": "Ultima versione: {{ver}}",
"checking": "Controllando",
"check_button": "Cerca aggiornamenti",
"install_button": "Installa aggiornamento",
"reloading": "Ricaricando",
"updating": "Aggiornando"
}
}
-15
View File
@@ -1,15 +0,0 @@
{
"enabling": "Abilitando",
"disabling": "Disabilitando",
"decky_update_available": "Disponibile aggiornamento a {{tag_name}}!",
"plugin_update_one": "Aggiornamento disponibile per un plugin!",
"plugin_update_other": "Aggiornamento disponibile per {{number}} plugins!",
"plugin_uninstall_title":"Rimozione di {{name}}",
"plugin_uninstall_desc": "Rimuovo {{name}}?",
"plugin_uninstall_button": "Rimuovi",
"plugin_load_error": "Errore caricando il plugin {{name}}",
"plugin_load_error_toast": "Errore caricando {{name}}",
"error": "Errore",
"plugin_error_uninstall": "Per rimuovere questo plugin vai su {{-icon}} nel menu di Decky.",
"file_picker_cancel_text": "Annullato dall'utente"
}