Chore: formatting

This commit is contained in:
Pieter Vander Vennet 2024-06-16 16:06:26 +02:00
parent 35eff07c80
commit c08fe03ed0
422 changed files with 31594 additions and 43019 deletions

View file

@ -431,7 +431,7 @@ function transformTranslation(
*/
function sortKeys(o: object): object {
const keys = Object.keys(o)
keys.sort((a,b) => (""+a) < (""+b) ? -1 : 1)
keys.sort((a, b) => ("" + a < "" + b ? -1 : 1))
const nw = {}
for (const key of keys) {
const v = o[key]
@ -582,9 +582,7 @@ function MergeTranslation(source: any, target: any, language: string, context: s
// Add the translation
if (targetV === undefined) {
if (typeof target === "string") {
throw (
`Trying to merge a translation for ${language} into a fixed string at ${context} for key ${key}`
)
throw `Trying to merge a translation for ${language} into a fixed string at ${context} for key ${key}`
}
target[key] = source[key]
continue