aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorMunkácsi Márk <markmunkacsi@protonmail.com>2021-08-06 19:49:44 +0400
committerGitHub <noreply@github.com>2021-08-06 08:49:44 -0700
commitb2a3eef178785fdbb068f1e976d972c145e2f315 (patch)
tree30c350805da7b0cf77255bcbe4c5d5ab74fd73d8 /src/components
parent8be42a4e57928f82830be71fa6c9bc17ac63aa8a (diff)
Hungarian translation (#170)
* Hunagrian lang added 🇭🇺 * Fix 'None' field translation at encryptions * Fix SelectField error
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Settings.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/Settings.js b/src/components/Settings.js
index 1cbe74a..f25bc12 100644
--- a/src/components/Settings.js
+++ b/src/components/Settings.js
@@ -1,5 +1,5 @@
1import { Checkbox, Pane, RadioGroup, SelectField } from 'evergreen-ui'; 1import { Checkbox, Pane, RadioGroup, SelectField } from 'evergreen-ui';
2import { useEffect, useState } from 'react'; 2import { useEffect } from 'react';
3import { useTranslation } from 'react-i18next'; 3import { useTranslation } from 'react-i18next';
4import i18n from '../i18n'; 4import i18n from '../i18n';
5import { Translations } from '../translations'; 5import { Translations } from '../translations';
@@ -7,11 +7,11 @@ import './style.css';
7 7
8export const Settings = (props) => { 8export const Settings = (props) => {
9 const { t } = useTranslation(); 9 const { t } = useTranslation();
10 const [encryptionModes] = useState([ 10 const encryptionModes = [
11 { label: 'None', value: '' }, 11 { label: t('wifi.password.encryption.none'), value: '' },
12 { label: 'WPA/WPA2/WPA3', value: 'WPA' }, 12 { label: 'WPA/WPA2/WPA3', value: 'WPA' },
13 { label: 'WEP', value: 'WEP' }, 13 { label: 'WEP', value: 'WEP' },
14 ]); 14 ];
15 15
16 useEffect(() => { 16 useEffect(() => {
17 if (props.firstLoad.current && window.innerWidth < 500) { 17 if (props.firstLoad.current && window.innerWidth < 500) {
@@ -28,9 +28,10 @@ export const Settings = (props) => {
28 label={t('select')} 28 label={t('select')}
29 selected={i18n.language} 29 selected={i18n.language}
30 onChange={(e) => props.onLanguageChange(e.target.value)} 30 onChange={(e) => props.onLanguageChange(e.target.value)}
31 defaultValue="en-US"
31 > 32 >
32 {Translations.map((t) => ( 33 {Translations.map((t) => (
33 <option key={t.id} value={t.id} selected={t.id === i18n.language}> 34 <option key={t.id} value={t.id}>
34 {t.name} 35 {t.name}
35 </option> 36 </option>
36 ))} 37 ))}