Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
egyjs committed Oct 24, 2022
1 parent 6ff8756 commit 107495b
Show file tree
Hide file tree
Showing 6 changed files with 648 additions and 1,685 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!.gitignore
node_modules
.idea
local

23 changes: 23 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,36 @@ using [free translate (google translate)](https://www.npmjs.com/package/free-tra
[![npm](https://img.shields.io/npm/dt/vue-detect-translation.svg)](https://www.npmjs.com/package/vue-detect-translation)
[![npm](https://img.shields.io/npm/l/vue-detect-translation.svg)](https://www.npmjs.com/package/vue-detect-translation)

## Installation

```bash
npm i vue-detect-translation
```

## Usage

```bash
v-detact-t
# options
--path= # path you want to scan for translation (default: src)
--auto-translate= # language to translate to (example: --auto-translate=ar)
--output= # output json file name (default: locale/en.json)
--funcName= # function name to detect translation (default: $t)
```

## Todo

- [ ] Convert to typescript + add types
- [ ] change the argument library ( currently using minimist )
- [ ] Add tests (Jest)
- [ ] Add option `language-from` in autoTranslate
- [x] Add option `language-to` in autoTranslate (ex. `--auto-translate=fr`)
- [ ] support multiple Programming languages (currently support only`vue|js|jsx|ts|tsx`)
- im think to create an option called `extentions` (for example `--language=vue,js,jsx,ts,tsx`)

# vue-auto-detect-translation

# Contributing

#### Please do! I'm open to any suggestions or improvements in this project.

10 changes: 5 additions & 5 deletions locale/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Hello World!": "Hello World!",
"test from this line: ${line}": "test from this line: ${line}",
"hello ' from template": "hello ' from template",
"hello' from script": "hello' from script"
}
"Hello World!": "مرحبا بالعالم!",
"test from this line: ${line}": "اختبار من هذا السطر: ${line}",
"hello ' from template": "مرحبا من القالب",
"hello' from script": "مرحبا من السيناريو"
}
Loading

0 comments on commit 107495b

Please sign in to comment.