Convert i18n resource to key type

This commit is contained in:
Hoàng Rio 2018-11-09 13:51:28 +07:00
parent beab9a1be0
commit d47a23269d
No known key found for this signature in database
GPG key ID: B19526CDE69535A1
22 changed files with 389 additions and 366 deletions
client/src/components/Dashboard

View file

@ -26,12 +26,12 @@ class Dashboard extends Component {
getToggleFilteringButton = () => {
const { protectionEnabled } = this.props.dashboard;
const buttonText = protectionEnabled ? 'Disable' : 'Enable';
const buttonText = protectionEnabled ? 'disable_protection' : 'enable_protection';
const buttonClass = protectionEnabled ? 'btn-gray' : 'btn-success';
return (
<button type="button" className={`btn btn-sm mr-2 ${buttonClass}`} onClick={() => this.props.toggleProtection(protectionEnabled)}>
<Trans>{buttonText} protection</Trans>
<Trans>{buttonText}</Trans>
</button>
);
}
@ -44,12 +44,12 @@ class Dashboard extends Component {
dashboard.processingStatsHistory ||
dashboard.processingTopStats;
const refreshFullButton = <button type="button" className="btn btn-outline-primary btn-sm" onClick={() => this.getAllStats()}><Trans>Refresh statistics</Trans></button>;
const refreshFullButton = <button type="button" className="btn btn-outline-primary btn-sm" onClick={() => this.getAllStats()}><Trans>refresh_statics</Trans></button>;
const refreshButton = <button type="button" className="btn btn-outline-primary btn-sm card-refresh" onClick={() => this.getAllStats()} />;
return (
<Fragment>
<PageTitle title={ t('Dashboard') }>
<PageTitle title={ t('dashboard') }>
<div className="page-title__actions">
{this.getToggleFilteringButton()}
{refreshFullButton}