This commit is contained in:
Kim Biesbjerg 2019-09-19 15:03:46 +02:00
parent 306622b9a0
commit 77769983d5

View File

@ -24,11 +24,13 @@ export class PoCompiler implements CompilerInterface {
translations: {
[this.domain]: Object.keys(collection.values).reduce(
(translations, key) => {
translations[key] = {
msgid: key,
msgstr: collection.get(key)
return {
...translations,
[key]: {
msgid: key,
msgstr: collection.get(key)
}
};
return translations;
},
{} as any
)
@ -50,8 +52,10 @@ export class PoCompiler implements CompilerInterface {
.filter(key => key.length > 0)
.reduce(
(result, key) => {
result[key] = po.translations[this.domain][key].msgstr.pop();
return result;
return {
...result,
[key]: po.translations[this.domain][key].msgstr.pop()
};
},
{} as TranslationType
);