hexo-translate-title icon indicating copy to clipboard operation
hexo-translate-title copied to clipboard

使用Google翻译,百度翻译和有道翻译将Hexo文章中的汉字标题转成英文标题

Results 9 hexo-translate-title issues
Sort by recently updated
recently updated
newest added

![TIM图片20190513001242](https://user-images.githubusercontent.com/25266205/57584970-1c884880-7514-11e9-8d0e-f736a82d7308.png) 如图所示,StatusCodeError错误 只要卸载该插件又没有这个错误了

所有的url都是 http://localhost:4000/undefined/

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. Changelog Sourced from qs's changelog. 6.5.3 [Fix] parse: ignore __proto__ keys (#428) [Fix] utils.merge: avoid a crash with a null target and a truthy...

dependencies

Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.6.2 to 6.12.6. Release notes Sourced from ajv's releases. v6.12.6 Fix performance issue of "url" format. v6.12.5 Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords...

dependencies

换一种说法可以是:**允许自定义翻译内容**。 看了一下代码,有一个判断是:*如果旧的翻译与新的翻译 **不相同直接覆盖** 旧的翻译内容。* 如果对翻译质量不是很满意的话,最好允许用户自定义翻译文本,此外它还 **影响永久链接** 的内容。 然后对判断部分进行了修改: ```js if(ori_translate_title == null){ ... }else{ data.translate_title = ori_translate_title; } ``` 这样只要旧的翻译内容不是空的,那么就依旧使用原翻译内容。然后存在以下几个情况: * 文章存在 translate_title ,但是其值为空,进入 if 语句内。 * 文章存在 translate_title ,值为...

enhancement

cheerio 未加入依赖

在 `hexo s` 或 `hexo g` 时报错: ``` get token error=>> TypeError: Cannot read property '0' of null at E:\Blog\node_modules\hexo-translate-title\lib\util.js:267:40 ``` 标题也没有翻译,我用的 `baidu_no_appid` ``` translate_title: translate_way: baidu_no_appid is_need_proxy: false ```

  当`_config.yml`配置使用google翻译(无代理),然后某一文章标题中带有标点符号`+`,使用`hexo g`会出错,生成的文件是异常(文件名为空,最终url后缀是.html),谷歌翻译返回的状态码是403,输出实际请求及错误例如:https://translate.google.cn/translate_a/t?client=t&sl=zh-CN&tl=en&hl=zh-CN$dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&clearbtn=1&otf=1&pc=1&ssel=0&tsel=0&kc=2&v=1.0&source=is&tk=71458.468060&q=Docker%20+%20MySQL%20(8.0.11)%20%E4%B8%BB%E4%BB%8E%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA ,查看源码中的`util.js`,看到那里只是对title进行了encodeURI(),但该方法似乎只作用于纯字符串。 ![20180703135917](https://user-images.githubusercontent.com/24515549/42201213-62f6cd74-7ec9-11e8-89c0-91a206393ec0.png) 注:当使用`baidu_no_appid`不会出错,但是url会保留这些有点小丑的标点符号