3.1.2 • Published 4 years ago

teto-tool v3.1.2

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

teto-tool

node npm license Build Status Standard - JavaScript Style Guide

A tool, but more

Install

$ npm install teto-tool -g

Use

  • generate a new project
$ teto init [dest] [source]

Source: {gitUsername}/{repo}, you can find more in download-git-repo

You can specify a repository to create a new project, the default repository is crossjs/plato

  • list some templates
$ teto list
  • get text to be translated
$ teto i18n

How to use $ teto i18n?

You just need to create a file named as .i18n in your project root path, config like this:

{
  "path_src": "src",
  "path_i18n": "src/i18n",
  "languages": ["zh-CN", "en-US", "th"],
  "include_files": [".js", ".jsx"],
  "i18n_helper": "i18n",
  "default_data": "src/error.json"
}

Explanations:

  • path_src: Your source file's path, generally, it is a relative path
  • path_i18n: The path you place the i18n JSON files
  • languages: languages
  • include_files: files extention, if you do not set it, it will find all the files under the path_src
  • i18n_helper: a symbol to mark the string which should be translated, like: i18n('xxxx')
  • default_data: default data, it can be an object or a file path

Which repository can be used?

Generally, you can use any one as your template, but we recommend following these:

3.1.2

4 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.9

6 years ago

2.2.8

6 years ago

2.2.7

7 years ago

2.2.6

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago