Chore: fix translations

This commit is contained in:
Pieter Vander Vennet 2024-04-24 01:06:58 +02:00
parent 73db05f545
commit 00ab3a1b77
15 changed files with 214 additions and 30 deletions

View file

@ -570,10 +570,6 @@ function MergeTranslation(source: any, target: any, language: string, context: s
}
for (const key in source) {
if (!source.hasOwnProperty(key)) {
continue
}
const sourceV = source[key]
const targetV = target[keyRemapping?.get(key) ?? key]
@ -582,10 +578,7 @@ function MergeTranslation(source: any, target: any, language: string, context: s
if (targetV === undefined) {
if (typeof target === "string") {
throw (
"Trying to merge a translation into a fixed string at " +
context +
" for key " +
key
`Trying to merge a translation for ${language} into a fixed string at ${context} for key ${key}`
)
}
target[key] = source[key]