fix: prepare translations status on codeflow fails (#1749)

zio/stable
Joaquín Sánchez 2023-02-14 14:59:21 +01:00 committed by GitHub
parent f091e06d19
commit 1153421915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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])