4.0.5 • Published 3 years ago

translate-mds v4.0.5

Weekly downloads
59
License
ISC
Repository
-
Last release
3 years ago

translate .md to *.mdexplain install size

like

.md to .「all-language」.md

english


Build Status codecov GitHub license npm GitHub release

life

help me live , live need money 💰


This project is for all-of-markdown-writing-files translation工具

npm install -g translate-mds
// all folder·
translateMds md/

//or single file

translateMds test.md

Demo

demo

Command line options

translate [folder/single] md file language to you want

  Usage
    $ translateMds [folder/file name] [options]

  Example
    $ translateMds md/

    [options]
    -a   API      : default < baidu > {google|baidu|youdao}
    -f   from     : default < auto detect >
    -t   to       : default < zh >
    -N   num      : default < 1 > {async number}
    -R   rewrite  : default < false > {yes/no rewrite translate file}

  🌟[high user options]❤️

    -D   debug
    -C   cache              : default: false  cache in disk
    -G   google.com         : default: false  { cn => com with Google api }
    -F   force              : default: false  { If, translate result is no 100%, force wirte md file }
    -M   match              : default [ ". ", "! "//...] {match this str, merge translate result }
    -S   skips              : default ["... ", "etc. ", "i.e. "] {match this str will, skip merge translate result }
    -T   types              : default ["html", "code"] {pass the md AST type}
    --timewait              : default < 80 > {each fetch api wait time}
    --values [path]         : default: false {write the original of wait for translate file} [single file]
    --translate [path]      : default: false {use this file translate} [single file]
    --text-glob [pattern]   : default: false {text must be match, then be transalte}
    --no-disk               : default: false {do not use cached Result}
    --cache-name [filename] : default: "translateMds" named the cache file
    --glob [pattern]        : default: false {file must be match, then be transalte}
    --ignore [relative file/folder] : default: false {ignore files/folders string, split with `,` }

My-translate-list

Project test translation listorMore Chinese 🇨🇳 translation list

common problem

1. Sometimes the wind will get stuck and stagnate.

If slow , may be you should try again or use -D

The problem comes from the API, you just have to run it again.

2. There are a number of totals that have not been translated successfully

Quantity is no translation success / total is the total number of single file translations

This problem occurs, usually from the shift of characters caused by unusual symbols or sentences that are too long.

At this time, you can use-DDebug /-FForce write to file / Adjust unusual characters

Specific can be seen

Tips

  1. Diff file type, may try pandoc converter
  2. May use cli without -f **,cause translation.js auto detect language
  • --timewait [number] can lengthen the time of each request translation, reduce the banned ip
  • --values [file-path] (single file usage) to get the original output file to be translated
  • --translate [file-path] (single file usage) replaces the request api and uses the translated content of this file instead

Welcome 👏 ISSUE and PULL

characteristic

  • Improve the accuracy of md format such as http

  • Automatic translation

  • Enable md AST

Split Code


UseremarkImprove accuracy

Usetranslation.jsComplete interaction with the translation website

There is anotherAsynchronous Promise recursive example

4.0.5

3 years ago

4.0.4

5 years ago

4.0.2

5 years ago

4.0.0

5 years ago

3.2.18

5 years ago

3.2.9

6 years ago

3.2.5

6 years ago

3.2.4

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.1

6 years ago

3.0.21

6 years ago

3.0.20

6 years ago

3.0.18

6 years ago

3.0.17

6 years ago

3.0.16

6 years ago

3.0.15

6 years ago

3.0.14

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.5.8

6 years ago

2.5.6

6 years ago

2.5.5

6 years ago

2.5.4

6 years ago

2.5.3

6 years ago

2.5.2

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.1.0

6 years ago

2.2.0

6 years ago

2.3.0

6 years ago

2.0.2

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago