diff --git a/public/locales/en/auth.json b/public/locales/en/auth.json index d68032f..02c348d 100644 --- a/public/locales/en/auth.json +++ b/public/locales/en/auth.json @@ -2,12 +2,23 @@ "account_many": "accounts", "account_one": "account", "advanced_users": "for advanced users", + "apikey": { + "alternative": "alternative: File select", + "change": "change APIkey", + "enter": "enter APIkey", + "import": "import APIkey", + "key": "API key", + "select_valid": "select a valid apikey" + }, "build_version": "build version", - "change_apikey": "change APIkey", - "choose_custom_node": "choose custom node", "create_account": "create account", - "import_key": "import APIkey", - "use_local_node": "use local node", - "using_node": "using node", + "return_to_list": "return to list", + "node": { + "choose": "choose custom node", + "custom_many": "custom nodes", + "use_custom": "use custom node", + "use_local": "use local node", + "using": "using node" + }, "welcome": "welcome to" } diff --git a/public/locales/en/core.json b/public/locales/en/core.json index 042d80f..bfc8b94 100644 --- a/public/locales/en/core.json +++ b/public/locales/en/core.json @@ -1,7 +1,11 @@ { + "add": "add", "cancel": "cancel", "choose": "choose", + "close": "close", "description": "description", + "edit": "edit", + "error": "an error occurred", "save": "save", "title": "title" } diff --git a/public/locales/it/auth.json b/public/locales/it/auth.json index fa99817..306bd0f 100644 --- a/public/locales/it/auth.json +++ b/public/locales/it/auth.json @@ -2,12 +2,23 @@ "account_many": "account", "account_one": "account", "advanced_users": "per utenti avanzati", + "apikey": { + "alternative": "alternativa: seleziona un file", + "change": "cambia la chiave API", + "enter": "inserisci la chiave API", + "import": "importa chiave API", + "key": "chiave API", + "select_valid": "selezione una chiave API valida" + }, + "node": { + "choose": "scegli un nodo custom", + "custom_many": "nodi custom", + "use_custom": "use nodo custom", + "use_local": "usa nodo locale", + "using": "nodo in uso" + }, "build_version": "versione build", - "change_apikey": "cambia la chiave API", - "choose_custom_node": "scegli un nodo custom", "create_account": "crea un account", - "import_key": "importa chiave API", - "use_local_node": "usa nodo locale", - "using_node": "nodo in uso", + "return_to_list": "ritorna alla lista", "welcome": "benvenuto in" } diff --git a/public/locales/it/core.json b/public/locales/it/core.json index 2ee28d1..3bbac5b 100644 --- a/public/locales/it/core.json +++ b/public/locales/it/core.json @@ -1,7 +1,11 @@ { + "add": "aggiungi", "cancel": "cancella", "choose": "scegli", + "close": "chiudi", "description": "descrizione", + "edit": "modifica", + "error": "si รจ verificato un errore", "save": "salva", "title": "titolo" } diff --git a/src/ExtStates/NotAuthenticated.tsx b/src/ExtStates/NotAuthenticated.tsx index b395a50..44886e7 100644 --- a/src/ExtStates/NotAuthenticated.tsx +++ b/src/ExtStates/NotAuthenticated.tsx @@ -40,8 +40,8 @@ export const HtmlTooltip = styled(({ className, ...props }: TooltipProps) => ( ))(({ theme }) => ({ [`& .${tooltipClasses.tooltip}`]: { - backgroundColor: '#232428', - color: 'white', + backgroundColor: theme.palette.background.paper, + color: theme.palette.text.primary, maxWidth: 320, padding: '20px', fontSize: theme.typography.pxToRem(12), @@ -350,7 +350,7 @@ export const NotAuthenticated = ({ .catch((error) => { console.error( 'Failed to set API key:', - error.message || 'An error occurred' + error.message || t('core:error', { postProcess: 'capitalize' }) ); }); } else { @@ -359,7 +359,9 @@ export const NotAuthenticated = ({ if (!fromStartUp) { setInfoSnack({ type: 'error', - message: 'Select a valid apikey', + message: t('auth:apikey.select_valid', { + postProcess: 'capitalize', + }), }); setOpenSnack(true); } @@ -382,7 +384,10 @@ export const NotAuthenticated = ({ .catch((error) => { console.error( 'Failed to set API key:', - error.message || 'An error occurred' + error.message || + t('core:error', { + postProcess: 'capitalize', + }) ); }); return; @@ -390,7 +395,11 @@ export const NotAuthenticated = ({ if (!fromStartUp) { setInfoSnack({ type: 'error', - message: error?.message || 'Select a valid apikey', + message: + error?.message || + t('auth:apikey.select_valid', { + postProcess: 'capitalize', + }), }); setOpenSnack(true); } @@ -507,7 +516,8 @@ export const NotAuthenticated = ({ transaction you make is linked to your ID, and this is where you manage all your QORT and other tradeable cryptocurrencies on Qortal. - + {' '} + // TODO translate } > @@ -538,7 +548,8 @@ export const NotAuthenticated = ({ }} > New users start here! - + {' '} + // TODO translate + {' '} + // TODO translate } > @@ -582,7 +594,7 @@ export const NotAuthenticated = ({ visibility: !useLocalNode && 'hidden', }} > - {t('auth:using_node', { postProcess: 'capitalize' })}:{' '} + {t('auth:node.using', { postProcess: 'capitalize' })}:{' '} {currentNode?.url} @@ -635,7 +647,7 @@ export const NotAuthenticated = ({ }, '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { - backgroundColor: 'white', // Change track color when checked + backgroundColor: theme.palette.background.default, }, }} checked={useLocalNode} @@ -666,7 +678,11 @@ export const NotAuthenticated = ({ disabled={false} /> } - label={`Use ${isLocal ? 'Local' : 'Custom'} Node`} + label={ + isLocal + ? t('auth:node.use_local', { postProcess: 'capitalize' }) + : t('auth:node.use_custom', { postProcess: 'capitalize' }) + } /> {currentNode?.url === 'http://127.0.0.1:12391' && ( @@ -677,14 +693,19 @@ export const NotAuthenticated = ({ variant="contained" component="label" > - {apiKey ? 'Change ' : 'Import '} apikey + {apiKey + ? t('auth:node.use_local', { postProcess: 'capitalize' }) + : t('auth:apikey.import', { postProcess: 'capitalize' })} {`api key : ${importedApiKey}`} + > + {t('auth:apikey.key', { postProcess: 'capitalize' })}: $ + {importedApiKey} + )} @@ -709,6 +730,7 @@ export const NotAuthenticated = ({ + - {'Custom nodes'} + + {' '} + {t('auth:node.custom_many', { postProcess: 'capitalize' })}: + @@ -807,7 +832,7 @@ export const NotAuthenticated = ({ > @@ -850,8 +875,9 @@ export const NotAuthenticated = ({ }} variant="contained" > - Choose + {t('core:choose', { postProcess: 'capitalize' })} + + @@ -920,13 +946,13 @@ export const NotAuthenticated = ({ }} autoFocus > - Close + {t('core:close', { postProcess: 'capitalize' })} )} {mode === 'list' && ( )} @@ -939,7 +965,7 @@ export const NotAuthenticated = ({ setCustomNodeToSaveIndex(null); }} > - Return to list + {t('auth:return_to_list', { postProcess: 'capitalize' })} )} @@ -962,7 +988,9 @@ export const NotAuthenticated = ({ aria-labelledby="alert-dialog-title" aria-describedby="alert-dialog-description" > - {'Enter apikey'} + + {t('auth:enter_apikey', { postProcess: 'capitalize' })} + - Alternative: File select + {t('auth:apikey_alternative', { postProcess: 'capitalize' })} - Close + {t('core:close', { postProcess: 'capitalize' })}