Skip to content

Commit 107495b

Browse files
committed
some fixes
1 parent 6ff8756 commit 107495b

File tree

6 files changed

+648
-1685
lines changed

6 files changed

+648
-1685
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
!.gitignore
22
node_modules
33
.idea
4-
local
4+

README.MD

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,36 @@ using [free translate (google translate)](https://www.npmjs.com/package/free-tra
88
[![npm](https://img.shields.io/npm/dt/vue-detect-translation.svg)](https://www.npmjs.com/package/vue-detect-translation)
99
[![npm](https://img.shields.io/npm/l/vue-detect-translation.svg)](https://www.npmjs.com/package/vue-detect-translation)
1010

11+
## Installation
12+
13+
```bash
14+
npm i vue-detect-translation
15+
```
16+
17+
## Usage
18+
19+
```bash
20+
v-detact-t
21+
# options
22+
--path= # path you want to scan for translation (default: src)
23+
--auto-translate= # language to translate to (example: --auto-translate=ar)
24+
--output= # output json file name (default: locale/en.json)
25+
--funcName= # function name to detect translation (default: $t)
26+
```
27+
1128
## Todo
1229

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

2038
# vue-auto-detect-translation
39+
40+
# Contributing
41+
42+
#### Please do! I'm open to any suggestions or improvements in this project.
43+

locale/en.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"Hello World!": "Hello World!",
3-
"test from this line: ${line}": "test from this line: ${line}",
4-
"hello ' from template": "hello ' from template",
5-
"hello' from script": "hello' from script"
6-
}
2+
"Hello World!": "مرحبا بالعالم!",
3+
"test from this line: ${line}": "اختبار من هذا السطر: ${line}",
4+
"hello ' from template": "مرحبا من القالب",
5+
"hello' from script": "مرحبا من السيناريو"
6+
}

0 commit comments

Comments
 (0)