An open API service indexing awesome lists of open source software.

https://github.com/ymc-github/sh-lib-lang

some function for handle lang for ymc shell lib
https://github.com/ymc-github/sh-lib-lang

lang sh-lib ymc

Last synced: 3 months ago
JSON representation

some function for handle lang for ymc shell lib

Awesome Lists containing this project

README

        

# sh lib lang
## desc

some function for handle lang for ymc shell lib

## deps

### test

- [x] sh-lib-path-resolve
- [x] sh-lib-test
- [x] sh-lib-time-cost
- [x] sh-lib-project-dir-map

### prod

- [ ] xxx

## apis

- [x] lang_type_set
- [x] lang_type_get
- [x] lang_step_set
- [x] lang_step_now
- [x] lang_step_get
- [x] lang_sample

```sh
cat src/index.sh | grep "function " | sed "s/function */- [x] /g" | sed "s/(.*) *{//g"
```

## feats

- [x] set operation step
- [x] get current step
- [x] support multi language

## usage

### how to use for poduction?

```sh
# get the code

# run the index file
# ./src/index.sh

# or import to your sh file
# source /path/to/the/index file

# simple usage
desc=$(cat <#1.1 创建主机地址文件
lang_step_now "2" # =>#1.2 测试主机是否在线

lang_type_set "en"
lang_step_now "1" # => #1.1 create host ip file
lang_step_now "2" # => #1.2 ping to check if host is online

lang_type_set "zh"
lang_step_now "1" # =>#1.1 创建主机地址文件
lang_step_now "2" # =>#1.2 测试主机是否在线
lang_step_now "1.2" "" "step_mode" # =>#1.2 测试主机是否在线
```

### how to use for developer?

```sh
# get the code

# run test
./test/index.sh
#2 get some fail test
./test/index.sh | grep "it is false"
```

## author

yemiancheng

## license

MIT