forked from Mirrors/elk
fix: prepare translations status on codeflow fails (#1749)
This commit is contained in:
parent
f091e06d19
commit
1153421915
1 changed files with 7 additions and 1 deletions
|
@ -2,10 +2,16 @@ import flatten from 'flat'
|
||||||
import { createResolver } from '@nuxt/kit'
|
import { createResolver } from '@nuxt/kit'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { currentLocales } from '../config/i18n'
|
import { currentLocales } from '../config/i18n'
|
||||||
import vsCodeConfig from '../.vscode/settings.json'
|
|
||||||
import type { LocaleEntry } from '../docs/types'
|
import type { LocaleEntry } from '../docs/types'
|
||||||
import type { ElkTranslationStatus } from '~/types/translation-status'
|
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][]
|
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])
|
= currentLocales.map((l: any) => [l.code, l.files ? l.files : [l.file!], l.name ?? l.code])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue