mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
workaround for default language en and basetranslation pl
This commit is contained in:
1
.github/workflows/pre_release.yml
vendored
1
.github/workflows/pre_release.yml
vendored
@@ -36,6 +36,7 @@ jobs:
|
|||||||
cd interface
|
cd interface
|
||||||
npm ci
|
npm ci
|
||||||
npx typesafe-i18n --no-watch
|
npx typesafe-i18n --no-watch
|
||||||
|
sed -i "s/= 'pl'/= 'en'/" ./src/i18n/i18n-util.ts
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Build firmware
|
- name: Build firmware
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { BaseTranslation } from '../i18n-types';
|
import type { Translation } from '../i18n-types';
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
const en: BaseTranslation = {
|
const en: Translation = {
|
||||||
LANGUAGE: 'Language',
|
LANGUAGE: 'Language',
|
||||||
RETRY: 'Retry',
|
RETRY: 'Retry',
|
||||||
LOADING: 'Loading',
|
LOADING: 'Loading',
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { Translation } from '../i18n-types';
|
import type { BaseTranslation } from '../i18n-types';
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
const pl: Translation = {
|
const pl: BaseTranslation = {
|
||||||
LANGUAGE: 'Język',
|
LANGUAGE: 'Język',
|
||||||
RETRY: 'Ponów',
|
RETRY: 'Ponów',
|
||||||
LOADING: 'Ładowanie',
|
LOADING: 'Ładowanie',
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ def buildWeb():
|
|||||||
try:
|
try:
|
||||||
env.Execute("npm install")
|
env.Execute("npm install")
|
||||||
env.Execute("npx typesafe-i18n --no-watch")
|
env.Execute("npx typesafe-i18n --no-watch")
|
||||||
|
with open("./src/i18n/i18n-util.ts") as r:
|
||||||
|
text = r.read().replace("Locales = 'pl'", "Locales = 'en'")
|
||||||
|
with open("./src/i18n/i18n-util.ts", "w") as w:
|
||||||
|
w.write(text)
|
||||||
env.Execute("npm run build")
|
env.Execute("npm run build")
|
||||||
buildPath = Path("build")
|
buildPath = Path("build")
|
||||||
wwwPath = Path("../data/www")
|
wwwPath = Path("../data/www")
|
||||||
|
|||||||
Reference in New Issue
Block a user