chore: update nuxt to 3.10.3 (#2610)
This commit is contained in:
parent
1fefb6e5b6
commit
55037f04cd
53 changed files with 3584 additions and 3766 deletions
|
@ -22,13 +22,12 @@ function merge(src: Record<string, any>, dst: Record<string, any>) {
|
|||
}
|
||||
}
|
||||
|
||||
const sourceFiles: string[] = sourceLanguageLocale.files ? sourceLanguageLocale.files : [sourceLanguageLocale.file!]
|
||||
|
||||
const sourceFiles = sourceLanguageLocale.files ? sourceLanguageLocale.files : [sourceLanguageLocale.file!]
|
||||
const sourceTranslations: Record<string, string> = {}
|
||||
|
||||
for (const file of sourceFiles) {
|
||||
const data = JSON.parse(Buffer.from(
|
||||
await fs.readFile(resolver.resolve(`../locales/${file}`), 'utf-8'),
|
||||
await fs.readFile(resolver.resolve(`../locales/${file as string}`), 'utf-8'),
|
||||
).toString()) as Record<string, unknown>
|
||||
|
||||
merge(flatten(data), sourceTranslations)
|
||||
|
@ -36,7 +35,7 @@ for (const file of sourceFiles) {
|
|||
|
||||
async function removeOutdatedTranslations() {
|
||||
for (const locale of currentLocales.filter(l => l.code !== 'en-US')) {
|
||||
const files: string[] = locale.files ? locale.files : [locale.file!]
|
||||
const files = locale.files ? locale.files as string[] : [locale.file as string]
|
||||
|
||||
for (const file of files) {
|
||||
const path = resolver.resolve(`../locales/${file}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue