Skip to content

Commit

Permalink
Merge pull request #51 from melfore/43-add-unit-tests
Browse files Browse the repository at this point in the history
Fixed i18nMessages generation file
  • Loading branch information
CrisGrud authored Jan 9, 2024
2 parents de4460b + 582a69f commit 35f4eae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/cli/i18n-msg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,11 @@ const writeNamespacesFile = (namespaces: MessagesNamespace[]) => {
const content = namespaces.reduce((result, [ns]) => {
return result + `export * from './${ns}';${EOL}`;
}, AUTOGENERATED_HEADER);

fs.writeFile(outTsFile, content, (err) => {
if (err) {
console.log("Error writing to", outTsFile);
}
});
try{
fs.writeFileSync(outTsFile, content);
}catch(e){
console.log("Error writing to", outTsFile);
}
};

const allLanguagesReport = (data: Message[], languages: string[]) => {
Expand Down

0 comments on commit 35f4eae

Please sign in to comment.