3.1.2 • Published 6 years ago

teto-tool v3.1.2

Weekly downloads
7
License
MIT
Repository
github
Last release
6 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

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.9

7 years ago

2.2.8

7 years ago

2.2.7

8 years ago

2.2.6

8 years ago

2.2.5

9 years ago

2.2.4

9 years ago

2.2.3

9 years ago

2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago