Skip to content

Commit 2111326

Browse files
committed
version 2.3.0
1 parent 470d99b commit 2111326

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ license = "MIT"
1010
name = "rust-i18n"
1111
readme = "README.md"
1212
repository = "https://github.com/longbridgeapp/rust-i18n"
13-
version = "2.2.1"
13+
version = "2.3.0"
1414

1515
[dependencies]
1616
once_cell = "1.10.0"
17-
rust-i18n-support = {path = "./crates/support", version = "2.1.0"}
18-
rust-i18n-macro = {path = "./crates/macro", version = "2.1.0"}
17+
rust-i18n-support = {path = "./crates/support", version = "2.3.0"}
18+
rust-i18n-macro = {path = "./crates/macro", version = "2.3.0"}
1919

2020
[dev-dependencies]
2121
foo = {path = "examples/foo"}

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ release\:support:
44
cd crates/support && cargo release --no-dev-version --skip-tag --skip-push
55
release\:extract:
66
cd crates/extract && cargo release --no-dev-version --skip-tag --skip-push
7+
release\:cli:
8+
cd crates/cli && cargo release --no-dev-version --skip-tag --skip-push
79
release:
810
cargo release
911
test:

README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ You can use `_version` key to specify the version of the locale file, and the de
7474

7575
### Split Localized Texts into Difference Files
7676

77-
> _version: 1
77+
> \_version: 1
7878
7979
You can also split the each language into difference files, and you can choise (YAML, JSON, TOML), for example: `en.json`:
8080

@@ -91,8 +91,8 @@ You can also split the each language into difference files, and you can choise (
9191

9292
```yml
9393
_version: 1
94-
hello: "Hello world"
95-
messages.hello: "Hello, %{name}"
94+
hello: 'Hello world'
95+
messages.hello: 'Hello, %{name}'
9696
```
9797
9898
Or use JSON or TOML format, just rename the file to `en.json` or `en.toml`, and the content is like this:
@@ -114,7 +114,7 @@ hello = "Hello, %{name}"
114114

115115
### All Localized Texts in One File
116116

117-
> _version: 2
117+
> \_version: 2
118118

119119
Make sure all localized files (containing the localized mappings) are located in the `locales/` folder of the project root directory:
120120

@@ -137,7 +137,6 @@ Make sure all localized files (containing the localized mappings) are located in
137137

138138
In the localized files, specify the localization keys and their corresponding values, for example, in `app.yml`:
139139

140-
141140
```yml
142141
_version: 2
143142
hello:
@@ -273,19 +272,18 @@ I18n Ally is a VS Code extension for helping you translate your Rust project.
273272

274273
You can add [i18n-ally-custom-framework.yml](https://github.com/longbridgeapp/rust-i18n/blob/main/.vscode/i18n-ally-custom-framework.yml) to your project `.vscode` directory, and then use I18n Ally can parse `t!` marco to show translate text in VS Code editor.
275274

276-
277275
## Extractor
278276

279-
> __Experimental__
277+
> **Experimental**
280278

281279
We provided a `cargo i18n` command line tool for help you extract the untranslated texts from the source code and then write into YAML file.
282280

283281
> In current only output YAML, and use `_version: 2` format.
284282

285-
You can install it via `cargo install rust-i18n`, then you get `cargo i18n` command.
283+
You can install it via `cargo install rust-i18n-cli`, then you get `cargo i18n` command.
286284

287285
```bash
288-
$ cargo install rust-i18n
286+
$ cargo install rust-i18n-cli
289287
```
290288

291289
### Extractor Config
@@ -309,7 +307,7 @@ $ cargo install rust-i18n
309307
Rust I18n providered a `i18n` bin for help you extract the untranslated texts from the source code and then write into YAML file.
310308

311309
```bash
312-
$ cargo install rust-i18n
310+
$ cargo install rust-i18n-cli
313311
# Now you have `cargo i18n` command
314312
```
315313

crates/cli/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ license = "MIT"
55
name = "rust-i18n-cli"
66
readme = "../../README.md"
77
repository = "https://github.com/longbridgeapp/rust-i18n"
8-
version = "2.1.0"
8+
version = "2.3.0"
99

1010
[dependencies]
1111
anyhow = "1"
1212
clap = { version = "4.1.14", features = ["derive"] }
1313
itertools = "0.11.0"
14-
rust-i18n-support = { path = "../support", version = "2.1.0" }
15-
rust-i18n-extract = { path = "../extract", version = "2.1.0" }
14+
rust-i18n-support = { path = "../support", version = "2.3.0" }
15+
rust-i18n-extract = { path = "../extract", version = "2.3.0" }
1616
serde = { version = "1", features = ["derive"] }
1717
toml = "0.7.4"
1818

crates/cli/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn main() -> Result<(), Error> {
4949

5050
let output_path = Path::new(&source_path).join(&cfg.load_path);
5151

52-
let result = generator::generate(&output_path, &cfg.available_locales, messages.clone());
52+
let result = generator::generate(output_path, &cfg.available_locales, messages.clone());
5353
if result.is_err() {
5454
has_error = true;
5555
}

crates/extract/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT"
55
name = "rust-i18n-extract"
66
readme = "../../README.md"
77
repository = "https://github.com/longbridgeapp/rust-i18n"
8-
version = "2.1.0"
8+
version = "2.3.0"
99

1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

@@ -15,7 +15,7 @@ ignore = "0.4"
1515
proc-macro2 = { version = "1", features = ["span-locations"] }
1616
quote = "1"
1717
regex = "1"
18-
rust-i18n-support = { path = "../support", version = "2.1.0" }
18+
rust-i18n-support = { path = "../support", version = "2.3.0" }
1919
serde = "1"
2020
serde_json = "1"
2121
serde_yaml = "0.8"

crates/macro/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT"
55
name = "rust-i18n-macro"
66
readme = "../../README.md"
77
repository = "https://github.com/longbridgeapp/rust-i18n"
8-
version = "2.1.0"
8+
version = "2.3.0"
99

1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

@@ -14,14 +14,14 @@ glob = "0.3"
1414
once_cell = "1.10.0"
1515
proc-macro2 = "1.0"
1616
quote = "1.0.2"
17-
rust-i18n-support = { path = "../support", version = "2.1.0" }
17+
rust-i18n-support = { path = "../support", version = "2.3.0" }
1818
serde = "1"
1919
serde_json = "1"
2020
serde_yaml = "0.8"
2121
syn = "2.0.18"
2222

2323
[dev-dependencies]
24-
rust-i18n = { path = "../..", version = "*" }
24+
rust-i18n = { path = "../.." }
2525

2626
[lib]
2727
proc-macro = true

crates/support/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT"
55
name = "rust-i18n-support"
66
readme = "../../README.md"
77
repository = "https://github.com/longbridgeapp/rust-i18n"
8-
version = "2.1.0"
8+
version = "2.3.0"
99

1010
[dependencies]
1111
globwalk = "0.8.1"

0 commit comments

Comments
 (0)