Generate i18n files on ci/cd

This commit is contained in:
Alexis Faizeau 2022-01-24 18:01:00 +01:00
parent 446b4639c7
commit fdec12d311
4 changed files with 12 additions and 2 deletions

View File

@ -10,7 +10,6 @@ on:
pull_request: pull_request:
jobs: jobs:
continuous-integration-front: continuous-integration-front:
name: "Continuous Integration Front" name: "Continuous Integration Front"
@ -46,6 +45,10 @@ jobs:
run: ./templater.sh run: ./templater.sh
working-directory: "front" working-directory: "front"
- name: "Generate i18n files"
run: yarn run typesafe-i18n
working-directory: "front"
- name: "Build" - name: "Build"
run: yarn run build run: yarn run build
env: env:

View File

@ -43,6 +43,10 @@ jobs:
run: ./templater.sh run: ./templater.sh
working-directory: "front" working-directory: "front"
- name: "Generate i18n files"
run: yarn run typesafe-i18n
working-directory: "front"
- name: "Build" - name: "Build"
run: yarn run build-typings run: yarn run build-typings
env: env:

View File

@ -1,2 +1,5 @@
src/Messages/generated src/Messages/generated
src/Messages/JsonMessages src/Messages/JsonMessages
src/i18n/i18n-svelte.ts
src/i18n/i18n-types.ts
src/i18n/i18n-util.ts

View File

@ -82,7 +82,7 @@
"svelte-check": "svelte-check --fail-on-warnings --fail-on-hints --compiler-warnings \"a11y-no-onchange:ignore,a11y-autofocus:ignore,a11y-media-has-caption:ignore\"", "svelte-check": "svelte-check --fail-on-warnings --fail-on-hints --compiler-warnings \"a11y-no-onchange:ignore,a11y-autofocus:ignore,a11y-media-has-caption:ignore\"",
"pretty": "yarn prettier --write 'src/**/*.{ts,svelte}'", "pretty": "yarn prettier --write 'src/**/*.{ts,svelte}'",
"pretty-check": "yarn prettier --check 'src/**/*.{ts,svelte}'", "pretty-check": "yarn prettier --check 'src/**/*.{ts,svelte}'",
"typesafe-i18n": "typesafe-i18n" "typesafe-i18n": "typesafe-i18n --no-watch"
}, },
"lint-staged": { "lint-staged": {
"*.svelte": [ "*.svelte": [