From 8ce359f47479f4d93a6faea3342ef53b9b83a23f Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 10 Dec 2024 11:17:19 +0800 Subject: [PATCH] chore: Add use cases and rename `longbridgeapp` to `longbridge`. (#99) --- Cargo.toml | 2 +- README.md | 16 ++++++++++++---- build.rs | 2 +- crates/cli/Cargo.toml | 2 +- crates/cli/src/main.rs | 2 +- crates/extract/Cargo.toml | 2 +- crates/macro/Cargo.toml | 2 +- crates/support/Cargo.toml | 2 +- examples/app-workspace/README.md | 2 +- tests/integration_tests.rs | 2 +- 10 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0b64683..2b0bbc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ keywords = [ license = "MIT" name = "rust-i18n" readme = "README.md" -repository = "https://github.com/longbridgeapp/rust-i18n" +repository = "https://github.com/longbridge/rust-i18n" version = "3.1.2" [workspace.dependencies] diff --git a/README.md b/README.md index 9ea944c..eb819f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rust I18n -[![CI](https://github.com/longbridgeapp/rust-i18n/actions/workflows/ci.yml/badge.svg)](https://github.com/longbridgeapp/rust-i18n/actions/workflows/ci.yml) [![Docs](https://docs.rs/rust-i18n/badge.svg)](https://docs.rs/rust-i18n/) [![Crates.io](https://img.shields.io/crates/v/rust-i18n.svg)](https://crates.io/crates/rust-i18n) +[![CI](https://github.com/longbridge/rust-i18n/actions/workflows/ci.yml/badge.svg)](https://github.com/longbridge/rust-i18n/actions/workflows/ci.yml) [![Docs](https://docs.rs/rust-i18n/badge.svg)](https://docs.rs/rust-i18n/) [![Crates.io](https://img.shields.io/crates/v/rust-i18n.svg)](https://crates.io/crates/rust-i18n) > 🎯 Let's make I18n things to easy! @@ -305,13 +305,13 @@ Now you call [`t!`] will lookup translates from your own backend first, if not f ## Example -A minimal example of using rust-i18n can be found [here](https://github.com/longbridgeapp/rust-i18n/tree/main/examples). +A minimal example of using rust-i18n can be found [here](https://github.com/longbridge/rust-i18n/tree/main/examples). ## I18n Ally I18n Ally is a VS Code extension for helping you translate your Rust project. -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. +You can add [i18n-ally-custom-framework.yml](https://github.com/longbridge/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. ## Extractor @@ -389,7 +389,7 @@ Rust I18n command to help you extract all untranslated texts from source code. It will iterate all Rust files in the source directory and extract all untranslated texts that used `t!` macro. Then it will generate a YAML file and merge with the existing translations. -https://github.com/longbridgeapp/rust-i18n +https://github.com/longbridge/rust-i18n Usage: cargo i18n [OPTIONS] [-- ] @@ -442,6 +442,14 @@ t_lorem_ipsum time: [33.867 ns 34.286 ns 34.751 ns] The result `101 ns (0.0001 ms)` means if there have **10K** translate texts, it will cost `1ms`. +## Use Cases + +- [longbridge-terminal](https://github.com/longbridge/longbridge-terminal) +- [topgrade](https://github.com/topgrade-rs/topgrade) +- [trippy](https://github.com/fujiapple852/trippy) +- [hyperswitch](https://github.com/juspay/hyperswitch) +- [MirrorX](https://github.com/MirrorX-Desktop/MirrorX) + ## License MIT diff --git a/build.rs b/build.rs index 8e65a2b..7e99482 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ -// https://github.com/longbridgeapp/rust-i18n/blob/v0.1.6/crates/support/src/lib.rs#L9 +// https://github.com/longbridge/rust-i18n/blob/v0.1.6/crates/support/src/lib.rs#L9 fn workdir() -> Option { if let Ok(cargo_manifest_dir) = std::env::var("CARGO_MANIFEST_DIR") { return Some(cargo_manifest_dir); diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 5d03609..faa70a5 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "rust-i18n-cli" readme = "../../README.md" -repository = "https://github.com/longbridgeapp/rust-i18n" +repository = "https://github.com/longbridge/rust-i18n" version = "3.1.1" [dependencies] diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index f68f27a..f1722a1 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -21,7 +21,7 @@ enum CargoCli { /// that used `t!` macro. /// Then it will generate a YAML file and merge with the existing translations. /// -/// https://github.com/longbridgeapp/rust-i18n +/// https://github.com/longbridge/rust-i18n struct I18nArgs { /// Manually add a translation to the localization file. /// diff --git a/crates/extract/Cargo.toml b/crates/extract/Cargo.toml index 4fe41bf..73e0f58 100644 --- a/crates/extract/Cargo.toml +++ b/crates/extract/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "rust-i18n-extract" readme = "../../README.md" -repository = "https://github.com/longbridgeapp/rust-i18n" +repository = "https://github.com/longbridge/rust-i18n" version = "3.1.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml index 9c06ba8..ed4dfbb 100644 --- a/crates/macro/Cargo.toml +++ b/crates/macro/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "rust-i18n-macro" readme = "../../README.md" -repository = "https://github.com/longbridgeapp/rust-i18n" +repository = "https://github.com/longbridge/rust-i18n" version = "3.1.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/support/Cargo.toml b/crates/support/Cargo.toml index d8c5574..b9ed229 100644 --- a/crates/support/Cargo.toml +++ b/crates/support/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "rust-i18n-support" readme = "../../README.md" -repository = "https://github.com/longbridgeapp/rust-i18n" +repository = "https://github.com/longbridge/rust-i18n" version = "3.1.2" [dependencies] diff --git a/examples/app-workspace/README.md b/examples/app-workspace/README.md index 508978a..71e489d 100644 --- a/examples/app-workspace/README.md +++ b/examples/app-workspace/README.md @@ -1 +1 @@ -This is a minimal example of [rust-i18n](https://github.com/longbridgeapp/rust-i18n/). +This is a minimal example of [rust-i18n](https://github.com/longbridge/rust-i18n/). diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 9708930..a8cd41a 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -316,7 +316,7 @@ mod tests { ); } - // https://github.com/longbridgeapp/rust-i18n/issues/87 + // https://github.com/longbridge/rust-i18n/issues/87 #[test] fn test_set_locale_on_initialize() { rust_i18n::set_locale("zh-CN");