bmc-i18n-extract-cli
Version:
这是一款能够自动将代码里的中文转成i18n国际化标记的命令行工具。当然,你也可以用它实现将中文语言包自动翻译成其他语言。适用于vue2、vue3和react
15 lines • 663 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLocaleDir = void 0;
const stateManager_1 = __importDefault(require("./stateManager"));
function getLocaleDir() {
const { localeFileType, localePath } = stateManager_1.default.getToolConfig();
const reg = new RegExp(`/[A-Za-z-]+.${localeFileType}`, 'g');
const localeDirPath = localePath.replace(reg, '');
return localeDirPath;
}
exports.getLocaleDir = getLocaleDir;
//# sourceMappingURL=getLocaleDir.js.map