UNPKG

bmc-i18n-extract-cli

Version:

这是一款能够自动将代码里的中文转成i18n国际化标记的命令行工具。当然,你也可以用它实现将中文语言包自动翻译成其他语言。适用于vue2、vue3和react

22 lines (21 loc) 761 B
import type { CustomizeKey, StringObject } from '../types'; declare class Collector { private static _instance; private constructor(); static getInstance(): Collector; private keyMap; private countOfAdditions; private currentFileKeyMap; private currentFilePath; setCurrentCollectorPath(path: string): void; getCurrentCollectorPath(): string; add(originalText: string, customizeKeyFn: CustomizeKey): string; getCurrentFileKeyMap(): Record<string, string>; resetCurrentFileKeyMap(): void; getKeyMap(): StringObject; setKeyMap(value: StringObject): void; resetCountOfAdditions(): void; getCountOfAdditions(): number; } declare const _default: Collector; export default _default;