From 1153421915a43a5c8889653b2fc26e12c29579e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Tue, 14 Feb 2023 14:59:21 +0100 Subject: [PATCH] fix: prepare translations status on codeflow fails (#1749) --- scripts/prepare-translation-status.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/prepare-translation-status.ts b/scripts/prepare-translation-status.ts index 9ed6ce66..f1b6b31a 100644 --- a/scripts/prepare-translation-status.ts +++ b/scripts/prepare-translation-status.ts @@ -2,10 +2,16 @@ import flatten from 'flat' import { createResolver } from '@nuxt/kit' import fs from 'fs-extra' import { currentLocales } from '../config/i18n' -import vsCodeConfig from '../.vscode/settings.json' import type { LocaleEntry } from '../docs/types' import type { ElkTranslationStatus } from '~/types/translation-status' +const vsCodeConfig = JSON.parse( + await fs.readFile( + new URL('../.vscode/settings.json', import.meta.url), + 'utf-8', + ), +) + export const localeData: [code: string, file: string[], title: string][] = currentLocales.map((l: any) => [l.code, l.files ? l.files : [l.file!], l.name ?? l.code])