Merge pull request #4139 from dpalou/MOBILE-4591

MOBILE-4591 lang: Fix parent language strings overriden by mistake
main
Pau Ferrer Ocaña 2024-08-13 09:39:02 +02:00 committed by GitHub
commit 5a8911e8ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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 {