summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals/PluginInstallModal.tsx
diff options
context:
space:
mode:
authorMarco Rodolfi <marco.rodolfi@tuta.io>2023-05-27 13:55:26 +0200
committerMarco Rodolfi <marco.rodolfi@tuta.io>2023-05-27 13:55:26 +0200
commit6e6f8caca807979be4889a5c1292aa15309a6a3a (patch)
treedb240b8b4851045308b26ebf7d7382625ecf2ff6 /frontend/src/components/modals/PluginInstallModal.tsx
parent3a83062438e2e86dbaaf459f8af7a2fd5a8df215 (diff)
downloaddecky-loader-6e6f8caca807979be4889a5c1292aa15309a6a3a.tar.gz
decky-loader-6e6f8caca807979be4889a5c1292aa15309a6a3a.zip
Unified translation classes, fixed missing toaster translation and improved the error styling report.
Diffstat (limited to 'frontend/src/components/modals/PluginInstallModal.tsx')
-rw-r--r--frontend/src/components/modals/PluginInstallModal.tsx46
1 files changed, 36 insertions, 10 deletions
diff --git a/frontend/src/components/modals/PluginInstallModal.tsx b/frontend/src/components/modals/PluginInstallModal.tsx
index 0e8e3d47..b37dbc65 100644
--- a/frontend/src/components/modals/PluginInstallModal.tsx
+++ b/frontend/src/components/modals/PluginInstallModal.tsx
@@ -2,7 +2,7 @@ import { ConfirmModal, Navigation, QuickAccessTab } from 'decky-frontend-lib';
import { FC, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import TPluginInstallModal, { TranslatedPart } from './TPluginInstallModal';
+import TranslationHelper, { TranslationClass } from '../../utils/TranslationHelper';
interface PluginInstallModalProps {
artifact: string;
@@ -39,21 +39,47 @@ const PluginInstallModal: FC<PluginInstallModalProps> = ({
onCancel={async () => {
await onCancel();
}}
- strTitle={<TPluginInstallModal trans_part={TranslatedPart.TITLE} trans_type={installType} artifact={artifact} />}
+ strTitle={
+ <div>
+ <TranslationHelper
+ trans_class={TranslationClass.PLUGIN_INSTALL_MODAL}
+ trans_text="title"
+ i18n_args={{ artifact: artifact }}
+ install_type={installType}
+ />
+ </div>
+ }
strOKButtonText={
loading ? (
- <TPluginInstallModal trans_part={TranslatedPart.BUTTON_PROC} trans_type={installType} />
+ <div>
+ <TranslationHelper
+ trans_class={TranslationClass.PLUGIN_INSTALL_MODAL}
+ trans_text="button_processing"
+ install_type={installType}
+ />
+ </div>
) : (
- <TPluginInstallModal trans_part={TranslatedPart.BUTTON_IDLE} trans_type={installType} />
+ <div>
+ <TranslationHelper
+ trans_class={TranslationClass.PLUGIN_INSTALL_MODAL}
+ trans_text="button_idle"
+ install_type={installType}
+ />
+ </div>
)
}
>
- <TPluginInstallModal
- trans_part={TranslatedPart.DESC}
- trans_type={installType}
- artifact={artifact}
- version={version ? version : ''}
- />
+ <div>
+ <TranslationHelper
+ trans_class={TranslationClass.PLUGIN_INSTALL_MODAL}
+ trans_text="desc"
+ i18n_args={{
+ artifact: artifact,
+ version: version,
+ }}
+ install_type={installType}
+ />
+ </div>
{hash == 'False' && <span style={{ color: 'red' }}>{t('PluginInstallModal.no_hash')}</span>}
</ConfirmModal>
);