diff options
| author | Marco Rodolfi <marco.rodolfi@tuta.io> | 2023-05-26 12:14:40 +0200 |
|---|---|---|
| committer | Marco Rodolfi <marco.rodolfi@tuta.io> | 2023-05-26 12:14:40 +0200 |
| commit | 852897c5024f70ebb4d062ab1af1db11606c6b4c (patch) | |
| tree | 1453b1687dba76dcdd97faf1af5bd45cd0ea7799 /frontend/src | |
| parent | 9e502f85fad5adb955cace15c079610ccc01dfa1 (diff) | |
| download | decky-loader-852897c5024f70ebb4d062ab1af1db11606c6b4c.tar.gz decky-loader-852897c5024f70ebb4d062ab1af1db11606c6b4c.zip | |
Fixed untranslated error message and added french suffix country code.
Diffstat (limited to 'frontend/src')
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 7bc02c9a..fd400743 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -1,5 +1,6 @@ import { ConfirmModal, ModalRoot, Patch, QuickAccessTab, Router, showModal, sleep } from 'decky-frontend-lib'; import { FC, lazy } from 'react'; +import { Trans, Translation } from 'react-i18next'; import { FaCog, FaExclamationCircle, FaPlug } from 'react-icons/fa'; import { DeckyState, DeckyStateContextProvider, useDeckyState } from './components/DeckyState'; @@ -255,26 +256,25 @@ class PluginLoader extends Logger { } catch (e) { //this.error(t('PluginLoader.plugin_load_error.message', { name: name }), e); this.error('Error loading plugin ' + name, e); - /*const TheError: FC<{}> = () => ( - <> - {t('PluginLoader.error')}:{' '} - <pre> - <code>{e instanceof Error ? e.stack : JSON.stringify(e)}</code> - </pre> - <>{t('PluginLoader.plugin_error_uninstall', { icon: "<FaCog style={{ display: 'inline' }} />" })}</> - </> - );*/ const TheError: FC<{}> = () => ( - <> - Error:{' '} - <pre> - <code>{e instanceof Error ? e.stack : JSON.stringify(e)}</code> - </pre> - <> - Please go to <FaCog style={{ display: 'inline' }} /> in the Decky menu if you need to uninstall this - plugin. - </> - </> + <Translation> + {(t, {}) => { + return ( + <> + {t('PluginLoader.error')}:{' '} + <pre> + <code>{e instanceof Error ? e.stack : JSON.stringify(e)}</code> + </pre> + <> + <Trans + i18nKey="PluginLoader.plugin_error_uninstall" + components={[<FaCog style={{ display: 'inline' }} />]} + /> + </> + </> + ); + }} + </Translation> ); this.plugins.push({ name: name, |
