b28-cli 1.7.0 → 1.7.1

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.
package/README.MD CHANGED
@@ -181,6 +181,7 @@ module.exports = {
181
181
  | 属性 | 值类型 | 默认值 | 说明 |
182
182
  | ------------ | ------- | -------------- | ------------------------- |
183
183
  | onlyZH | Boolean | false | 只提取中文词条 |
184
+ | isOrigin | Boolean | false | 是否是提取接入原厂代码词条 |
184
185
  | baseReadPath | String | `必填` | 待提取文件根目录 |
185
186
  | baseOutPath | String | `baseReadPath` | 提取的 Excel 文件输出目录 |
186
187
  | hongPath | String | 空 | 功能宏文件地址 |
@@ -280,7 +281,7 @@ module.exports = {
280
281
  >
281
282
  > `otherLangPath`: 原厂代码存储其它语言词条的C文件地址,多个文件用逗号连接,用于生成初始语言包json文件
282
283
 
283
-
284
+ **注意:**原厂代码修改完成后,可以用词条提取工具进行词条提取,将提取工具的`isOrigin`设为`true`即可。
284
285
 
285
286
  **预设不进行翻译配置如下**
286
287
 
@@ -16,8 +16,8 @@ function getWords() {
16
16
  (0, _index2.default)({
17
17
  commandType: _config.COMMAD.GET_WORDS,
18
18
  isOrigin: true,
19
- baseReadPath: "D:/Desktop/trans/test/outSrc",
20
- baseOutPath: "D:/Desktop/trans",
19
+ baseReadPath: "D:/Desktop/test",
20
+ baseOutPath: "D:/Desktop",
21
21
  hongPath: hongPath
22
22
  }).then(function (data) {
23
23
  var t = data;
@@ -223,6 +223,8 @@ var ExtractHTML = function (_Extract) {
223
223
  return _this4.nextJsTask();
224
224
  }).catch(function (error) {
225
225
  console.log(error);
226
+ _this4.jsHandleList = [];
227
+ _this4.errorList.push(_this4.curFilePath);
226
228
  (0, _index.log)("\u5185\u8054JS\u5904\u7406\u51FA\u9519- " + error, _index.LOG_TYPE.error);
227
229
  return _this4.nextJsTask();
228
230
  });
package/dist/handle.js CHANGED
@@ -93,6 +93,9 @@ function addTrans(cfg) {
93
93
  return extractOri.scanFile();
94
94
  }
95
95
 
96
+ /**
97
+ * 提取词条
98
+ */
96
99
  function getWords(cfg) {
97
100
  var extract = new _ExtractFile2.default({
98
101
  baseReadPath: cfg.baseReadPath,
@@ -196,6 +199,9 @@ function checkExcel(cfg) {
196
199
  });
197
200
  }
198
201
 
202
+ /**
203
+ * 提取词条及json文件生成一个excel表格
204
+ */
199
205
  function getAllWords(cfg) {
200
206
  var extract = new _ExtractFile2.default({
201
207
  jsonPath: cfg.languagePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "b28-cli",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "translate, ExcelToJson, JsonToExcel, getText, l18n",
5
5
  "main": "./src/index.js",
6
6
  "bin": {