pug-site-core 3.0.19 → 3.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/translate.js +3 -3
  2. package/package.json +3 -3
package/lib/translate.js CHANGED
@@ -22,7 +22,7 @@ let orginLang = "us";
22
22
  // 命令行参数说明:
23
23
  // k=key1,key2 - 指定要翻译的键
24
24
  // c=us,kr,jp - 指定目标国家/语言
25
- // all=true - 使用 allLang 中的所有语言进行翻译
25
+ // all - 使用 allLang 中的所有语言进行翻译
26
26
  let args = process.argv.slice(2);
27
27
  let filParms = [];
28
28
  let filCountry = [];
@@ -38,7 +38,7 @@ args.forEach((item) => {
38
38
  filCountry = value.split(",");
39
39
  }
40
40
  }
41
- if (key === "all" && value === "true") {
41
+ if (key === "all") {
42
42
  useAllLang = true;
43
43
  }
44
44
  });
@@ -140,7 +140,7 @@ export async function translateLanguageData() {
140
140
  // 修改输出路径为项目根目录
141
141
  fse.writeFileSync(
142
142
  path.join(projectRoot, "languageData.js"),
143
- "export default" + JSON.stringify(languageData)
143
+ "export default" + JSON.stringify(languageData,null,2)
144
144
  );
145
145
  console.log("翻译完成花费:", (Date.now() - startTime) / 1000 + "s");
146
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pug-site-core",
3
- "version": "3.0.19",
3
+ "version": "3.0.21",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -52,7 +52,7 @@
52
52
  "ws": "^8.18.0"
53
53
  },
54
54
  "license": "ISC",
55
- "description": "增加从接口获取语言列表、增加翻译所有语言指令、增加linux系统判断",
55
+ "description": "语言翻译增加格式化功能",
56
56
  "files": [
57
57
  "lib/",
58
58
  "index.js"
@@ -60,4 +60,4 @@
60
60
  "exports": {
61
61
  ".": "./index.js"
62
62
  }
63
- }
63
+ }