mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 12:15:09 +03:00
feat: Added detailed message for permission error and clean up english language from unused strings.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"FilePickerError": {
|
||||
"errors": {
|
||||
"file_not_found": "The path specified is not valid. Please check it and reenter it correctly.",
|
||||
"perm_denied": "You do not have access to the specified directory. Please check if your user (deck on Steam Deck) has the corresponding permission to access the specified folder/file.",
|
||||
"unknown": "An unknown error occurred. The raw error is: {{raw_error}}"
|
||||
}
|
||||
},
|
||||
@@ -159,10 +160,6 @@
|
||||
"label_url": "Install Plugin from URL",
|
||||
"label_zip": "Install Plugin from ZIP File"
|
||||
},
|
||||
"toast_zip": {
|
||||
"body": "Installation failed! Only ZIP files are supported.",
|
||||
"title": "Decky"
|
||||
},
|
||||
"valve_internal": {
|
||||
"desc1": "Enables the Valve internal developer menu.",
|
||||
"desc2": "Do not touch anything in this menu unless you know what it does.",
|
||||
@@ -178,25 +175,23 @@
|
||||
"header": "Beta participation"
|
||||
},
|
||||
"developer_mode": {
|
||||
"desc": "Enables Decky's developer settings.",
|
||||
"label": "Developer mode"
|
||||
},
|
||||
"notifications": {
|
||||
"decky_updates_label": "Decky update available",
|
||||
"header": "Notifications",
|
||||
"plugin_updates_label": "Plugin updates available"
|
||||
},
|
||||
"other": {
|
||||
"header": "Other"
|
||||
},
|
||||
"updates": {
|
||||
"header": "Updates"
|
||||
},
|
||||
"notifications": {
|
||||
"header": "Notifications",
|
||||
"decky_updates_label": "Decky update available",
|
||||
"plugin_updates_label": "Plugin updates available"
|
||||
}
|
||||
},
|
||||
"SettingsIndex": {
|
||||
"developer_title": "Developer",
|
||||
"general_title": "General",
|
||||
"navbar_settings": "Decky Settings",
|
||||
"plugins_title": "Plugins"
|
||||
},
|
||||
"Store": {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"FilePickerError": {
|
||||
"errors": {
|
||||
"file_not_found": "Il percorso specificato non è valido. Controllalo e prova a reinserirlo di nuovo.",
|
||||
"perm_denied": "Il tuo utente (deck su Steam Deck) non ha accesso al percorso specificato. Controlla che abbia i permessi corrispondenti per accedere alla cartella/file desiderato.",
|
||||
"unknown": "È avvenuto un'errore sconosciuto. L'errore segnalato è {{raw_error}}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
lineEnding: 'auto',
|
||||
// Control the line ending. See options at https://github.com/ryanve/eol
|
||||
|
||||
locales: ['en-US', 'it-IT'],
|
||||
locales: ['en-US'],
|
||||
// An array of the locales in your applications
|
||||
|
||||
namespaceSeparator: false,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IconContext } from 'react-icons';
|
||||
import { FaExclamationTriangle, FaQuestionCircle } from 'react-icons/fa';
|
||||
import { FaExclamationTriangle, FaQuestionCircle, FaUserSlash } from 'react-icons/fa';
|
||||
|
||||
export enum FileErrorTypes {
|
||||
FileNotFound,
|
||||
PermissionDenied,
|
||||
Unknown,
|
||||
None,
|
||||
}
|
||||
@@ -25,6 +26,10 @@ const FilePickerError: FC<FilePickerErrorProps> = ({ error, rawError = null }) =
|
||||
setText(t('FilePickerError.errors.file_not_found'));
|
||||
setIcon(<FaExclamationTriangle />);
|
||||
break;
|
||||
case FileErrorTypes.PermissionDenied:
|
||||
setText(t('FilePickerError.errors.perm_denied'));
|
||||
setIcon(<FaUserSlash />);
|
||||
break;
|
||||
case FileErrorTypes.Unknown:
|
||||
setText(t('FilePickerError.errors.unknown', { raw_error: rawError }));
|
||||
setIcon(<FaQuestionCircle />);
|
||||
|
||||
@@ -210,6 +210,9 @@ const FilePicker: FunctionComponent<FilePickerProps> = ({
|
||||
case theError.match(/\[WinError\s3.*/i)?.input:
|
||||
setError(FileErrorTypes.FileNotFound);
|
||||
break;
|
||||
case theError.match(/\[Errno\s13.*/i)?.input:
|
||||
setError(FileErrorTypes.PermissionDenied);
|
||||
break;
|
||||
default:
|
||||
setRawError(theError);
|
||||
setError(FileErrorTypes.Unknown);
|
||||
|
||||
Reference in New Issue
Block a user