mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 19:24:59 +00:00
cz -> cs
This commit is contained in:
@@ -20,7 +20,7 @@ const ALL_LOCALES = [
|
|||||||
'sk',
|
'sk',
|
||||||
'sv',
|
'sv',
|
||||||
'tr',
|
'tr',
|
||||||
'cz'
|
'cs'
|
||||||
] as Locales[];
|
] as Locales[];
|
||||||
|
|
||||||
// Optional build-time allow-list (e.g. VITE_APP_LOCALES="en,de,nl"). When unset,
|
// Optional build-time allow-list (e.g. VITE_APP_LOCALES="en,de,nl"). When unset,
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ const ApplicationSettings = () => {
|
|||||||
margin="normal"
|
margin="normal"
|
||||||
select
|
select
|
||||||
>
|
>
|
||||||
<MenuItem value="cz">Česky (CZ)</MenuItem>
|
<MenuItem value="cs">Česky (CZ)</MenuItem>
|
||||||
<MenuItem value="de">Deutsch (DE)</MenuItem>
|
<MenuItem value="de">Deutsch (DE)</MenuItem>
|
||||||
<MenuItem value="en">English (EN)</MenuItem>
|
<MenuItem value="en">English (EN)</MenuItem>
|
||||||
<MenuItem value="fr">Français (FR)</MenuItem>
|
<MenuItem value="fr">Français (FR)</MenuItem>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { CSSProperties } from 'react';
|
|||||||
|
|
||||||
import { MenuItem, TextField } from '@mui/material';
|
import { MenuItem, TextField } from '@mui/material';
|
||||||
|
|
||||||
import CZflag from 'i18n/CZ.svg';
|
import CSflag from 'i18n/CS.svg';
|
||||||
import DEflag from 'i18n/DE.svg';
|
import DEflag from 'i18n/DE.svg';
|
||||||
import FRflag from 'i18n/FR.svg';
|
import FRflag from 'i18n/FR.svg';
|
||||||
import GBflag from 'i18n/GB.svg';
|
import GBflag from 'i18n/GB.svg';
|
||||||
@@ -28,7 +28,7 @@ interface LanguageOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const LANGUAGE_OPTIONS: LanguageOption[] = [
|
const LANGUAGE_OPTIONS: LanguageOption[] = [
|
||||||
{ key: 'cz', flag: CZflag, label: 'CZ' },
|
{ key: 'cs', flag: CSflag, label: 'CS' },
|
||||||
{ key: 'de', flag: DEflag, label: 'DE' },
|
{ key: 'de', flag: DEflag, label: 'DE' },
|
||||||
{ key: 'en', flag: GBflag, label: 'EN' },
|
{ key: 'en', flag: GBflag, label: 'EN' },
|
||||||
{ key: 'fr', flag: FRflag, label: 'FR' },
|
{ key: 'fr', flag: FRflag, label: 'FR' },
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
@@ -1,6 +1,6 @@
|
|||||||
import type { Translation } from '../i18n-types';
|
import type { Translation } from '../i18n-types';
|
||||||
|
|
||||||
const cz: Translation = {
|
const cs: Translation = {
|
||||||
LANGUAGE: 'Jazyk',
|
LANGUAGE: 'Jazyk',
|
||||||
RETRY: 'Zkusit znovu',
|
RETRY: 'Zkusit znovu',
|
||||||
LOADING: 'Načítání',
|
LOADING: 'Načítání',
|
||||||
@@ -370,4 +370,4 @@ const cz: Translation = {
|
|||||||
EXECUTE_COMMAND_SENT: 'Příkaz odeslán',
|
EXECUTE_COMMAND_SENT: 'Příkaz odeslán',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default cz;
|
export default cs;
|
||||||
@@ -814,7 +814,7 @@ std::string Helpers::toUpper(std::string const & s) {
|
|||||||
|
|
||||||
// capitalizes one UTF-8 character in char array
|
// capitalizes one UTF-8 character in char array
|
||||||
// works with Latin1 (1 byte), Polish and other (2 bytes) characters
|
// works with Latin1 (1 byte), Polish and other (2 bytes) characters
|
||||||
// supports special characters for all 11 supported languages: EN, DE, NL, SV, PL, NO, FR, TR, IT, SK, CZ
|
// supports special characters for all 11 supported languages: EN, DE, NL, SV, PL, NO, FR, TR, IT, SK, CS
|
||||||
#if defined(EMSESP_STANDALONE)
|
#if defined(EMSESP_STANDALONE)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
#define EMSESP_LOCALE_TR "tr"
|
#define EMSESP_LOCALE_TR "tr"
|
||||||
#define EMSESP_LOCALE_IT "it"
|
#define EMSESP_LOCALE_IT "it"
|
||||||
#define EMSESP_LOCALE_SK "sk"
|
#define EMSESP_LOCALE_SK "sk"
|
||||||
#define EMSESP_LOCALE_CZ "cz"
|
#define EMSESP_LOCALE_CS "cs"
|
||||||
|
|
||||||
// IMPORTANT! translations are in the order: en, de, nl, sv, pl, no, fr, tr, it, sk, cz
|
// IMPORTANT! translations are in the order: en, de, nl, sv, pl, no, fr, tr, it, sk, cs
|
||||||
//
|
//
|
||||||
// if there is no translation, it will default to en
|
// if there is no translation, it will default to en
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -71,7 +71,7 @@ const char * const languages[] = {EMSESP_LOCALE_EN,
|
|||||||
EMSESP_LOCALE_TR,
|
EMSESP_LOCALE_TR,
|
||||||
EMSESP_LOCALE_IT,
|
EMSESP_LOCALE_IT,
|
||||||
EMSESP_LOCALE_SK,
|
EMSESP_LOCALE_SK,
|
||||||
EMSESP_LOCALE_CZ};
|
EMSESP_LOCALE_CS};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static constexpr uint8_t NUM_LANGUAGES = sizeof(languages) / sizeof(const char *);
|
static constexpr uint8_t NUM_LANGUAGES = sizeof(languages) / sizeof(const char *);
|
||||||
@@ -1632,6 +1632,11 @@ bool System::check_upgrade() {
|
|||||||
return StateUpdateResult::CHANGED;
|
return StateUpdateResult::CHANGED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Migrate language from cz to cs
|
||||||
|
if (settings.locale == "cz") {
|
||||||
|
settings.locale = "cs";
|
||||||
|
return StateUpdateResult::CHANGED;
|
||||||
|
}
|
||||||
return StateUpdateResult::UNCHANGED;
|
return StateUpdateResult::UNCHANGED;
|
||||||
});
|
});
|
||||||
} else if (this_version < settings_version) {
|
} else if (this_version < settings_version) {
|
||||||
|
|||||||
Reference in New Issue
Block a user