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": {
|
"importAccount": {
|
||||||
"message": "Import Account"
|
"message": "Import Account"
|
||||||
},
|
},
|
||||||
|
"importAccountError": {
|
||||||
|
"message": "Error importing account."
|
||||||
|
},
|
||||||
"importAccountLinkText": {
|
"importAccountLinkText": {
|
||||||
"message": "import using Secret Recovery Phrase"
|
"message": "import using Secret Recovery Phrase"
|
||||||
},
|
},
|
||||||
|
@ -102,9 +102,10 @@ class JsonImportSubview extends Component {
|
|||||||
setSelectedAddress,
|
setSelectedAddress,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { fileContents } = this.state;
|
const { fileContents } = this.state;
|
||||||
|
const { t } = this.context;
|
||||||
|
|
||||||
if (!fileContents) {
|
if (!fileContents) {
|
||||||
const message = this.context.t('needImportFile');
|
const message = t('needImportFile');
|
||||||
displayWarning(message);
|
displayWarning(message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -124,7 +125,7 @@ class JsonImportSubview extends Component {
|
|||||||
});
|
});
|
||||||
displayWarning(null);
|
displayWarning(null);
|
||||||
} else {
|
} else {
|
||||||
displayWarning('Error importing account.');
|
displayWarning(t('importAccountError'));
|
||||||
this.context.metricsEvent({
|
this.context.metricsEvent({
|
||||||
eventOpts: {
|
eventOpts: {
|
||||||
category: 'Accounts',
|
category: 'Accounts',
|
||||||
|
@ -38,6 +38,7 @@ class PrivateKeyImportView extends Component {
|
|||||||
setSelectedAddress,
|
setSelectedAddress,
|
||||||
firstAddress,
|
firstAddress,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
const { t } = this.context;
|
||||||
|
|
||||||
importNewAccount('Private Key', [privateKey])
|
importNewAccount('Private Key', [privateKey])
|
||||||
.then(({ selectedAddress }) => {
|
.then(({ selectedAddress }) => {
|
||||||
@ -52,7 +53,7 @@ class PrivateKeyImportView extends Component {
|
|||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
displayWarning(null);
|
displayWarning(null);
|
||||||
} else {
|
} else {
|
||||||
displayWarning('Error importing account.');
|
displayWarning(t('importAccountError'));
|
||||||
this.context.metricsEvent({
|
this.context.metricsEvent({
|
||||||
eventOpts: {
|
eventOpts: {
|
||||||
category: 'Accounts',
|
category: 'Accounts',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user