Russian translation for profile index page

This commit is contained in:
SleepWalker
2016-05-14 11:41:32 +03:00
parent 17700826eb
commit 5719259825
6 changed files with 49 additions and 87 deletions

View File

@@ -57,8 +57,8 @@ try {
keysToUpdate = Object.entries(prevMessages).reduce((acc, [key, message]) =>
acc.concat(defaultMessages[key] && defaultMessages[key] !== message ? key : [])
, []);
} catch(e) {
console.log(chalk.yellow(`Can not read ${defaultMessagesPath}. The new file will be created.`), e);
} catch(err) {
console.log(chalk.yellow(`Can not read ${defaultMessagesPath}. The new file will be created.`), err);
}
if (!keysToAdd.length && !keysToRemove.length && !keysToUpdate.length) {
@@ -114,9 +114,9 @@ function buildLocales() {
let newMessages = {};
try {
newMessages = JSON.parse(fs.readFileSync(defaultMessagesPath, 'utf8'));
} catch (e) {
console.log(chalk.yellow(`Can not read ${defaultMessagesPath}. The new file will be created.`), e);
newMessages = JSON.parse(fs.readFileSync(destPath, 'utf8'));
} catch (err) {
console.log(chalk.yellow(`Can not read ${destPath}. The new file will be created.`), err);
}
keysToRemove.forEach((key) => {