Skip to content

Commit

Permalink
📦 [refact] 修改工具语言为英语.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanjingling0510 committed May 18, 2017
1 parent 9441dba commit 642ec09
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/azer-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DEST_PATH = path.resolve(ROOT_PATH, '.azer');
commander.parse(process.argv);

if (_.isEmpty(commander.args)) {
showError(' 😌 请输入生成的bundle路径.');
showError('Please enter the bundle path or file .');
}

async function main() {
Expand Down Expand Up @@ -51,7 +51,7 @@ async function showAllVersionID() {
if (_.isEmpty(fileNames)) return;

console.log();
console.log(chalk.green('当前已有的bundle版本名称:'));
console.log(chalk.green('available version:'));
console.log(chalk.green('.........................'));
fileNames.forEach(name => {
console.log(chalk.green(`\n${name}\n`));
Expand All @@ -68,7 +68,7 @@ async function getVersionID() {
{
type: 'input',
name: 'value',
message: promptMessage + `请输入版本名称(默认为${chalk.green(defaultID)}`,
message: promptMessage + `Please enter a version name . (default: ${chalk.green(defaultID)})`,
},
];
const versionIDObj = await inquirer.prompt(schemaVersionID);
Expand Down Expand Up @@ -114,7 +114,7 @@ async function writeLocalFile(versionID, bundleStats) {
{
type: 'confirm',
name: 'confirm',
message: `是否覆盖掉之前生成的${chalk.cyan(versionID)}.json分析文件`,
message: promptMessage + `Whether to coverwrite version ${chalk.cyan(versionID)}`,
default: true,
},
];
Expand All @@ -130,6 +130,6 @@ async function writeLocalFile(versionID, bundleStats) {
}

function showError(error) {
if (error) console.log(`\n ${chalk.red(error)}`);
if (error) console.log(`\n ☹️ ${chalk.red(error)}`);
process.exit(1);
}
4 changes: 2 additions & 2 deletions src/azer-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ function renderAnalyzeResult(list) {
// 更新概览视图
function updateSummaryView () {
if (baseVersion) {
summaryBox.updateView(chalk.green('目标版本:' + baseVersion + '\n'));
summaryBox.updateView(chalk.green('Base Version: ' + baseVersion + '\n'));
}

if (compareVersion) {
summaryBox.updateView(summaryBox.content + chalk.green('对比版本:' + compareVersion + '\n'));
summaryBox.updateView(summaryBox.content + chalk.green('Compare Version: ' + compareVersion + '\n'));
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/azer-remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ async function showAllVersionID() {
})));

if (_.isEmpty(choices)) {
return Promise.reject('当前还没有添加版本.');
return Promise.reject('No version.');
};

let schema = [
{
type: 'checkbox',
name: 'paths',
message: promptMessage + '请选择要删除的版本',
message: promptMessage + 'Please select the version you want to delete .',
default: [],
choices: choices,
},
Expand All @@ -53,7 +53,7 @@ async function showAllVersionID() {
const result = await inquirer.prompt(schema);

if (_.isEmpty(result.paths)) {
return Promise.reject('没有要删除的版本.');
return Promise.reject('No version selected.');
};

await result.paths.map(async (path) => {
Expand All @@ -64,6 +64,6 @@ async function showAllVersionID() {


function showError(error) {
if (error) console.log(`\n ${chalk.red(error)}`);
if (error) console.log(`\n ☹️ ${chalk.red(error)}`);
process.exit(1);
}
8 changes: 4 additions & 4 deletions src/util/blessed.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ analyzeTable.updateView = data => {

// 总览视图
const summaryBox = grid.set(9, 0, 3, 8, blessed.box, {
label: ' 💖 统计',
label: ' 💖 Summary',
tags: true,
padding: 1,
border: {
Expand Down Expand Up @@ -109,9 +109,9 @@ baseTable.focus();
screen.render();

// 设置标签名
analyzeTable.setLabel(' 🌈 对比分析视图');
baseTable.setLabel(' 📝 目标版本');
compareTable.setLabel(' 📝 对比版本');
analyzeTable.setLabel(' 🌈 Analytic View');
baseTable.setLabel(' 📝 Base Version');
compareTable.setLabel(' 📝 Compare Version');

function makeScrollList(columnWidth) {
const options = makeList(columnWidth);
Expand Down

0 comments on commit 642ec09

Please sign in to comment.