0.0.5 • Published 4 years ago

@rmw/markdown-translate v0.0.5

Weekly downloads
-
License
AGPL
Repository
github
Last release
4 years ago

@rmw/markdown-translate

说明

市面上的 markdown 翻译工具都有问题,不好用。

比如用 menthays/markdown-translator 翻译 markdown 文本,会把

对 [libmdbx](https://github.com/erthink/libmdbx) 的 rust 封装

翻译成

Right [libmdbx](https://github.com/erthink/libmdbx) The rust package of

原因是它把文本拆分为 { text: '对 ' },{ text: 'libmdbx' },{ text: ' 的 rust 封装' }分开去翻译。

而用另外一些,比如bilingual ,又不能保持链接的样式。

我写的 @rmw/markdown-translate 解决了一系列问题,并且支持

  • 翻译 rust 代码的注释文本
  • 不翻译 vuepress 中的配置字段

安装

yarn add @rmw/markdown-translate 或者 npm install @rmw/markdown-translate

使用

翻译需要 AZURE 的翻译接口,请先去 AZURE 创建“翻译”资源 ,配置中的 keyregion都来自这里,如下图。

npm.io

用法演示如下 :

#include ./test/index.coffee

运行后输出如下

npm.io

关于

本项目隶属于人民网络(rmw.link) 代码计划。

人民网络

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago