|
68 | 68 |
|
69 | 69 | You can find the current translation status in [TRANSLATION.md](https://github.com/sourcegit-scm/sourcegit/blob/develop/TRANSLATION.md) |
70 | 70 |
|
| 71 | +### Translate Utility Script |
| 72 | + |
| 73 | +A script that assists with translations by reading the target language, comparing it with the base language, and going through missing keys one by one, so the translator can provide the translations interactively without needing to check each key manually. |
| 74 | + |
| 75 | +#### Usage |
| 76 | + |
| 77 | +Check for a given language (e.g., `pt_BR`) and optionally check for missing translations: |
| 78 | + |
| 79 | +```bash |
| 80 | +python translate_helper.py pt_BR [--check] |
| 81 | +``` |
| 82 | + |
| 83 | +- `pt_BR` is the target language code (change as needed), it should correspond to a file named `pt_BR.axaml` in the `src/Resources/Locales/` directory, so you can replace it with any other language code you want to translate, e.g., `de_DE`, `es_ES`, etc. |
| 84 | +- `--check` is an optional flag used to only check for missing keys without prompting for translations, useful for getting a list of missing translations. |
| 85 | + |
| 86 | +The script will read the base language file (`en_US.axaml`) and the target language file (e.g., `pt_BR.axaml`), identify missing keys, and prompt you to provide translations for those keys. If the `--check` flag is used, it will only list the missing keys without prompting for translations. |
| 87 | + |
71 | 88 | ## How to Use |
72 | 89 |
|
73 | 90 | **To use this tool, you need to install Git(>=2.25.1) first.** |
@@ -148,6 +165,16 @@ For **Linux** users: |
148 | 165 | * Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI. |
149 | 166 | * If you can NOT type accented characters, such as `ê`, `ó`, try to set the environment variable `AVALONIA_IM_MODULE` to `none`. |
150 | 167 |
|
| 168 | +## Commandline arguments |
| 169 | + |
| 170 | +Users can also launcher `SourceGit` from commandline. Usage: |
| 171 | + |
| 172 | +``` |
| 173 | +<SOURCEGIT_EXEC> <DIR> // Open repository in existing `SourceGit` instance or a new one |
| 174 | +<SOURCEGIT_EXEC> --file-history <FILE_PATH> // Launch `SourceGit` to see the history of a file |
| 175 | +<SOURCEGIT_EXEC> --blame <FILE_PATH> // Launch `SourceGit` to blame a file (HEAD version only) |
| 176 | +``` |
| 177 | + |
151 | 178 | ## OpenAI |
152 | 179 |
|
153 | 180 | This software supports using OpenAI or other AI service that has an OpenAI compatible HTTP API to generate commit message. You need configurate the service in `Preference` window. |
|
0 commit comments