Skip to content

Commit 092c53f

Browse files
committed
feat: add internationalization (i18n) support
Add multi-language support using rust-i18n with 6 locales: - English (en) - source of truth - Spanish (es) - German (de) - French (fr) - Chinese (zh) - Russian (ru) Features: - Automatic system locale detection via sys-locale - Manual override via --lang flag or RUSTNET_LANG env var - Translated CLI help text, UI labels, error messages - CI check to ensure all translation keys are consistent The locale is detected before CLI parsing so that --help output is displayed in the user's language.
1 parent a481214 commit 092c53f

19 files changed

Lines changed: 2025 additions & 242 deletions

File tree

.github/workflows/rust.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- 'Cargo.lock'
1010
- 'assets/services'
1111
- 'build.rs'
12+
- 'assets/locales/**'
13+
- 'scripts/check-locales.py'
1214
- '.github/workflows/rust.yml'
1315
pull_request:
1416
branches: [ "main" ]
@@ -18,6 +20,8 @@ on:
1820
- 'Cargo.lock'
1921
- 'assets/services'
2022
- 'build.rs'
23+
- 'assets/locales/**'
24+
- 'scripts/check-locales.py'
2125
- '.github/workflows/rust.yml'
2226
workflow_dispatch:
2327

@@ -34,7 +38,13 @@ jobs:
3438
- uses: actions/checkout@v6
3539
- name: Install dependencies
3640
run: sudo apt-get update && sudo apt-get install -y libpcap-dev libelf-dev zlib1g-dev clang llvm pkg-config
41+
- name: Check translation keys
42+
run: python3 scripts/check-locales.py
3743
- name: Build
3844
run: cargo build --verbose
3945
- name: Run tests
4046
run: cargo test --verbose
47+
- name: Security audit
48+
run: |
49+
cargo install cargo-audit
50+
cargo audit

0 commit comments

Comments
 (0)