diff --git a/src/assets/translation/en.json b/src/assets/languages/en.json similarity index 100% rename from src/assets/translation/en.json rename to src/assets/languages/en.json diff --git a/src/assets/translation/hu.json b/src/assets/languages/hu.json similarity index 100% rename from src/assets/translation/hu.json rename to src/assets/languages/hu.json diff --git a/src/assets/synopsis_esv.json b/src/assets/translations/esv.json similarity index 100% rename from src/assets/synopsis_esv.json rename to src/assets/translations/esv.json diff --git a/src/assets/synopsis_szit.json b/src/assets/translations/szit.json similarity index 100% rename from src/assets/synopsis_szit.json rename to src/assets/translations/szit.json diff --git a/src/stores/SynopsisStore.ts b/src/stores/SynopsisStore.ts index af8e6b5d..d0899502 100644 --- a/src/stores/SynopsisStore.ts +++ b/src/stores/SynopsisStore.ts @@ -1,15 +1,17 @@ import { defineStore } from 'pinia' -import synopsis_szit from '@/assets/synopsis_szit.json' -import synopsis_esv from '@/assets/synopsis_esv.json' -import dictionary_en from '@/assets/translation/en.json' -import dictionary_hu from '@/assets/translation/hu.json' import type { SectionScheme, SynopsisScheme } from '@/interfaces/synopsisInterface' import type { DictionaryScheme } from '@/interfaces/dictionaryInterface' import router from '../router'; -const synopsisSZIT: SynopsisScheme = synopsis_szit -const synopsisESV: SynopsisScheme = synopsis_esv -const dictionaryEn: DictionaryScheme = dictionary_en -const dictionaryHu: DictionaryScheme = dictionary_hu + +import szit from '@/assets/translations/szit.json' +import esv from '@/assets/translations/esv.json' +import en from '@/assets/languages/en.json' +import hu from '@/assets/languages/hu.json' +const synopsisSZIT: SynopsisScheme = szit +const synopsisESV: SynopsisScheme = esv +const dictionaryEn: DictionaryScheme = en +const dictionaryHu: DictionaryScheme = hu +// TODO: proper typing const dictionary: any = { en: dictionaryEn, hu: dictionaryHu diff --git a/tests/test.sh b/tests/test.sh index a476b203..adf54a17 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -2,6 +2,6 @@ set -ex SCRIPT_FOLDER=$(dirname "${0}") WORKSPACE_FOLDER=$(readlink -e "${SCRIPT_FOLDER}/../") -JSON_FOLDER="$WORKSPACE_FOLDER/src/assets/" -python3 "$SCRIPT_FOLDER"/json_test.py "$JSON_FOLDER" +TRANSLATION_FOLDER="$WORKSPACE_FOLDER/src/assets/translations/" +python3 "$SCRIPT_FOLDER"/json_test.py "$TRANSLATION_FOLDER" echo "All tests passed" \ No newline at end of file diff --git a/tsconfig.app.json b/tsconfig.app.json index a02ffe30..d20acd58 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,6 +1,6 @@ { "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/assets/synopsis_szit.json", "src/assets/synopsis_esv.json", "src/assets/translation/hu.json", "src/assets/translation/en.json", "src/stores/*"], + "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/assets/translations/*.json", "src/assets/languages/*.json", "src/stores/*"], "exclude": ["src/**/__tests__/*"], "compilerOptions": { "composite": true,