From bc2bfac7d73cba1b0a6ca0f04656cca3276b617e Mon Sep 17 00:00:00 2001 From: Kim Biesbjerg Date: Mon, 8 Jul 2019 15:10:58 +0200 Subject: [PATCH] fix invalid options passed to gettext --- src/compilers/po.compiler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compilers/po.compiler.ts b/src/compilers/po.compiler.ts index 6a3b4c6..a6ffa31 100644 --- a/src/compilers/po.compiler.ts +++ b/src/compilers/po.compiler.ts @@ -33,13 +33,13 @@ export class PoCompiler implements CompilerInterface { } }; - return gettext.po.compile(data, 'utf-8'); + return gettext.po.compile(data); } public parse(contents: string): TranslationCollection { const collection = new TranslationCollection(); - const po = gettext.po.parse(contents, 'utf-8'); + const po = gettext.po.parse(contents, 'utf8'); if (!po.translations.hasOwnProperty(this.domain)) { return collection; } @@ -49,7 +49,7 @@ export class PoCompiler implements CompilerInterface { .reduce((values, key) => { values[key] = po.translations[this.domain][key].msgstr.pop(); return values; - }, {}); + }, {} as TranslationType); return new TranslationCollection(values); }