From 262e9acc031203ddda67d4d6b3de24888d280a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20Rio?= Date: Fri, 2 Nov 2018 13:09:08 +0700 Subject: [PATCH] Add translate PopoverFilter --- client/src/__locales/vi.js | 3 +++ client/src/components/ui/PopoverFilter.js | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/__locales/vi.js b/client/src/__locales/vi.js index 4831f78c..28bb429c 100644 --- a/client/src/__locales/vi.js +++ b/client/src/__locales/vi.js @@ -116,5 +116,8 @@ export default { Source: 'Nguồn', 'Found in the known domains database.': 'Tìm thấy trong cơ sở dữ liệu tên miền', Category: 'Thể loại', + // Popover filter + Rule: 'Quy tắc', + Filter: 'Bộ lọc', }, }; diff --git a/client/src/components/ui/PopoverFilter.js b/client/src/components/ui/PopoverFilter.js index 9eb041dc..965ba320 100644 --- a/client/src/components/ui/PopoverFilter.js +++ b/client/src/components/ui/PopoverFilter.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { Trans , withNamespaces } from 'react-i18next'; import './Popover.css'; @@ -13,10 +14,10 @@ class PopoverFilter extends Component {
- Rule: {this.props.rule} + Rule: {this.props.rule}
{this.props.filter &&
- Filter: {this.props.filter} + Filter: {this.props.filter}
}
@@ -30,4 +31,4 @@ PopoverFilter.propTypes = { filter: PropTypes.string, }; -export default PopoverFilter; +export default withNamespaces()(PopoverFilter);