diff --git a/apps/remix-ide/src/app/tabs/locales/en/udapp.json b/apps/remix-ide/src/app/tabs/locales/en/udapp.json index 4119e70ac2..343be96a60 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/udapp.json @@ -38,6 +38,16 @@ "udapp.enterAMessageToSign": "Enter a message to sign", "udapp.hash": "hash", "udapp.signature": "signature", + "udapp.injectedTitle": "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type).", + "udapp.createNewAccount": "Create a new account", + "udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.", + "udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).", + "udapp.text1": "Please provide a Passphrase for the account creation", + "udapp.tooltipText1": "Account list is empty, please make sure the current provider is properly connected to remix", + "udapp.modalTitle1": "Passphrase to sign a message", + "udapp.modalMessage1": "Enter your passphrase for this account to sign the message", + "udapp.copyAccount": "Copy account to clipboard", + "udapp.signMsgUsingAccount": "Sign a message using this account", "udapp._comment_environment.tsx": "libs/remix-ui/run-tab/src/lib/components/environment.tsx", "udapp.environment": "Environment", diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index f28e61d0d7..86e6132ca7 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -26,36 +26,35 @@ export function AccountUI(props: AccountProps) { case 'injected': setPlusOpt({ classList: 'udapp_disableMouseEvents', - title: - "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type)." + title: intl.formatMessage({id: 'udapp.injectedTitle'}) }) break case 'vm-merge': setPlusOpt({ classList: '', - title: 'Create a new account' + title: intl.formatMessage({id: 'udapp.createNewAccount'}) }) break case 'vm-london': setPlusOpt({ classList: '', - title: 'Create a new account' + title: intl.formatMessage({id: 'udapp.createNewAccount'}) }) break case 'vm-berlin': setPlusOpt({ classList: '', - title: 'Create a new account' + title: intl.formatMessage({id: 'udapp.createNewAccount'}) }) break case 'vm-shanghai': setPlusOpt({ classList: '', - title: 'Create a new account' + title: intl.formatMessage({id: 'udapp.createNewAccount'}) }) break @@ -63,12 +62,12 @@ export function AccountUI(props: AccountProps) { if (!props.personalMode) { setPlusOpt({ classList: 'disableMouseEvents', - title: 'Creating an account is possible only in Personal mode. Please go to Settings to enable it.' + title: intl.formatMessage({id: 'udapp.web3Title'}) }) } else { setPlusOpt({ classList: '', - title: 'Create a new account' + title: intl.formatMessage({id: 'udapp.createNewAccount'}) }) } break @@ -76,7 +75,7 @@ export function AccountUI(props: AccountProps) { default: setPlusOpt({ classList: 'disableMouseEvents', - title: `Unfortunately it's not possible to create an account using an external wallet (${props.selectExEnv}).` + title: intl.formatMessage({id: 'udapp.defaultTitle'}, {selectExEnv: props.selectExEnv}) }) } // this._deps.config.get('settings/personal-mode') @@ -88,28 +87,28 @@ export function AccountUI(props: AccountProps) { const signMessage = () => { if (!accounts[0]) { - return props.tooltip('Account list is empty, please make sure the current provider is properly connected to remix') + return props.tooltip(intl.formatMessage({id: 'udapp.tooltipText1'})) } if (props.selectExEnv === 'web3') { return props.modal( - 'Passphrase to sign a message', - , - 'OK', + intl.formatMessage({id: 'udapp.modalTitle1'}), + , + intl.formatMessage({id: 'udapp.ok'}), () => { props.modal( intl.formatMessage({id: 'udapp.signAMessage'}), signMessagePrompt(), - 'OK', + intl.formatMessage({id: 'udapp.ok'}), () => { props.signMessageWithAddress(selectedAccount, messageRef.current, signedMessagePrompt, props.passphrase) props.setPassphrase('') }, - 'Cancel', + intl.formatMessage({id: 'udapp.cancel'}), null ) }, - 'Cancel', + intl.formatMessage({id: 'udapp.cancel'}), () => { props.setPassphrase('') } @@ -119,11 +118,11 @@ export function AccountUI(props: AccountProps) { props.modal( intl.formatMessage({id: 'udapp.signAMessage'}), signMessagePrompt(), - 'OK', + intl.formatMessage({id: 'udapp.ok'}), () => { props.signMessageWithAddress(selectedAccount, messageRef.current, signedMessagePrompt) }, - 'Cancel', + intl.formatMessage({id: 'udapp.cancel'}), null ) } @@ -143,7 +142,7 @@ export function AccountUI(props: AccountProps) { const passphraseCreationPrompt = () => { return (
- Please provide a Passphrase for the account creation +
@@ -216,9 +215,9 @@ export function AccountUI(props: AccountProps) { ))}
- +
- + }>