Update missing trasnlate

This commit is contained in:
Hoàng Rio 2018-11-05 11:26:32 +07:00
parent cd75c406c1
commit 9cd7a37646
No known key found for this signature in database
GPG Key ID: B19526CDE69535A1
2 changed files with 6 additions and 2 deletions

View File

@ -112,6 +112,9 @@ export default {
Page: 'Trang', Page: 'Trang',
of: 'của', of: 'của',
rows: 'hàng', rows: 'hàng',
'Updated the custom filtering rules': 'Đã cập nhật quy tắc lọc tuỳ chỉnh',
'Rule removed from the custom filtering rules': 'Quy tắc đã được xoá khỏi quy tắc lọc tuỳ chỉnh',
'Rule added to the custom filtering rules': 'Quy tắc đã được thêm vào quy tắc lọc tuỳ chỉnh',
// Popover // Popover
Source: 'Nguồn', Source: 'Nguồn',
'Found in the known domains database.': 'Tìm thấy trong cơ sở dữ liệu tên miền', 'Found in the known domains database.': 'Tìm thấy trong cơ sở dữ liệu tên miền',

View File

@ -46,6 +46,7 @@ class Logs extends Component {
toggleBlocking = (type, domain) => { toggleBlocking = (type, domain) => {
const { userRules } = this.props.filtering; const { userRules } = this.props.filtering;
const { t } = this.props;
const lineEnding = !endsWith(userRules, '\n') ? '\n' : ''; const lineEnding = !endsWith(userRules, '\n') ? '\n' : '';
const baseRule = `||${domain}^$important`; const baseRule = `||${domain}^$important`;
const baseUnblocking = `@@${baseRule}`; const baseUnblocking = `@@${baseRule}`;
@ -56,10 +57,10 @@ class Logs extends Component {
if (userRules.match(preparedBlockingRule)) { if (userRules.match(preparedBlockingRule)) {
this.props.setRules(userRules.replace(`${blockingRule}`, '')); this.props.setRules(userRules.replace(`${blockingRule}`, ''));
this.props.addSuccessToast(`Rule removed from the custom filtering rules: ${blockingRule}`); this.props.addSuccessToast(`${t('Rule removed from the custom filtering rules')}: ${blockingRule}`);
} else if (!userRules.match(preparedUnblockingRule)) { } else if (!userRules.match(preparedUnblockingRule)) {
this.props.setRules(`${userRules}${lineEnding}${unblockingRule}\n`); this.props.setRules(`${userRules}${lineEnding}${unblockingRule}\n`);
this.props.addSuccessToast(`Rule added to the custom filtering rules: ${unblockingRule}`); this.props.addSuccessToast(`${t('Rule added to the custom filtering rules')}: ${unblockingRule}`);
} }
this.props.getFilteringStatus(); this.props.getFilteringStatus();