@c-sheep/i18n-extract-cli
Version:
这是一款能够自动将代码里的中文转成i18n国际化标记的命令行工具。当然,你也可以用它实现将中文语言包自动翻译成其他语言。适用于vue2、vue3和react
13 lines (12 loc) • 553 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkStringLiteralIsSkip = void 0;
const lodash_1 = require("lodash");
const ast_ignore_1 = require("../configs/ast.ignore");
const checkStringLiteralIsSkip = (path) => {
return ast_ignore_1.ignoreStringLiteral.some((conditions) => {
const conditionsKeys = Object.keys(conditions);
return conditionsKeys.every((cItem) => (0, lodash_1.get)(path, cItem) === conditions[cItem]);
});
};
exports.checkStringLiteralIsSkip = checkStringLiteralIsSkip;