Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translate to Filter ReactTable #543

Merged
merged 2 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/src/__locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"unblock_btn": "Unblock",
"block_btn": "Block",
"time_table_header": "Time",
"url_added_successfully": "Url added successfully",
"domain_name_table_header": "Domain name",
"type_table_header": "Type",
"response_table_header": "Response",
Expand Down
3 changes: 2 additions & 1 deletion client/src/__locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,6 @@
"found_in_known_domain_db": "T\u00ecm th\u1ea5y trong c\u01a1 s\u1edf d\u1eef li\u1ec7u t\u00ean mi\u1ec1n",
"category_label": "Th\u1ec3 lo\u1ea1i",
"rule_label": "Quy t\u1eafc",
"filter_label": "B\u1ed9 l\u1ecdc"
"filter_label": "B\u1ed9 l\u1ecdc",
"url_added_successfully": "Th\u00eam b\u1ed9 l\u1ecdc th\u00e0nh c\u00f4ng"
}
9 changes: 8 additions & 1 deletion client/src/components/Filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ class Filters extends Component {
columns={this.columns}
showPagination={true}
defaultPageSize={10}
noDataText={ t('no_filters_added') }
minRows={4} // TODO find out what to show if rules.length is 0
// Text
previousText={ t('previous_btn') }
nextText={ t('next_btn') }
loadingText={ t('loading_table_status') }
pageText={ t('page_table_footer_text') }
ofText={ t('of_table_footer_text') }
rowsText={ t('rows_table_footer_text') }
noDataText={ t('no_filters_added') }
/>
<div className="card-actions">
<button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>add_filter_btn</Trans></button>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ui/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Modal extends Component {
}
return (
<div className="description">
<Trans>Url added successfully</Trans>
<Trans>url_added_successfully</Trans>
</div>
);
};
Expand Down