From 392351849b1f803799a32e77b27ff4c3c05cf8c9 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 5 Aug 2024 09:20:55 +0200 Subject: [PATCH] MOBILE-4591 lang: Fix parent language strings overriden by mistake --- src/core/services/lang.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/services/lang.ts b/src/core/services/lang.ts index ec7777d3f..21bea66ba 100644 --- a/src/core/services/lang.ts +++ b/src/core/services/lang.ts @@ -599,7 +599,10 @@ export class CoreLangProvider { // Merge parent translations with the child ones. const parentTranslations = Translate.translations[fallbackLang] ?? await this.readLangFile(fallbackLang); - const mergedData = Object.assign(parentTranslations, data); + const mergedData = { + ...parentTranslations, + ...data, + }; Object.assign(data, mergedData); } catch {