chore: update nuxt to 3.10.3 (#2610)

This commit is contained in:
Joaquín Sánchez 2024-02-24 17:46:14 +01:00 committed by GitHub
parent 1fefb6e5b6
commit 55037f04cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 3584 additions and 3766 deletions

View file

@ -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}`)