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
|
||||
npm ci
|
||||
npx typesafe-i18n --no-watch
|
||||
sed -i "s/= 'pl'/= 'en'/" ./src/i18n/i18n-util.ts
|
||||
npm run build
|
||||
|
||||
- name: Build firmware
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { BaseTranslation } from '../i18n-types';
|
||||
import type { Translation } from '../i18n-types';
|
||||
/* prettier-ignore */
|
||||
/* eslint-disable */
|
||||
|
||||
const en: BaseTranslation = {
|
||||
const en: Translation = {
|
||||
LANGUAGE: 'Language',
|
||||
RETRY: 'Retry',
|
||||
LOADING: 'Loading',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Translation } from '../i18n-types';
|
||||
import type { BaseTranslation } from '../i18n-types';
|
||||
/* prettier-ignore */
|
||||
/* eslint-disable */
|
||||
|
||||
const pl: Translation = {
|
||||
const pl: BaseTranslation = {
|
||||
LANGUAGE: 'Język',
|
||||
RETRY: 'Ponów',
|
||||
LOADING: 'Ładowanie',
|
||||
|
||||
@@ -24,6 +24,10 @@ def buildWeb():
|
||||
try:
|
||||
env.Execute("npm install")
|
||||
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")
|
||||
buildPath = Path("build")
|
||||
wwwPath = Path("../data/www")
|
||||
|
||||
Reference in New Issue
Block a user