mirror of
https://github.com/strapi/strapi.git
synced 2025-11-17 10:38:30 +00:00
Make notifications message translatable
This commit is contained in:
parent
3c827eb5e3
commit
a36ef36cc1
@ -1,10 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Notification
|
* Notification
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import styles from './styles.scss';
|
import styles from './styles.scss';
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ class Notification extends React.Component { // eslint-disable-line react/prefer
|
|||||||
<icon className={`ion ${options.icon} ${styles.notificationIcon}`}></icon>
|
<icon className={`ion ${options.icon} ${styles.notificationIcon}`}></icon>
|
||||||
<p className={styles.notificationContent}>
|
<p className={styles.notificationContent}>
|
||||||
<span className={styles.notificationTitle}>{options.title}: </span>
|
<span className={styles.notificationTitle}>{options.title}: </span>
|
||||||
<span>{this.props.notification.message}</span>
|
<span><FormattedMessage id={this.props.notification.message} /></span>
|
||||||
</p>
|
</p>
|
||||||
<icon className={`ion ion-ios-close-empty pull-right ${styles.notificationClose}`} onClick={this.onCloseClicked}></icon>
|
<icon className={`ion ion-ios-close-empty pull-right ${styles.notificationClose}`} onClick={this.onCloseClicked}></icon>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -44,4 +44,4 @@
|
|||||||
"npm": ">= 5.3.0"
|
"npm": ">= 5.3.0"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user