Skip to content

Commit

Permalink
Always return the message object for consistent return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jun 19, 2024
1 parent 98c93b3 commit e8f3122
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/kolibri-tools/lib/i18n/astUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,12 @@ function getMessagesFromFile(filePath, verbose = false) {
logging.info(`Extracted ${Object.keys(messages).length} messages from :: ${filePath}`);
logging.info(JSON.stringify(messages));
}
return messages;
} catch (_) {
logging.error(
`Tried to find parsable Javascript in ${filePath} but could not. Will skip the file for now. This is a problem if you are expecting to translate any messages in that file - otherwise - you may ignore this message.`
);
return;
}
return messages;
}

module.exports = {
Expand Down

0 comments on commit e8f3122

Please # to comment.