Socket
Socket
Sign inDemoInstall

html-i18n-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-i18n-cli - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

bin/html.js

4

lib/render.js

@@ -7,5 +7,5 @@ const fs = require('fs')

module.exports = (htmlfile, textsfile) => {
module.exports = (htmlfile, jsonfile) => {
const htmlpath = path.join(process.cwd(), htmlfile)
const textspath = path.join(process.cwd(), textsfile)
const textspath = path.join(process.cwd(), jsonfile)
const outpath = path.join(process.cwd(), `translated-${htmlfile}`)

@@ -12,0 +12,0 @@ const html = fs.readFileSync(htmlpath).toString()

{
"name": "html-i18n-cli",
"version": "0.1.2",
"version": "0.1.3",
"description": "HTML 国际化工具",
"main": "lib/index.js",
"bin": {
"html": "bin/index.js"
"html": "bin/html.js"
},

@@ -9,0 +9,0 @@ "scripts": {

@@ -13,3 +13,3 @@ # html-i18n-cli

1. 生成 json 文件
1. 生成 JSON 文件

@@ -20,3 +20,3 @@ ``` sh

2. 翻译 json 文件
2. 翻译 JSON 文件

@@ -29,4 +29,7 @@ > 输入两次 Ctrl + C 终止,机翻后可手动校对

3. 还原 html 文件
* -t zh 指定[目标语言](http://api.fanyi.baidu.com/doc/21)
* -n 50 指定更新频率
3. 还原 HTML 文件
``` sh

@@ -33,0 +36,0 @@ html render test.html test.json

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc