From a924c3217f0856a2e78f4a648800f297e4abf6b6 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Sat, 12 Feb 2022 15:20:00 +0100 Subject: [PATCH 1/2] Offline mode only setable if allowed. --- electron/legendary/games.ts | 22 +++++++++++++++++-- .../components/OtherSettings/index.tsx | 5 ++++- src/screens/Settings/index.tsx | 4 ++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/electron/legendary/games.ts b/electron/legendary/games.ts index 45a9184ea2..17d69525ba 100644 --- a/electron/legendary/games.ts +++ b/electron/legendary/games.ts @@ -521,6 +521,7 @@ Categories=Game; let envVars = '' let gameMode: string const gameSettings = await this.getSettings() + const gameInfo = await this.getGameInfo() const { winePrefix, @@ -546,9 +547,26 @@ Categories=Game; const { discordRPC } = await GlobalConfig.get().getSettings() const DiscordRPC = discordRPC ? makeClient('852942976564723722') : null - const runOffline = isOffline || offlineMode ? '--offline' : '' + + let runOffline = '' + if (isOffline || offlineMode) { + if (gameInfo.canRunOffline) { + runOffline = '--offline' + } else { + return dialog.showErrorBox( + i18next.t( + 'box.error.no-offline-mode.title', + 'Offline mode not supported.' + ), + i18next.t( + 'box.error.no-offline-mode.message', + 'Launch aborted! The game requires a internet connection to run it.' + ) + ) + } + } + const exe = targetExe ? `--override-exe ${targetExe}` : '' - const gameInfo = await this.getGameInfo() const isMacNative = gameInfo.is_mac_native const mangohud = showMangohud ? 'mangohud --dlsym' : '' diff --git a/src/screens/Settings/components/OtherSettings/index.tsx b/src/screens/Settings/components/OtherSettings/index.tsx index cea5581ff4..b6149df30c 100644 --- a/src/screens/Settings/components/OtherSettings/index.tsx +++ b/src/screens/Settings/components/OtherSettings/index.tsx @@ -17,6 +17,7 @@ interface Props { isDefault: boolean isMacNative: boolean launcherArgs: string + canRunOffline: boolean offlineMode: boolean otherOptions: string primeRun: boolean @@ -50,6 +51,7 @@ export default function OtherSettings({ toggleUseGameMode, showFps, toggleFps, + canRunOffline, offlineMode, toggleOffline, launcherArgs, @@ -185,6 +187,7 @@ export default function OtherSettings({ )} + {canRunOffline && {t('setting.offlinemode')} - + } {supportsShortcuts && isDefault && ( <> diff --git a/src/screens/Settings/index.tsx b/src/screens/Settings/index.tsx index f910fbe5c2..961f121534 100644 --- a/src/screens/Settings/index.tsx +++ b/src/screens/Settings/index.tsx @@ -66,6 +66,7 @@ function Settings() { const [maxSharpness, setFsrSharpness] = useState(5) const [egsPath, setEgsPath] = useState(egsLinkedPath) const [altLegendaryBin, setAltLegendaryBin] = useState('') + const [canRunOffline, setCanRunOffline] = useState(true) const [language, setLanguage] = useState( () => storage.getItem('language') || 'en' ) @@ -238,8 +239,10 @@ function Settings() { cloud_save_enabled: cloudSaveEnabled, save_folder: saveFolder, title: gameTitle, + canRunOffline: can_run_offline, is_mac_native } = await getGameInfo(appName) + setCanRunOffline(can_run_offline) setTitle(gameTitle) setIsMacNative(is_mac_native) return setHaveCloudSaving({ cloudSaveEnabled, saveFolder }) @@ -515,6 +518,7 @@ function Settings() { togglePrimeRun={toggleNvidiaPrime} showFps={showFps} toggleFps={toggleFps} + canRunOffline={canRunOffline} offlineMode={offlineMode} toggleOffline={toggleOffline} audioFix={audioFix} From 67590bdc55e357245a0dd5277c2c4c5a3181fd79 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Sat, 12 Feb 2022 15:26:00 +0100 Subject: [PATCH 2/2] i18n and lint --- public/locales/bg/translation.json | 4 ++++ public/locales/ca/translation.json | 4 ++++ public/locales/cs/translation.json | 4 ++++ public/locales/de/translation.json | 4 ++++ public/locales/el/translation.json | 4 ++++ public/locales/en/translation.json | 4 ++++ public/locales/es/translation.json | 4 ++++ public/locales/et/translation.json | 4 ++++ public/locales/fa/gamepage.json | 2 +- public/locales/fa/translation.json | 16 ++++++++------ public/locales/fi/translation.json | 4 ++++ public/locales/fr/translation.json | 4 ++++ public/locales/gl/translation.json | 4 ++++ public/locales/hr/translation.json | 4 ++++ public/locales/hu/translation.json | 4 ++++ public/locales/id/translation.json | 4 ++++ public/locales/it/translation.json | 4 ++++ public/locales/ja/translation.json | 4 ++++ public/locales/ko/translation.json | 4 ++++ public/locales/ml/translation.json | 4 ++++ public/locales/nl/translation.json | 4 ++++ public/locales/pl/translation.json | 4 ++++ public/locales/pt/translation.json | 4 ++++ public/locales/pt_BR/translation.json | 4 ++++ public/locales/ru/translation.json | 4 ++++ public/locales/sv/translation.json | 4 ++++ public/locales/ta/translation.json | 4 ++++ public/locales/tr/translation.json | 4 ++++ public/locales/zh_Hans/translation.json | 4 ++++ public/locales/zh_Hant/translation.json | 4 ++++ .../components/OtherSettings/index.tsx | 21 ++++++++++--------- 31 files changed, 134 insertions(+), 17 deletions(-) diff --git a/public/locales/bg/translation.json b/public/locales/bg/translation.json index 82d195d16b..c3e647308a 100644 --- a/public/locales/bg/translation.json +++ b/public/locales/bg/translation.json @@ -33,6 +33,10 @@ "title": "Неизвестна грешка" }, "launch": "Грешка при пускането на играта. Проверете журнала!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Грешка", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/ca/translation.json b/public/locales/ca/translation.json index 7ce4f6b051..3736ab9b79 100644 --- a/public/locales/ca/translation.json +++ b/public/locales/ca/translation.json @@ -33,6 +33,10 @@ "title": "Error desconegut" }, "launch": "Ha sorgit un error mentres s'intentava iniciar el joc, mira el registre!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/cs/translation.json b/public/locales/cs/translation.json index e84cc61748..3e7f33a87c 100644 --- a/public/locales/cs/translation.json +++ b/public/locales/cs/translation.json @@ -33,6 +33,10 @@ "title": "Neočekávaná chyba" }, "launch": "Chyba při spouštění hry, zkontrolujte záznamy!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index bfcd70af49..c43f3357fd 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -33,6 +33,10 @@ "title": "Unbekannter Fehler" }, "launch": "Fehler beim Starten des Spiels, prüfen Sie die Logs!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/el/translation.json b/public/locales/el/translation.json index 391ef92668..04dd406d26 100644 --- a/public/locales/el/translation.json +++ b/public/locales/el/translation.json @@ -33,6 +33,10 @@ "title": "Άγνωστο σφάλμα" }, "launch": "Σφάλμα στην εκκίνηση του παιχνιδιού, ελέγξτε τα αρχεία καταγραφής!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Σφάλμα", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index c6321cc456..dbdcbb66c6 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -33,6 +33,10 @@ "title": "Unknown Error" }, "launch": "Error when launching the game, check the logs!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 9aabaa9353..64fb14b624 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -33,6 +33,10 @@ "title": "Error desconocido" }, "launch": "Error al iniciar el juego, ¡revisa los registros!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/et/translation.json b/public/locales/et/translation.json index a2c512232d..0a508166e7 100644 --- a/public/locales/et/translation.json +++ b/public/locales/et/translation.json @@ -33,6 +33,10 @@ "title": "Tundmatu viga" }, "launch": "Viga mängu käivitamisel, kontrollige logisid!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Viga", "wine-not-found": { "message": "Wine-i versiooni pole valitud. Kontrolli mängu seadeid!", diff --git a/public/locales/fa/gamepage.json b/public/locales/fa/gamepage.json index a582d871a7..e40463d96d 100644 --- a/public/locales/fa/gamepage.json +++ b/public/locales/fa/gamepage.json @@ -23,7 +23,7 @@ "title": "توقف نصب" }, "uninstall": { - "checkbox": "آیا می‌خواهید مسیر را هم پاک کنید؟ این کار بازگشت پذیر نیست.", + "checkbox": "آیا می\u200cخواهید مسیر را هم پاک کنید؟ این کار بازگشت پذیر نیست.", "checkbox_prefix": "Prefix", "message": "آیا میخواهید این بازی را حذف کنید؟", "title": "حذف" diff --git a/public/locales/fa/translation.json b/public/locales/fa/translation.json index d3d8d4ae67..f3618d121f 100644 --- a/public/locales/fa/translation.json +++ b/public/locales/fa/translation.json @@ -33,9 +33,13 @@ "title": "خطای ناشناخته" }, "launch": "خطا در هنگام اجرای بازی، لاگها را چک کنید!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "خطا", "wine-not-found": { - "message": "نسخه‌ای از Wine انتخاب نشده است. تنظیمات بازی را چک کنید!", + "message": "نسخه\u200cای از Wine انتخاب نشده است. تنظیمات بازی را چک کنید!", "title": "Wine یافت نشد" } }, @@ -74,9 +78,9 @@ }, "warning": { "epic": { - "import": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی‌تواند اضافه شود!", - "install": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی‌تواند نصب شود!", - "update": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی‌تواند به‌روزرسانی شود!" + "import": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی\u200cتواند اضافه شود!", + "install": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی\u200cتواند نصب شود!", + "update": "سرورهای اپیک در حال حاضر قطعی عمده دارند، بازی نمی\u200cتواند به\u200cروزرسانی شود!" }, "title": "هشدار" }, @@ -313,8 +317,8 @@ "wiki": "ویکی", "wine": { "manager": { - "error": "نمی‌توان در این زمان نسخه‌های Wine/Proton را به دست آورد.", - "link": "مدیریت Wine‮", + "error": "نمی\u200cتوان در این زمان نسخه\u200cهای Wine/Proton را به دست آورد.", + "link": "مدیریت Wine\u202e", "title": "مدیریت Wine (آزمایشی)", "unzipping": "در حال خارج کردن از حالت فشرده" } diff --git a/public/locales/fi/translation.json b/public/locales/fi/translation.json index 1197766216..4b461eabf4 100644 --- a/public/locales/fi/translation.json +++ b/public/locales/fi/translation.json @@ -33,6 +33,10 @@ "title": "Tuntematon Virhe" }, "launch": "Virhe pelin käynnistyksessä, tarkista pelin lokitiedostot!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Virhe", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 14da6ba319..f92fe4d7f1 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -33,6 +33,10 @@ "title": "Erreur inconnue" }, "launch": "Erreur lors du lancement du jeu, consultez les fichiers de journalisation !", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Erreur", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/gl/translation.json b/public/locales/gl/translation.json index 2b6b5f6a2d..fe6a403a48 100644 --- a/public/locales/gl/translation.json +++ b/public/locales/gl/translation.json @@ -33,6 +33,10 @@ "title": "Erro descoñecido" }, "launch": "Produciuse un erro ao iniciar o xogo, revisa os rexistros!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Erro", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/hr/translation.json b/public/locales/hr/translation.json index 055edf7956..1ed2d5f775 100644 --- a/public/locales/hr/translation.json +++ b/public/locales/hr/translation.json @@ -33,6 +33,10 @@ "title": "Nepoznata greška" }, "launch": "Greška kod pokretanja igrice, provjerite dnevnik!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Greška", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/hu/translation.json b/public/locales/hu/translation.json index 7b06a97a95..d3d361fa57 100644 --- a/public/locales/hu/translation.json +++ b/public/locales/hu/translation.json @@ -33,6 +33,10 @@ "title": "Ismeretlen hiba" }, "launch": "Hiba a játék indításakor, ellenőrizd a naplófájlokat!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Hiba", "wine-not-found": { "message": "Nincs kiválasztva Wine verzió. Ellenőrízd a játék beállításait!", diff --git a/public/locales/id/translation.json b/public/locales/id/translation.json index d0cad20e71..7c61c80c52 100644 --- a/public/locales/id/translation.json +++ b/public/locales/id/translation.json @@ -33,6 +33,10 @@ "title": "Error Tak Dikenal" }, "launch": "Error ketika meluncurkan permainan, periksa log!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/it/translation.json b/public/locales/it/translation.json index 0969f3a49c..1becd6c618 100644 --- a/public/locales/it/translation.json +++ b/public/locales/it/translation.json @@ -33,6 +33,10 @@ "title": "Errore sconosciuto" }, "launch": "Errore durante l'avvio del gioco, controlla i logs!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Errore", "wine-not-found": { "message": "Nessuna versione di Wine selezionata. Controlla le impostazioni del gioco!", diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 3ea66c97cd..496893693b 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -33,6 +33,10 @@ "title": "不明なエラー" }, "launch": "ゲームの起動時にエラーが発生しました、ログを確認してください!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "エラー", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/ko/translation.json b/public/locales/ko/translation.json index 9cba98b029..3c5569319b 100644 --- a/public/locales/ko/translation.json +++ b/public/locales/ko/translation.json @@ -33,6 +33,10 @@ "title": "알 수 없는 오류" }, "launch": "게임을 실행할 때 오류가 발생했습니다, 로그를 확인 해주세요!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "오류", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/ml/translation.json b/public/locales/ml/translation.json index 35d72e527a..b73319ada7 100644 --- a/public/locales/ml/translation.json +++ b/public/locales/ml/translation.json @@ -33,6 +33,10 @@ "title": "കുഴപ്പമുണ്ടല്ലോ" }, "launch": "കളി ഓടിക്കുന്നതിനിടക്ക് എന്തോ കുഴപ്പം പറ്റിയട്ടുണ്ട്, കുറികള് നോക്കൂ!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "കുഴപ്പം", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/nl/translation.json b/public/locales/nl/translation.json index a25124c524..dda590f858 100644 --- a/public/locales/nl/translation.json +++ b/public/locales/nl/translation.json @@ -33,6 +33,10 @@ "title": "Onbekende fout" }, "launch": "Een probleem tijdens het lanceren van het spel, check de logs!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/pl/translation.json b/public/locales/pl/translation.json index ea5d215a87..b995e48362 100644 --- a/public/locales/pl/translation.json +++ b/public/locales/pl/translation.json @@ -33,6 +33,10 @@ "title": "Nieznany błąd" }, "launch": "Błąd przy uruchamianiu gry, sprawdź logi!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "Nie Wybrano Wersji Wine . Sprawdź Ustawienia Gry!", diff --git a/public/locales/pt/translation.json b/public/locales/pt/translation.json index 1c9e13de80..0a61b6ef86 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -33,6 +33,10 @@ "title": "Erro Desconhecido" }, "launch": "Houve um erro ao rodar o jogo, veja os Logs para ver o que aconteceu!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/pt_BR/translation.json b/public/locales/pt_BR/translation.json index 895e8e0919..c501e8fc28 100644 --- a/public/locales/pt_BR/translation.json +++ b/public/locales/pt_BR/translation.json @@ -33,6 +33,10 @@ "title": "Erro Desconhecido" }, "launch": "Erro ao iniciar o jogo, confira os logs!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Erro", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 161af710f9..3125fb87f1 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -33,6 +33,10 @@ "title": "Неизвестная ошибка" }, "launch": "Ошибка при запуске игры, посмотрите логи!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Ошибка", "wine-not-found": { "message": "Не выбрана версия Wine. Проверьте настройки игры!", diff --git a/public/locales/sv/translation.json b/public/locales/sv/translation.json index 654c134ad0..f9b5604662 100644 --- a/public/locales/sv/translation.json +++ b/public/locales/sv/translation.json @@ -33,6 +33,10 @@ "title": "Okänt fel" }, "launch": "Fel vid uppstar av spelet, kontrollera loggarna!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Error", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/ta/translation.json b/public/locales/ta/translation.json index 32dbe1f9bf..cb9e15f837 100644 --- a/public/locales/ta/translation.json +++ b/public/locales/ta/translation.json @@ -33,6 +33,10 @@ "title": "அறியப்படாத பிழை" }, "launch": "விளையாட்டை துவக்கும்போது பிழை, பதிவுகளை பார்க்கவும்!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "பிழை", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/public/locales/tr/translation.json b/public/locales/tr/translation.json index 1aa77448f6..f4d3a2d672 100644 --- a/public/locales/tr/translation.json +++ b/public/locales/tr/translation.json @@ -33,6 +33,10 @@ "title": "Bilinmeyen hata" }, "launch": "Oyun başlatılırken hata oluştu, günlük kayıtlarına bakın!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "Hata", "wine-not-found": { "message": "Wine Sürümü Seçilmedi. Oyun Ayarlarını Denetleyin!", diff --git a/public/locales/zh_Hans/translation.json b/public/locales/zh_Hans/translation.json index 85863462e6..8d05dde211 100644 --- a/public/locales/zh_Hans/translation.json +++ b/public/locales/zh_Hans/translation.json @@ -33,6 +33,10 @@ "title": "未知错误" }, "launch": "启动游戏时出现错误,请检查日志!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "错误", "wine-not-found": { "message": "没有选中 Wine 版本。检查游戏设置!", diff --git a/public/locales/zh_Hant/translation.json b/public/locales/zh_Hant/translation.json index 5ade33d6d0..68120fe79a 100644 --- a/public/locales/zh_Hant/translation.json +++ b/public/locales/zh_Hant/translation.json @@ -33,6 +33,10 @@ "title": "未知錯誤" }, "launch": "啟動遊戲時出現錯誤,請檢查日誌!", + "no-offline-mode": { + "message": "Launch aborted! The game requires a internet connection to run it.", + "title": "Offline mode not supported." + }, "title": "錯誤", "wine-not-found": { "message": "No Wine Version Selected. Check Game Settings!", diff --git a/src/screens/Settings/components/OtherSettings/index.tsx b/src/screens/Settings/components/OtherSettings/index.tsx index b6149df30c..9f10951dfa 100644 --- a/src/screens/Settings/components/OtherSettings/index.tsx +++ b/src/screens/Settings/components/OtherSettings/index.tsx @@ -187,17 +187,18 @@ export default function OtherSettings({ )} - {canRunOffline && - - - - {t('setting.offlinemode')} + {canRunOffline && ( + + + + {t('setting.offlinemode')} + - } + )} {supportsShortcuts && isDefault && ( <>