-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from yuo-app/rettend
Rettend
- Loading branch information
Showing
5 changed files
with
45 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# lin | ||
|
||
![NPM Version](https://img.shields.io/npm/v/%40yuo-app%2Flin) | ||
![NPM Version](https://img.shields.io/npm/v/%40yuo-app%2Flin?color=red) | ||
![JSR Version](https://img.shields.io/jsr/v/%40yuo/lin?color=yellow) | ||
|
||
auto-i18n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
# TODO | ||
|
||
- [ ] `translate` command | ||
- [x] Base functionality: translates all locales | ||
- [x] skip locale json files that are completely translated | ||
- [ ] if there is an incomplete local json, then the gpt will add the missing parts (still put everything in the context window) | ||
- [ ] Usage with `--manual [key]`: Prompts the user to enter the translation for each key in all the locales that are not yet translated. If a key is specified then all languages are prompted. | ||
- [ ] `add` command (`lin add <key>`) | ||
- [ ] Default usage: Running `lin add <key>` prompts the user to enter the translation for the key in the default language. It is then automatically translated to all the locales and saved in the locale json files. | ||
- [ ] If a key already exists, show error and prompt to use `lin translate --manual [key]` instead. | ||
- [ ] Usage with `--locale`: Prompts the user to enter the translation for the key in the specified locale. | ||
- [ ] Usage with `--manual`: Prompts the user to enter the translation for the key for all the locales. | ||
- [ ] `convert` command | ||
## v0.1.0 | ||
|
||
- [ ] **`translate [...locales]`**: sync all locale json files with the default locale json file. | ||
- [x] translates all locales, skip locales that exactly match the default locale | ||
- [ ] find missing keys in locales, add placeholder strings, get translations with one gpt request, put translations back to their correct places | ||
- [ ] if no locales are provided, then prompt the user to translate them | ||
- **options:** | ||
- [x] `-f, --force`: force to translate all locales | ||
|
||
- [ ] **`add <key> [...text]`**: add a key (or more keys) to the default locale json file, and translate it to all the locales. | ||
- [ ] if key already exists, show error and prompt to use | ||
- **options:** | ||
- [ ] `-l, --locale <locale>`: translate only the specified locale | ||
- [ ] `-f, --force`: force to translate the key even if it already exists | ||
|
||
- [ ] locales: `all` is every locale, `def` is the default locale, and `en` is a shorthand for `en-**` | ||
|
||
- [ ] **`verify`**: check everything is setup correctly. | ||
|
||
- [ ] **context window:** provide a way to add extra information to the gpt request | ||
- [ ] `context: string` config: this just gets added to the prompt by default | ||
- `-w, --with [locale]` | ||
- [ ] `string` commonarg: add a locale json to the prompt | ||
- [ ] `boolean` commonarg: do not add the context string to the prompt | ||
|
||
- [ ] **`convert` command:** convert a project to use i18n by extracting all the strings from the code and adding them to the locale json files. | ||
- [ ] i18n loader | ||
- [ ] support for other i18n integrations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters