-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Fix docs & add proper readme, create development.md
- Loading branch information
Showing
7 changed files
with
202 additions
and
35 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Migrate", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/cli.ts", | ||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx", | ||
"args": [ | ||
"migrate", | ||
"-p", | ||
"src/**/*.tsx", | ||
"-k", | ||
"<your open api API key>" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"cwd": "<migration project dir>", | ||
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"] | ||
}, | ||
{ | ||
"name": "Upload keys", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/cli.ts", | ||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx", | ||
"args": [ | ||
"upload-keys", | ||
"-ak", | ||
"<your tolgee API key>" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"cwd": "<migration project dir>", | ||
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Tolgee AI migration tool - Development docs | ||
To run this project for debugging purposes, follow these steps: | ||
|
||
### 1. Clone and install dependencies | ||
|
||
1. Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/tolgee/ai-migrator tolgee-ai-migrator | ||
``` | ||
|
||
2. Install dependencies | ||
```bash | ||
cd tolgee-ai-migrator | ||
npm ci | ||
``` | ||
|
||
### Running the tool | ||
Running the tool is a bit tricky because it has to be run in a different working directory - the migrated project directory. Here are guides for different tools. | ||
|
||
#### Running in VSCode | ||
To run it in VSCode, you can use the `.vsdode/launch.json` configuration provided in the repository. | ||
|
||
1. Open the project in VSCode | ||
2. Copy the `.vscode/launch.template.json` to `.vscode/launch.json` | ||
|
||
And replace | ||
- `<your open api API key>` with your OpenAI API key | ||
- `<project to migrate dir>` with the directory you want to migrate | ||
- `<your tolgee API key>` with your Tolgee API key | ||
|
||
3. Select `Run and Debug` from the left sidebar and run the `Migrate` or `Upload keys` configuration | ||
|
||
#### Running in IntelliJ IDEA, WebStorm or other JetBrains IDEs | ||
|
||
1. Open the project in the IDE | ||
2. Create a new run configuration according to this image | ||
|
||
![Idea configuration example](./img/migrate-keys.webp) | ||
|
||
Similarly, you can configure the upload keys command. | ||
|
||
Debugging should work out of the box in both cases. | ||
|
||
### Creating a new preset | ||
To create a new preset, you can start by copying the `presets/react` directory to `presets/<preset-name>`. Then, you can | ||
simply modify the `system.handlebars` file to match your needs. The system handlebars file is a prompt template | ||
that is being sent to the ChatGPT. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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