Skip to content

Commit c11e1a8

Browse files
committed
readme update for language
1 parent fd19218 commit c11e1a8

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "typy-cli"
3-
version = "0.1.0"
3+
version = "0.7.0"
44
edition = "2021"
55

66
[dependencies]

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ style = "SteadyBar" # possible options are: DefaultUserShape, BlinkingBlock, Ste
105105
default_mode = "normal" # possible modes are "normal"|"uppercase"|"punctuation", combinations of modes is also possible e.g: "uppercase, punctuation"
106106
uppercase_chance = "3" # possible are values between 0 and 1, if value is too high it gets clamped to 1, if too low it gets clamped to 0
107107
punctuation_chance = "0.5" # possible are values between 0 and 1, if value is too high it gets clamped to 1, if too low it gets clamped to 0
108+
109+
[language]
110+
lang = "english" # select your desired language
108111
```
109112
110113
To apply the configuration, you can either edit the `config.toml` file directly or use the `typy -c` command to to open the file in your preferred editor:
@@ -127,6 +130,18 @@ This will display the stats of the last 10 games and looks something like this:
127130
![Stats](./docs/assets/snapshot_2025-02-24_00-28-16.png)
128131
To close this view press `Ctrl + c` or `esc`.
129132
133+
## Language
134+
The language files are located at `~/.local/share/typy/`. The default language is `english`. You can change the language by editing the `config.toml` file or by using the
135+
`typy -c` command. If you want to add a new language you can create a new file in the `~/.local/share/typy/` directory and add the words in the following format:
136+
```txt
137+
word1
138+
word2
139+
...
140+
```
141+
The language file should be named after the language you want to add. For example, if you want to add a German language file, you would create a file named `german.txt` and add the German words to it.
142+
If you want to use the new language you need to change the `lang` field in the `config.toml` file to the name of the language file without the `.txt` extension.
143+
If you want to provide a new language to the Typy repository, feel free to create a pull request. Atm I only have the `english.txt` file in the repository.
144+
130145
## Uninstall
131146
```bash
132147
curl -sSL https://raw.githubusercontent.com/Pazl27/typy-cli/master/scripts/uninstall.sh | bash

0 commit comments

Comments
 (0)