From 4aea91a70c1bcc5ffeb93e282f54291ab7d4c28a Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Fri, 28 Dec 2018 19:48:02 +0300 Subject: [PATCH] Refresh status button --- client/src/__locales/en.json | 57 +++++++++--------- client/src/__locales/ja.json | 62 ++++++++++++++------ client/src/__locales/pt-br.json | 28 ++++++++- client/src/__locales/sv.json | 28 ++++++++- client/src/actions/index.js | 5 +- client/src/components/Settings/Dhcp/Form.js | 31 +++++----- client/src/components/Settings/Dhcp/index.js | 46 +++++++++------ 7 files changed, 172 insertions(+), 85 deletions(-) diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index 463ccc1a..243ed012 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -1,4 +1,30 @@ { + "refresh_status": "Refresh status", + "save_config": "Save config", + "enabled_dhcp": "DHCP server enabled", + "disabled_dhcp": "DHCP server disabled", + "dhcp_title": "DHCP server", + "dhcp_description": "If your router does not provide DHCP settings, you can use AdGuard's own built-in DHCP server.", + "dhcp_enable": "Enable DHCP server", + "dhcp_disable": "Disable DHCP server", + "dhcp_not_found": "No active DHCP servers found on the network. It is safe to enable the built-in DHCP server.", + "dhcp_found": "Found active DHCP servers found on the network. It is not safe to enable the built-in DHCP server.", + "dhcp_leases": "DHCP leases", + "dhcp_leases_not_found": "No DHCP leases found", + "dhcp_config_saved": "Saved DHCP server config", + "form_error_required": "Required field", + "form_error_ip_format": "Invalid IPv4 format", + "form_error_positive": "Must be greater than 0", + "dhcp_form_gateway_input": "Gateway IP", + "dhcp_form_subnet_input": "Subnet mask", + "dhcp_form_range_title": "Range of IP addresses", + "dhcp_form_range_start": "Range start", + "dhcp_form_range_end": "Range end", + "dhcp_form_lease_title": "DHCP lease time (in seconds)", + "dhcp_form_lease_input": "Lease duration", + "dhcp_interface_select": "Select DHCP interface", + "dhcp_hardware_address": "Hardware address", + "dhcp_ip_addresses": "IP addresses", "back": "Back", "dashboard": "Dashboard", "settings": "Settings", @@ -89,7 +115,7 @@ "example_upstream_regular": "regular DNS (over UDP)", "example_upstream_dot": "encrypted DNS-over-TLS<\/a>", "example_upstream_doh": "encrypted DNS-over-HTTPS<\/a>", - "example_upstream_sdns": "you can use DNS Stamps for DNSCrypt or DNS-over-HTTPS resolvers", + "example_upstream_sdns": "you can use DNS Stamps<\/a> for DNSCrypt<\/a> or DNS-over-HTTPS<\/a> resolvers", "example_upstream_tcp": "regular DNS (over TCP)", "all_filters_up_to_date_toast": "All filters are already up-to-date", "updated_upstream_dns_toast": "Updated the upstream DNS servers", @@ -127,30 +153,5 @@ "category_label": "Category", "rule_label": "Rule", "filter_label": "Filter", - "unknown_filter": "Unknown filter {{filterId}}", - "refresh_status": "Refresh status", - "save_config": "Save config", - "enabled_dhcp": "DHCP server enabled", - "disabled_dhcp": "DHCP server disabled", - "dhcp_title": "DHCP server", - "dhcp_description": "If your router does not provide DHCP settings, you can use AdGuard's own built-in DHCP server.", - "dhcp_enable": "Enable DHCP server", - "dhcp_disable": "Disable DHCP server", - "dhcp_not_found": "No active DHCP servers found on the network. It is safe to enable the built-in DHCP server.", - "dhcp_leases": "DHCP leases", - "dhcp_leases_not_found": "No DHCP leases found", - "dhcp_config_saved": "Saved DHCP server config", - "form_error_required": "Required field", - "form_error_ip_format": "Invalid IPv4 format", - "form_error_positive": "Must be greater than 0", - "dhcp_form_gateway_input": "Gateway IP", - "dhcp_form_subnet_input": "Subnet mask", - "dhcp_form_range_title": "Range of IP addresses", - "dhcp_form_range_start": "Range start", - "dhcp_form_range_end": "Range end", - "dhcp_form_lease_title": "DHCP lease time (in seconds)", - "dhcp_form_lease_input": "Lease duration", - "dhcp_interface_select": "Select DHCP interface", - "dhcp_hardware_address": "Hardware address", - "dhcp_ip_addresses": "IP addresses" -} + "unknown_filter": "Unknown filter {{filterId}}" +} \ No newline at end of file diff --git a/client/src/__locales/ja.json b/client/src/__locales/ja.json index ab4b766c..5af7af43 100644 --- a/client/src/__locales/ja.json +++ b/client/src/__locales/ja.json @@ -1,10 +1,32 @@ { + "refresh_status": "\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u6700\u65b0\u306b\u3059\u308b", + "save_config": "\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3059\u308b", + "enabled_dhcp": "DHCP\u30b5\u30fc\u30d0\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u305f", + "disabled_dhcp": "DHCP\u30b5\u30fc\u30d0\u3092\u7121\u52b9\u306b\u3057\u307e\u3057\u305f", + "dhcp_title": "DHCP\u30b5\u30fc\u30d0", + "dhcp_description": "\u3042\u306a\u305f\u306e\u30eb\u30fc\u30bf\u304cDHCP\u306e\u8a2d\u5b9a\u3092\u63d0\u4f9b\u3057\u3066\u3044\u306a\u3044\u306e\u306a\u3089\u3001AdGuard\u306b\u5185\u8535\u3055\u308c\u305fDHCP\u30b5\u30fc\u30d0\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002", + "dhcp_enable": "DHCP\u30b5\u30fc\u30d0\u3092\u6709\u52b9\u306b\u3059\u308b", + "dhcp_disable": "DHCP\u30b5\u30fc\u30d0\u3092\u7121\u52b9\u306b\u3059\u308b", + "dhcp_not_found": "\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5185\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308bDHCP\u30b5\u30fc\u30d0\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5185\u8535\u3055\u308c\u305fDHCP\u30b5\u30fc\u30d0\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u5b89\u5168\u3067\u3059\u3002", + "dhcp_leases": "DHCP\u5272\u5f53", + "dhcp_leases_not_found": "DHCP\u5272\u5f53\u306f\u3042\u308a\u307e\u305b\u3093", + "dhcp_config_saved": "DHCP\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f", + "form_error_required": "\u5fc5\u9808\u9805\u76ee\u3067\u3059", + "form_error_ip_format": "IPv4\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093", + "form_error_positive": "0\u3088\u308a\u5927\u304d\u3044\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059", + "dhcp_form_gateway_input": "\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4IP", + "dhcp_form_subnet_input": "\u30b5\u30d6\u30cd\u30c3\u30c8\u30de\u30b9\u30af", + "dhcp_form_range_title": "IP\u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2", + "dhcp_form_range_start": "\u7bc4\u56f2\u306e\u958b\u59cb", + "dhcp_form_range_end": "\u7bc4\u56f2\u306e\u7d42\u4e86", + "dhcp_form_lease_title": "DHCP\u5272\u5f53\u6642\u9593\uff08\u79d2\u5358\u4f4d\uff09", + "dhcp_form_lease_input": "\u5272\u5f53\u671f\u9593", "back": "\u623b\u308b", "dashboard": "\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9", "settings": "\u8a2d\u5b9a", "filters": "\u30d5\u30a3\u30eb\u30bf", "query_log": "\u30af\u30a8\u30ea\u30fb\u30ed\u30b0", - "faq": "FAQ", + "faq": "\u3088\u304f\u3042\u308b\u8cea\u554f", "version": "\u30d0\u30fc\u30b8\u30e7\u30f3", "address": "\u30a2\u30c9\u30ec\u30b9", "on": "\u30aa\u30f3", @@ -16,18 +38,18 @@ "enabled_protection": "\u4fdd\u8b77\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u305f", "disable_protection": "\u4fdd\u8b77\u3092\u7121\u52b9\u306b\u3059\u308b", "disabled_protection": "\u4fdd\u8b77\u3092\u7121\u52b9\u306b\u3057\u307e\u3057\u305f", - "refresh_statics": "\u7d71\u8a08\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b", + "refresh_statics": "\u7d71\u8a08\u30c7\u30fc\u30bf\u3092\u6700\u65b0\u306b\u3059\u308b", "dns_query": "DNS\u30af\u30a8\u30ea", - "blocked_by": "\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305fDNS\u30af\u30a8\u30ea\u30d5\u30a3\u30eb\u30bf", + "blocked_by": "\u30d5\u30a3\u30eb\u30bf\u306b\u3088\u308a\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305fDNS\u30af\u30a8\u30ea", "stats_malware_phishing": "\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305f\u30de\u30eb\u30a6\u30a7\u30a2\uff0f\u30d5\u30a3\u30c3\u30b7\u30f3\u30b0", "stats_adult": "\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305f\u30a2\u30c0\u30eb\u30c8\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8", "stats_query_domain": "\u6700\u3082\u554f\u5408\u305b\u3055\u308c\u305f\u30c9\u30e1\u30a4\u30f3", "for_last_24_hours": "\u904e\u53bb24\u6642\u9593\u4ee5\u5185", - "no_domains_found": "\u30c9\u30e1\u30a4\u30f3\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f", + "no_domains_found": "\u30c9\u30e1\u30a4\u30f3\u60c5\u5831\u306f\u3042\u308a\u307e\u305b\u3093", "requests_count": "\u30ea\u30af\u30a8\u30b9\u30c8\u6570", "top_blocked_domains": "\u6700\u3082\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305f\u30c9\u30e1\u30a4\u30f3", "top_clients": "\u30c8\u30c3\u30d7\u30af\u30e9\u30a4\u30a2\u30f3\u30c8", - "no_clients_found": "\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f", + "no_clients_found": "\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u60c5\u5831\u306f\u3042\u308a\u307e\u305b\u3093", "general_statistics": "\u5168\u822c\u7684\u306a\u7d71\u8a08", "number_of_dns_query_24_hours": "\u904e\u53bb24\u6642\u9593\u306b\u51e6\u7406\u3055\u308c\u305fDNS\u30af\u30a8\u30ea\u306e\u6570", "number_of_dns_query_blocked_24_hours": "\u5e83\u544a\u30d6\u30ed\u30c3\u30af\u30d5\u30a3\u30eb\u30bf\u3068hosts\u30d6\u30ed\u30c3\u30af\u30ea\u30b9\u30c8\u306b\u3088\u3063\u3066\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305fDNS\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u6570", @@ -39,18 +61,18 @@ "average_processing_time_hint": "DNS\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u51e6\u7406\u306b\u304b\u304b\u308b\u5e73\u5747\u6642\u9593\uff08\u30df\u30ea\u79d2\u5358\u4f4d\uff09", "block_domain_use_filters_and_hosts": "\u30d5\u30a3\u30eb\u30bf\u3068hosts\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30c9\u30e1\u30a4\u30f3\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b", "filters_block_toggle_hint": "\u30d5\u30a3\u30eb\u30bf<\/a>\u306e\u8a2d\u5b9a\u3067\u30d6\u30ed\u30c3\u30af\u3059\u308b\u30eb\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002", - "use_adguard_browsing_sec": "AdGuard\u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3Web\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b", - "use_adguard_browsing_sec_hint": "AdGuard Home\u306f\u3001\u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3Web\u30b5\u30fc\u30d3\u30b9\u306b\u3088\u3063\u3066\u30c9\u30e1\u30a4\u30f3\u304c\u30d6\u30e9\u30c3\u30af\u30ea\u30b9\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u3092\u8003\u616e\u3057\u305fAPI\u3092\u4f7f\u7528\u3057\u3066\u30c1\u30a7\u30c3\u30af\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u30c9\u30e1\u30a4\u30f3\u540dSHA256\u30cf\u30c3\u30b7\u30e5\u306e\u77ed\u3044\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u306e\u307f\u304c\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002", - "use_adguard_parental": "AdGuard\u30da\u30a2\u30ec\u30f3\u30bf\u30eb\u30b3\u30f3\u30c8\u30ed\u30fc\u30ebWeb\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b", - "use_adguard_parental_hint": "AdGuard Home\u306f\u3001\u30c9\u30e1\u30a4\u30f3\u306b\u30a2\u30c0\u30eb\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3Web\u30b5\u30fc\u30d3\u30b9\u3068\u540c\u3058\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u306b\u512a\u3057\u3044API\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002", + "use_adguard_browsing_sec": "AdGuard\u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fb\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b", + "use_adguard_browsing_sec_hint": "AdGuard Home\u306f\u3001\u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fb\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u3088\u3063\u3066\u30c9\u30e1\u30a4\u30f3\u304c\u30d6\u30e9\u30c3\u30af\u30ea\u30b9\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u3092\u8003\u616e\u3057\u305fAPI\u3092\u4f7f\u7528\u3057\u3066\u30c1\u30a7\u30c3\u30af\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u30c9\u30e1\u30a4\u30f3\u540dSHA256\u30cf\u30c3\u30b7\u30e5\u306e\u77ed\u3044\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u306e\u307f\u304c\u30b5\u30fc\u30d0\u306b\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002", + "use_adguard_parental": "AdGuard\u30da\u30a2\u30ec\u30f3\u30bf\u30eb\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30fb\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b", + "use_adguard_parental_hint": "AdGuard Home\u306f\u3001\u30c9\u30e1\u30a4\u30f3\u306b\u30a2\u30c0\u30eb\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fb\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3068\u540c\u3058\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u306b\u512a\u3057\u3044API\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002", "enforce_safe_search": "\u30bb\u30fc\u30d5\u30b5\u30fc\u30c1\u3092\u5f37\u5236\u3059\u308b", "enforce_save_search_hint": "AdGuard Home\u306f\u3001Google\u3001Youtube\u3001Bing\u3001Yandex\u306e\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3067\u30bb\u30fc\u30d5\u30b5\u30fc\u30c1\u3092\u5f37\u5236\u3067\u304d\u307e\u3059\u3002", - "no_servers_specified": "\u30b5\u30fc\u30d0\u30fc\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093", + "no_servers_specified": "\u30b5\u30fc\u30d0\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093", "no_settings": "\u8a2d\u5b9a\u306a\u3057", "general_settings": "\u4e00\u822c\u8a2d\u5b9a", - "upstream_dns": "\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0DNS\u30b5\u30fc\u30d0\u30fc", - "upstream_dns_hint": "\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u672a\u5165\u529b\u306e\u307e\u307e\u306b\u3059\u308b\u3068\u3001AdGuard Home\u306fCloudflare DNS<\/a>\u3092\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002DNS over TLS\u30b5\u30fc\u30d0\u30fc\u306b\u306f\u3001\uff62tls:\/\/\u300d\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002", - "test_upstream_btn": "\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc\u3092\u30c6\u30b9\u30c8\u3059\u308b", + "upstream_dns": "\u4e0a\u6d41DNS\u30b5\u30fc\u30d0", + "upstream_dns_hint": "\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u672a\u5165\u529b\u306e\u307e\u307e\u306b\u3059\u308b\u3068\u3001AdGuard Home\u306f\u4e0a\u6d41\u3068\u3057\u3066Cloudflare DNS<\/a>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002DNS over TLS\u30b5\u30fc\u30d0\u306b\u306f\u3001\uff62tls:\/\/\u300d\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002", + "test_upstream_btn": "\u4e0a\u6d41\u30b5\u30fc\u30d0\u3092\u30c6\u30b9\u30c8\u3059\u308b", "apply_btn": "\u9069\u7528\u3059\u308b", "disabled_filtering_toast": "\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u307e\u3057\u305f", "enabled_filtering_toast": "\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u305f", @@ -66,7 +88,7 @@ "rules_count_table_header": "\u30eb\u30fc\u30eb\u6570", "last_time_updated_table_header": "\u6700\u7d42\u66f4\u65b0\u6642\u523b", "actions_table_header": "\u64cd\u4f5c", - "delete_table_action": "\u524a\u9664", + "delete_table_action": "\u524a\u9664\u3059\u308b", "filters_and_hosts": "\u30d5\u30a3\u30eb\u30bf\u3068hosts\u30d6\u30ed\u30c3\u30af\u30ea\u30b9\u30c8", "filters_and_hosts_hint": "AdGuard Home\u306f\u3001\u57fa\u672c\u7684\u306a\u5e83\u544a\u30d6\u30ed\u30c3\u30af\u30eb\u30fc\u30eb\u3068hosts\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u6587\u3092\u7406\u89e3\u3057\u307e\u3059\u3002", "no_filters_added": "\u30d5\u30a3\u30eb\u30bf\u306f\u8ffd\u52a0\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f", @@ -82,17 +104,18 @@ "examples_title": "\u4f8b", "example_meaning_filter_block": "example.org\u30c9\u30e1\u30a4\u30f3\u3068\u305d\u306e\u3059\u3079\u3066\u306e\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b", "example_meaning_filter_whitelist": "example.org\u30c9\u30e1\u30a4\u30f3\u3068\u305d\u306e\u3059\u3079\u3066\u306e\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306e\u30d6\u30ed\u30c3\u30af\u3092\u89e3\u9664\u3059\u308b", - "example_meaning_host_block": "AdGuard Home\u306f\u3001example.org\u30c9\u30e1\u30a4\u30f3\uff08\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3092\u9664\u304f\uff09\u306b\u5bfe\u3057\u3066127.0.0.1\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002", + "example_meaning_host_block": "AdGuard Home\u306f\u3001example.org\u30c9\u30e1\u30a4\u30f3\uff08\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3092\u9664\u304f\uff09\u306b\u5bfe\u3057\u3066127.0.0.1\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002", "example_comment": "! \u3053\u3053\u306b\u306f\u30b3\u30e1\u30f3\u30c8\u304c\u5165\u308a\u307e\u3059", "example_comment_meaning": "\u305f\u3060\u306e\u30b3\u30e1\u30f3\u30c8\u3067\u3059", "example_comment_hash": "# \u3053\u3053\u3082\u30b3\u30e1\u30f3\u30c8\u3067\u3059", "example_upstream_regular": "\u901a\u5e38\u306eDNS\uff08UDP\u3067\u306e\u554f\u3044\u5408\u308f\u305b\uff09", "example_upstream_dot": "\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u308b DNS-over-TLS<\/a>", "example_upstream_doh": "\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u308b DNS-over-HTTPS<\/a>", + "example_upstream_sdns": "DNSCrypt<\/a> \u307e\u305f\u306f DNS-over-HTTPS<\/a> \u30ea\u30be\u30eb\u30d0\u306e\u305f\u3081\u306b DNS Stamps<\/a> \u3092\u4f7f\u3048\u307e\u3059", "example_upstream_tcp": "\u901a\u5e38\u306eDNS\uff08TCP\u3067\u306e\u554f\u3044\u5408\u308f\u305b\uff09", "all_filters_up_to_date_toast": "\u3059\u3079\u3066\u306e\u30d5\u30a3\u30eb\u30bf\u306f\u65e2\u306b\u6700\u65b0\u3067\u3059", - "updated_upstream_dns_toast": "\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0DNS\u30b5\u30fc\u30d0\u30fc\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f", - "dns_test_ok_toast": "\u6307\u5b9a\u3055\u308c\u305fDNS\u30b5\u30fc\u30d0\u30fc\u306f\u6b63\u3057\u304f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059", + "updated_upstream_dns_toast": "\u4e0a\u6d41DNS\u30b5\u30fc\u30d0\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f", + "dns_test_ok_toast": "\u6307\u5b9a\u3055\u308c\u305fDNS\u30b5\u30fc\u30d0\u306f\u6b63\u3057\u304f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059", "dns_test_not_ok_toast": "\u30b5\u30fc\u30d0 \"{{key}}\": \u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u6b63\u3057\u304f\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044", "unblock_btn": "\u30d6\u30ed\u30c3\u30af\u89e3\u9664", "block_btn": "\u30d6\u30ed\u30c3\u30af", @@ -104,7 +127,7 @@ "empty_response_status": "\u672a\u5b9a\u7fa9", "show_all_filter_type": "\u3059\u3079\u3066\u8868\u793a", "show_filtered_type": "\u30d5\u30a3\u30eb\u30bf\u3055\u308c\u305f\u30ed\u30b0\u3092\u8868\u793a", - "no_logs_found": "\u30ed\u30b0\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f", + "no_logs_found": "\u30ed\u30b0\u306f\u3042\u308a\u307e\u305b\u3093", "disabled_log_btn": "\u30ed\u30b0\u3092\u7121\u52b9\u306b\u3059\u308b", "download_log_file_btn": "\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b", "refresh_btn": "\u6700\u65b0\u306b\u3059\u308b", @@ -125,5 +148,6 @@ "found_in_known_domain_db": "\u65e2\u77e5\u306e\u30c9\u30e1\u30a4\u30f3\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002", "category_label": "\u30ab\u30c6\u30b4\u30ea", "rule_label": "\u30eb\u30fc\u30eb", - "filter_label": "\u30d5\u30a3\u30eb\u30bf" + "filter_label": "\u30d5\u30a3\u30eb\u30bf", + "unknown_filter": "\u4e0d\u660e\u306a\u30d5\u30a3\u30eb\u30bf {{filterId}}" } \ No newline at end of file diff --git a/client/src/__locales/pt-br.json b/client/src/__locales/pt-br.json index 91705df6..1467b370 100644 --- a/client/src/__locales/pt-br.json +++ b/client/src/__locales/pt-br.json @@ -1,4 +1,26 @@ { + "refresh_status": "Atualizar status", + "save_config": "Salvar configura\u00e7\u00e3o", + "enabled_dhcp": "Servidor DHCP ativado", + "disabled_dhcp": "Servidor DHCP desativado", + "dhcp_title": "Servidor DHCP", + "dhcp_description": "Se o seu roteador n\u00e3o fornecer configura\u00e7\u00f5es de DHCP, voc\u00ea poder\u00e1 usar o servidor DHCP integrado do AdGuard.", + "dhcp_enable": "Ativar servidor DHCP", + "dhcp_disable": "Desativar servidor DHCP", + "dhcp_not_found": "Nenhum servidor DHCP ativo foi encontrado na sua rede. \u00c9 seguro ativar o servidor DHCP integrado.", + "dhcp_leases": "Concess\u00f5es DHCP", + "dhcp_leases_not_found": "Nenhuma concess\u00e3o DHCP encontrada", + "dhcp_config_saved": "Salvar configura\u00e7\u00f5es do servidor DHCP", + "form_error_required": "Campo obrigat\u00f3rio", + "form_error_ip_format": "formato de endere\u00e7o IPv4 inv\u00e1lido", + "form_error_positive": "Deve ser maior que 0", + "dhcp_form_gateway_input": "IP do gateway", + "dhcp_form_subnet_input": "M\u00e1scara de sub-rede", + "dhcp_form_range_title": "Faixa de endere\u00e7os IP", + "dhcp_form_range_start": "In\u00edcio da faixa", + "dhcp_form_range_end": "Final da faixa", + "dhcp_form_lease_title": "Tempo de concess\u00e3o do DHCP (em segundos)", + "dhcp_form_lease_input": "Dura\u00e7\u00e3o da concess\u00e3o", "back": "Voltar", "dashboard": "Painel", "settings": "Configura\u00e7\u00f5es", @@ -18,7 +40,7 @@ "disabled_protection": "Prote\u00e7\u00e3o desativada", "refresh_statics": "Atualizar estat\u00edsticas", "dns_query": "Consultas de DNS", - "blocked_by": "Bloqueador por Filtros", + "blocked_by": "Bloqueador por filtros", "stats_malware_phishing": "Bloqueado malware\/phishing", "stats_adult": "Bloqueado sites adultos", "stats_query_domain": "Principais dom\u00ednios consultados", @@ -89,6 +111,7 @@ "example_upstream_regular": "DNS regular (atrav\u00e9s do UDP)", "example_upstream_dot": "DNS criptografado atrav\u00e9s do TLS<\/a>", "example_upstream_doh": "DNS criptografado atrav\u00e9s do HTTPS<\/a>", + "example_upstream_sdns": "Voc\u00ea pode usar DNS Stamps<\/a>para oDNSCrypt<\/a>ou usar resolvedoresDNS-sobre-HTTPS<\/a>", "example_upstream_tcp": "DNS regular (atrav\u00e9s do TCP)", "all_filters_up_to_date_toast": "Todos os filtros j\u00e1 est\u00e3o atualizados", "updated_upstream_dns_toast": "Atualizado os servidores DNS upstream", @@ -125,5 +148,6 @@ "found_in_known_domain_db": "Encontrado no banco de dados de dom\u00ednios conhecidos.", "category_label": "Categoria", "rule_label": "Regra", - "filter_label": "Filtro" + "filter_label": "Filtro", + "unknown_filter": "Filtro desconhecido {{filterId}}" } \ No newline at end of file diff --git a/client/src/__locales/sv.json b/client/src/__locales/sv.json index fb75e557..fdea033a 100644 --- a/client/src/__locales/sv.json +++ b/client/src/__locales/sv.json @@ -1,4 +1,26 @@ { + "refresh_status": "Uppdatera status", + "save_config": "Spara inst\u00e4llningar", + "enabled_dhcp": "DHCP-server aktiverad", + "disabled_dhcp": "Dhcp-server avaktiverad", + "dhcp_title": "DHCP-server", + "dhcp_description": "Om din router inte har inst\u00e4llningar f\u00f6r DHCP kan du anv\u00e4nda AdGuards inbyggda server.", + "dhcp_enable": "Aktivera DHCP.-server", + "dhcp_disable": "Avaktivera DHCP-server", + "dhcp_not_found": "Ingen aktiv DHCP-server hittades i n\u00e4tverkat.", + "dhcp_leases": "DHCP-lease", + "dhcp_leases_not_found": "Ingen DHCP-lease hittad", + "dhcp_config_saved": "Sparade inst\u00e4llningar f\u00f6r DHCP-servern", + "form_error_required": "Obligatoriskt f\u00e4lt", + "form_error_ip_format": "Ogiltigt IPv4-format", + "form_error_positive": "M\u00e5ste vara st\u00f6rre \u00e4n noll", + "dhcp_form_gateway_input": "Gateway-IP", + "dhcp_form_subnet_input": "Subnetmask", + "dhcp_form_range_title": "IP-adressgr\u00e4nser", + "dhcp_form_range_start": "Startgr\u00e4ns", + "dhcp_form_range_end": "Gr\u00e4nsslut", + "dhcp_form_lease_title": "DHCP-leasetid (i sekunder)", + "dhcp_form_lease_input": "Leasetid", "back": "Tiilbaka", "dashboard": "Kontrollpanel", "settings": "Inst\u00e4llningar", @@ -18,7 +40,7 @@ "disabled_protection": "Kopplade bort skydd", "refresh_statics": "Uppdatera statistik", "dns_query": "DNS-f\u00f6rfr\u00e5gningar", - "blocked_by": "Blockerat av Filter", + "blocked_by": "Blockerat av filter", "stats_malware_phishing": "Blockerad skadekod\/phising", "stats_adult": "Blockerade vuxensajter", "stats_query_domain": "Mest efters\u00f6kta dom\u00e4ner", @@ -89,6 +111,7 @@ "example_upstream_regular": "vanlig DNS (\u00f6ver UDP)", "example_upstream_dot": "krypterat DNS-over-TLS<\/a>", "example_upstream_doh": "krypterat DNS-over-HTTPS<\/a>", + "example_upstream_sdns": "Du kan anv\u00e4nda DNS-stamps<\/a> f\u00f6r DNSCrypt<\/a> eller DNS-\u00f6ver-HTTPS<\/a>\n-resolvers", "example_upstream_tcp": "vanlig DNS (\u00f6ver UDP)", "all_filters_up_to_date_toast": "Alla filter \u00e4r redan aktuella", "updated_upstream_dns_toast": "Uppdaterade uppstr\u00f6ms-dns-servrar", @@ -125,5 +148,6 @@ "found_in_known_domain_db": "Hittad i dom\u00e4ndatabas.", "category_label": "Kategori", "rule_label": "Regel", - "filter_label": "Filter" + "filter_label": "Filter", + "unknown_filter": "Ok\u00e4nt filter {{filterId}}" } \ No newline at end of file diff --git a/client/src/actions/index.js b/client/src/actions/index.js index bb9d9bbb..20ef3766 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -561,6 +561,7 @@ export const setDhcpConfig = config => async (dispatch) => { dispatch(setDhcpConfigRequest()); try { await apiClient.setDhcpConfig(config); + dispatch(getDhcpStatus()); dispatch(addSuccessToast('dhcp_config_saved')); dispatch(setDhcpConfigSuccess()); } catch (error) { @@ -576,8 +577,8 @@ export const findActiveDhcpFailure = createAction('FIND_ACTIVE_DHCP_FAILURE'); export const findActiveDhcp = () => async (dispatch) => { dispatch(findActiveDhcpRequest()); try { - await apiClient.findActiveDhcp(); - dispatch(findActiveDhcpSuccess()); + const activeDhcp = await apiClient.findActiveDhcp(); + dispatch(findActiveDhcpSuccess(activeDhcp)); } catch (error) { dispatch(addErrorToast({ error })); dispatch(findActiveDhcpFailure()); diff --git a/client/src/components/Settings/Dhcp/Form.js b/client/src/components/Settings/Dhcp/Form.js index 93140580..14455b1b 100644 --- a/client/src/components/Settings/Dhcp/Form.js +++ b/client/src/components/Settings/Dhcp/Form.js @@ -49,16 +49,19 @@ const renderInterfaces = (interfaces => ( Object.keys(interfaces).map((item) => { const option = interfaces[item]; const { name } = option; + const onlyIPv6 = option.ip_addresses.every(ip => ip.includes(':')); let interfaceIP = option.ip_addresses[0]; - option.ip_addresses.forEach((ip) => { - if (!ip.includes(':')) { - interfaceIP = ip; - } - }); + if (!onlyIPv6) { + option.ip_addresses.forEach((ip) => { + if (!ip.includes(':')) { + interfaceIP = ip; + } + }); + } return ( - ); @@ -91,7 +94,6 @@ let Form = (props) => { handleSubmit, pristine, submitting, - enabled, interfaces, processing, interfaceValue, @@ -106,7 +108,11 @@ let Form = (props) => {
- + {renderInterfaces(interfaces)} @@ -131,7 +137,6 @@ let Form = (props) => { className="form-control" placeholder={t('dhcp_form_gateway_input')} validate={[ipv4, required]} - disabled={!enabled} />
@@ -143,7 +148,6 @@ let Form = (props) => { className="form-control" placeholder={t('dhcp_form_subnet_input')} validate={[ipv4, required]} - disabled={!enabled} />
@@ -161,7 +165,6 @@ let Form = (props) => { className="form-control" placeholder={t('dhcp_form_range_start')} validate={[ipv4, required]} - disabled={!enabled} />
@@ -172,7 +175,6 @@ let Form = (props) => { className="form-control" placeholder={t('dhcp_form_range_end')} validate={[ipv4, required]} - disabled={!enabled} />
@@ -186,7 +188,6 @@ let Form = (props) => { className="form-control" placeholder={t('dhcp_form_lease_input')} validate={[required, isPositive]} - disabled={!enabled} normalize={toNumber} /> @@ -196,7 +197,7 @@ let Form = (props) => { @@ -208,10 +209,10 @@ Form.propTypes = { handleSubmit: PropTypes.func, pristine: PropTypes.bool, submitting: PropTypes.bool, - enabled: PropTypes.bool, interfaces: PropTypes.object, processing: PropTypes.bool, interfaceValue: PropTypes.string, + initialValues: PropTypes.object, t: PropTypes.func, }; diff --git a/client/src/components/Settings/Dhcp/index.js b/client/src/components/Settings/Dhcp/index.js index e0317cd7..d18a9b93 100644 --- a/client/src/components/Settings/Dhcp/index.js +++ b/client/src/components/Settings/Dhcp/index.js @@ -22,7 +22,12 @@ class Dhcp extends Component { const buttonClass = config.enabled ? 'btn-gray' : 'btn-success'; return ( - ); @@ -41,22 +46,6 @@ class Dhcp extends Component {
-
- {this.getToggleDhcpButton()} - -
- {dhcp.active && !dhcp.active.found && -
- dhcp_not_found -
- } -
+
+
+ {this.getToggleDhcpButton()} + +
+ {dhcp.active && +
+ {dhcp.active.found ? ( + + dhcp_found + + ) : ( + dhcp_not_found + )} +
+ }