diff --git a/public/locales/en/auth.json b/public/locales/en/auth.json index 36d2329..26cab11 100644 --- a/public/locales/en/auth.json +++ b/public/locales/en/auth.json @@ -1,6 +1,9 @@ { - "account_many": "accounts", - "account_one": "account", + "account": { + "your": "your account", + "account_many": "accounts", + "account_one": "account" + }, "advanced_users": "for advanced users", "apikey": { "alternative": "alternative: File select", @@ -14,7 +17,7 @@ "build_version": "build version", "create_account": "create account", "download_account": "download account", - "keep_secure": "Keep your account file secure", + "keep_secure": "keep your account file secure", "node": { "choose": "choose custom node", "custom_many": "custom nodes", @@ -26,7 +29,9 @@ "password": "password", "password_confirmation": "confirm password", "return_to_list": "return to list", - "wallet_password_confirmation": "confirm wallet password", - "wallet_password": "wallet password", + "wallet": { + "password_confirmation": "confirm wallet password", + "password": "wallet password" + }, "welcome": "welcome to" } diff --git a/public/locales/en/core.json b/public/locales/en/core.json index 9e576e6..69aafd9 100644 --- a/public/locales/en/core.json +++ b/public/locales/en/core.json @@ -1,13 +1,17 @@ { "add": "add", - "backup_wallet": "backup wallet", "cancel": "cancel", "choose": "choose", "close": "close", "continue": "continue", + "core": { + "block_height": "block height", + "information": "core information", + "peers": "connected peers", + "version": "core version" + }, "description": "description", "edit": "edit", - "last_height": "last height", "loading": "loading...", "logout": "logout", @@ -18,14 +22,21 @@ "result": { "error": { "generic": "an error occurred", - "save_qdn": "Unable to save to QDN" + "incorrect_password": "incorrect password", + "save_qdn": "unable to save to QDN" + }, + "status": { + "minting": "(minting)", + "not_minting": "(not minting)", + "synchronized": "synchronized", + "synchronizing": "synchronizing" }, "success": { - "publish_qdn": "Sucessfully published to QDN" + "publish_qdn": "successfully published to QDN" } }, "save_options": { - "publish_qdn": "Would you like to publish your settings to QDN (encrypted)?", + "publish_qdn": "would you like to publish your settings to QDN (encrypted)?", "save": "save" }, "settings": "settings", @@ -36,9 +47,11 @@ }, "title": "title", "tutorial": "tutorial", - "your_account": "your account", "user_lookup": "user lookup", - "wallet": "wallet", - "wallet_other": "wallets", + "wallet": { + "backup_wallet": "backup wallet", + "wallet": "wallet", + "wallet_other": "wallets" + }, "welcome": "welcome" } diff --git a/public/locales/es/auth.json b/public/locales/es/auth.json index 93fd943..9cf1910 100644 --- a/public/locales/es/auth.json +++ b/public/locales/es/auth.json @@ -14,7 +14,7 @@ "build_version": "versión de compilación", "create_account": "crear cuenta", "download_account": "descargar cuenta", - "keep_secure": "Mantén tu archivo de cuenta seguro", + "keep_secure": "mantén tu archivo de cuenta seguro", "node": { "choose": "elegir nodo personalizado", "custom_many": "nodos personalizados", diff --git a/src/App.tsx b/src/App.tsx index 0e7733a..ba57d99 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1713,7 +1713,7 @@ function App() { textTransform: 'uppercase', }} > - {t('core:your_account')} + {t('auth:account.your')} } placement="left" @@ -2640,7 +2640,7 @@ function App() { <> - {t('auth:wallet_password', { postProcess: 'capitalize' })} + {t('auth:wallet.password', { postProcess: 'capitalize' })} @@ -2751,7 +2751,7 @@ function App() { {!walletToBeDownloaded && ( <> - {t('auth:wallet_password_confirmation', { + {t('auth:wallet.password_confirmation', { postProcess: 'capitalize', })} diff --git a/src/ExtStates/NotAuthenticated.tsx b/src/ExtStates/NotAuthenticated.tsx index e4fb90f..28892a9 100644 --- a/src/ExtStates/NotAuthenticated.tsx +++ b/src/ExtStates/NotAuthenticated.tsx @@ -522,7 +522,7 @@ export const NotAuthenticated = ({ } > setExtstate('wallets')}> - {t('auth:account_many', { postProcess: 'capitalize' })} + {t('auth:account.account_many', { postProcess: 'capitalize' })} diff --git a/src/components/CoreSyncStatus.tsx b/src/components/CoreSyncStatus.tsx index 585b2e0..f77580c 100644 --- a/src/components/CoreSyncStatus.tsx +++ b/src/components/CoreSyncStatus.tsx @@ -5,11 +5,14 @@ import syncingImg from '../assets/syncStatus/syncing.png'; import { getBaseApiReact } from '../App'; import '../styles/CoreSyncStatus.css'; import { useTheme } from '@mui/material'; +import { useTranslation } from 'react-i18next'; export const CoreSyncStatus = () => { const [nodeInfos, setNodeInfos] = useState({}); const [coreInfos, setCoreInfos] = useState({}); const [isUsingGateway, setIsUsingGateway] = useState(false); + + const { t } = useTranslation(['auth', 'core']); const theme = useTheme(); useEffect(() => { @@ -72,25 +75,25 @@ export const CoreSyncStatus = () => { : ''; let imagePath = syncingImg; - let message = `Synchronizing`; + let message = t('core:status.synchronizing', { postProcess: 'capitalize' }); if (isMintingPossible && !isUsingGateway) { imagePath = syncedMintingImg; - message = `${isSynchronizing ? 'Synchronizing' : 'Synchronized'} ${'(Minting)'}`; + message = `${t(`core:result.status.${isSynchronizing ? 'synchronizing' : 'synchronized'}`, { postProcess: 'capitalize' })} ${t('core:result.status.minting')}`; } else if (isSynchronizing === true && syncPercent === 99) { imagePath = syncingImg; } else if (isSynchronizing && !isMintingPossible && syncPercent === 100) { imagePath = syncingImg; - message = `Synchronizing ${isUsingGateway ? '' : '(Not Minting)'}`; + message = `${t('core:result.status.synchronizing', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:result.status.not_minting') : ''}`; } else if (!isSynchronizing && !isMintingPossible && syncPercent === 100) { imagePath = syncedImg; - message = `Synchronized ${isUsingGateway ? '' : '(Not Minting)'}`; + message = `${t('core:result.status.synchronized', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:result.status.not_minting') : ''}`; } else if (isSynchronizing && isMintingPossible && syncPercent === 100) { imagePath = syncingImg; - message = `Synchronizing ${isUsingGateway ? '' : '(Minting)'}`; + message = `${t('core:result.status.synchronizing', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:result.status.minting') : ''}`; } else if (!isSynchronizing && isMintingPossible && syncPercent === 100) { imagePath = syncedMintingImg; - message = `Synchronized ${isUsingGateway ? '' : '(Minting)'}`; + message = `${t('core:result.status.synchronized', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:result.status.minting') : ''}`; } return ( @@ -115,24 +118,24 @@ export const CoreSyncStatus = () => { top: '10px', }} > -

Core Information

+

{t('core:core.information', { postProcess: 'capitalize' })}

- Core Version:{' '} + {t('core:core.version', { postProcess: 'capitalize' })}:{' '} {buildVersion}

{message}

- Block Height:{' '} + {t('core:core.block_height', { postProcess: 'capitalize' })}:{' '} {height || ''}

- Connected Peers:{' '} + {t('core:core.peers', { postProcess: 'capitalize' })}:{' '} {numberOfConnections || ''}

- Using public node:{' '} + {t('auth:node.using_public', { postProcess: 'capitalize' })}:{' '} {isUsingGateway?.toString()}