fix i18n, revert rust-i18n to v3.0.1 (#267)

This commit is contained in:
Sijie.Sun
2024-08-20 00:38:59 +08:00
committed by GitHub
parent 58e0e48d59
commit 8793560e12
3 changed files with 36 additions and 7 deletions

38
Cargo.lock generated
View File

@@ -1647,6 +1647,7 @@ dependencies = [
"ring 0.17.8", "ring 0.17.8",
"rstest", "rstest",
"rust-i18n", "rust-i18n",
"rust-i18n-macro",
"rustls", "rustls",
"serde", "serde",
"serial_test", "serial_test",
@@ -3292,6 +3293,12 @@ version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64804cc6a5042d4f05379909ba25b503ec04e2c082151d62122d5dcaa274b961" checksum = "64804cc6a5042d4f05379909ba25b503ec04e2c082151d62122d5dcaa274b961"
[[package]]
name = "linked-hash-map"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.4.14" version = "0.4.14"
@@ -5065,9 +5072,9 @@ dependencies = [
[[package]] [[package]]
name = "rust-i18n" name = "rust-i18n"
version = "3.1.1" version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86c962de4e085155073c9ea6b00d8a8049f7dadfb63c62677615a248dd7b0443" checksum = "9dcd94370631e5658a0a23635f7f47e43d06a00ad948e0bb5de79b00d85b880c"
dependencies = [ dependencies = [
"globwalk", "globwalk",
"once_cell", "once_cell",
@@ -5079,9 +5086,9 @@ dependencies = [
[[package]] [[package]]
name = "rust-i18n-macro" name = "rust-i18n-macro"
version = "3.1.1" version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b727e4fde7339b901ed0a0d494c6ea576b5273c9692ff18db716b147b08dc68" checksum = "355763801dcf287e777e42def7c578410783477b804b1107852119e0b2518396"
dependencies = [ dependencies = [
"glob", "glob",
"once_cell", "once_cell",
@@ -5090,7 +5097,7 @@ dependencies = [
"rust-i18n-support", "rust-i18n-support",
"serde", "serde",
"serde_json", "serde_json",
"serde_yml", "serde_yaml",
"syn 2.0.74", "syn 2.0.74",
] ]
@@ -5493,6 +5500,18 @@ dependencies = [
"syn 2.0.74", "syn 2.0.74",
] ]
[[package]]
name = "serde_yaml"
version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b"
dependencies = [
"indexmap 1.9.3",
"ryu",
"serde",
"yaml-rust",
]
[[package]] [[package]]
name = "serde_yml" name = "serde_yml"
version = "0.0.11" version = "0.0.11"
@@ -7917,6 +7936,15 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "yaml-rust"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
dependencies = [
"linked-hash-map",
]
[[package]] [[package]]
name = "yasna" name = "yasna"
version = "0.5.2" version = "0.5.2"

View File

@@ -174,7 +174,8 @@ parking_lot = { version = "0.12.0", optional = true }
wildmatch = "2.3.4" wildmatch = "2.3.4"
rust-i18n = "3" rust-i18n = "=3.0.1"
rust-i18n-macro = "=3.0.0"
sys-locale = "0.3" sys-locale = "0.3"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]

View File

@@ -281,7 +281,7 @@ struct Cli {
socks5: Option<u16>, socks5: Option<u16>,
} }
rust_i18n::i18n!("locales"); rust_i18n::i18n!("locales", fallback = "en");
impl Cli { impl Cli {
fn parse_listeners(&self) -> Vec<String> { fn parse_listeners(&self) -> Vec<String> {