diff options
| -rw-r--r-- | src/components/Settings.js | 11 | ||||
| -rw-r--r-- | src/translations.js | 31 |
2 files changed, 37 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 @@ | |||
| 1 | import { Checkbox, Pane, RadioGroup, SelectField } from 'evergreen-ui'; | 1 | import { Checkbox, Pane, RadioGroup, SelectField } from 'evergreen-ui'; |
| 2 | import { useEffect, useState } from 'react'; | 2 | import { useEffect } from 'react'; |
| 3 | import { useTranslation } from 'react-i18next'; | 3 | import { useTranslation } from 'react-i18next'; |
| 4 | import i18n from '../i18n'; | 4 | import i18n from '../i18n'; |
| 5 | import { Translations } from '../translations'; | 5 | import { Translations } from '../translations'; |
| @@ -7,11 +7,11 @@ import './style.css'; | |||
| 7 | 7 | ||
| 8 | export const Settings = (props) => { | 8 | export 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 | ))} |
diff --git a/src/translations.js b/src/translations.js index c6d57c0..c8ee908 100644 --- a/src/translations.js +++ b/src/translations.js | |||
| @@ -693,6 +693,37 @@ export const Translations = [ | |||
| 693 | select: '언어 선택', | 693 | select: '언어 선택', |
| 694 | }, | 694 | }, |
| 695 | }, | 695 | }, |
| 696 | { | ||
| 697 | id: 'hu-HU', | ||
| 698 | name: 'Hungarian - Magyar', | ||
| 699 | translation: { | ||
| 700 | title: 'WiFi Kártya', | ||
| 701 | 'desc.use': | ||
| 702 | 'Nyomtass ki egy egyszerű kártyát a WiFi bejelentkezési adataiddal. Ragaszd fel a hűtőszekrényedre, tartsd a pénztárcádban, stb.', | ||
| 703 | 'desc.privacy': | ||
| 704 | 'A WiFi adataid sosem lesznek elküldve a szerverre. Ezen a weboldalon nincs követés, nincs analitika vagy digitális ujjlenyomatozás. Nézd meg a', | ||
| 705 | 'desc.source': 'forráskódot', | ||
| 706 | 'wifi.login': 'WiFi Bejelentkezés', | ||
| 707 | 'wifi.name': 'Hálózat neve', | ||
| 708 | 'wifi.name.placeholder': 'WiFi hálózat neve', | ||
| 709 | 'wifi.password': 'Jelszó', | ||
| 710 | 'wifi.password.placeholder': 'Jelszó', | ||
| 711 | 'wifi.password.hide': 'Jelszó elrejtése', | ||
| 712 | 'wifi.password.encryption': 'Titkosítás', | ||
| 713 | 'wifi.password.encryption.none': 'Nincs', | ||
| 714 | 'wifi.tip': | ||
| 715 | 'Olvasd be a QR kódot a telefonod kamerájával az automatikus csatlakozáshoz', | ||
| 716 | 'wifi.alert.name': 'A Hálózat neve nem lehet üres', | ||
| 717 | 'wifi.alert.password.length.5': | ||
| 718 | 'A jelszó minimum 5 karakter legyen, vagy állítsd a titkosítást "Nincs"-re', | ||
| 719 | 'wifi.alert.password.length.8': | ||
| 720 | 'A jelszó minimum 8 karakter legyen, vagy állítsd a titkosítást "Nincs"-re', | ||
| 721 | 'button.rotate': 'Forgatás', | ||
| 722 | 'button.print': 'Nyomtatás', | ||
| 723 | 'button.settings': 'Beállítások', | ||
| 724 | select: 'Válassz nyelvet', | ||
| 725 | }, | ||
| 726 | }, | ||
| 696 | ].sort((a, b) => { | 727 | ].sort((a, b) => { |
| 697 | return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1; | 728 | return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1; |
| 698 | }); | 729 | }); |
