1.0.25 • Published 7 months ago

simple-msg-cli v1.0.25

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

一个简单国际化文案提取工具

  • eagle-pick scan path 提取path目录下所有文件的文案,并生成sourcemap.txt 和 zh-CH.json 文案
  • eagle-pick pick 替换zh-CH.json 下的所有目录文案
  • eagle-pick export 导出文案

使用方法

npm i simple-msg-cli -g 进行全区安装

// 扫描对应的path目录 eagle-pick scan ./src
// [path]支持 "," 分割多个路径
eagle-pick scan [path]

// 替换
eagle-pick pick

// 再进行翻译导出
eagle-pick export

// 由于googleTranslate api数量限制,文案量过大会出错
// i18n.config.json 配置
{
  "callStatement": "intl.formatMessage",
  "targetDir": "i18n-messages",
  "exclude": [".umi", ".umi-production"],
  "callExpression": true, // 函数调用翻译
  "autoZhKey": true,
  "autoTranslate": true,  // 自动翻译
}
1.0.25

7 months ago

1.0.24

9 months ago

1.0.23

9 months ago

1.0.22

9 months ago

1.0.21

10 months ago

1.0.20

10 months ago

1.0.19

10 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago