mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Localize import account warning messages (#11910)
This commit is contained in:
parent
472cf17bda
commit
dc3e74a66a
@ -1044,6 +1044,9 @@
|
||||
"importAccount": {
|
||||
"message": "Import Account"
|
||||
},
|
||||
"importAccountError": {
|
||||
"message": "Error importing account."
|
||||
},
|
||||
"importAccountLinkText": {
|
||||
"message": "import using Secret Recovery Phrase"
|
||||
},
|
||||
|
@ -102,9 +102,10 @@ class JsonImportSubview extends Component {
|
||||
setSelectedAddress,
|
||||
} = this.props;
|
||||
const { fileContents } = this.state;
|
||||
const { t } = this.context;
|
||||
|
||||
if (!fileContents) {
|
||||
const message = this.context.t('needImportFile');
|
||||
const message = t('needImportFile');
|
||||
displayWarning(message);
|
||||
return;
|
||||
}
|
||||
@ -124,7 +125,7 @@ class JsonImportSubview extends Component {
|
||||
});
|
||||
displayWarning(null);
|
||||
} else {
|
||||
displayWarning('Error importing account.');
|
||||
displayWarning(t('importAccountError'));
|
||||
this.context.metricsEvent({
|
||||
eventOpts: {
|
||||
category: 'Accounts',
|
||||
|
@ -38,6 +38,7 @@ class PrivateKeyImportView extends Component {
|
||||
setSelectedAddress,
|
||||
firstAddress,
|
||||
} = this.props;
|
||||
const { t } = this.context;
|
||||
|
||||
importNewAccount('Private Key', [privateKey])
|
||||
.then(({ selectedAddress }) => {
|
||||
@ -52,7 +53,7 @@ class PrivateKeyImportView extends Component {
|
||||
history.push(mostRecentOverviewPage);
|
||||
displayWarning(null);
|
||||
} else {
|
||||
displayWarning('Error importing account.');
|
||||
displayWarning(t('importAccountError'));
|
||||
this.context.metricsEvent({
|
||||
eventOpts: {
|
||||
category: 'Accounts',
|
||||
|
Loading…
Reference in New Issue
Block a user