| Crates.io | i18n-sync |
| lib.rs | i18n-sync |
| version | 0.1.0 |
| created_at | 2025-11-09 11:26:03.801545+00 |
| updated_at | 2025-11-09 11:26:03.801545+00 |
| description | A utility for syncing translation keys for rust_i18n |
| homepage | https://github.com/bircoder432/i18n-sync |
| repository | https://github.com/bircoder432/i18n-sync |
| max_upload_size | |
| id | 1924018 |
| size | 22,062 |
A command-line utility for automatically syncing translation keys in rust_i18n projects.
t!("key") and i18n!("key") macroscargo install i18n-sync
Basic usage with default settings:
i18n-sync --locale-dir ./locales
Scan specific source directory:
i18n-sync --path ./src --locale-dir ./locales --default-locale en
With short flags:
i18n-sync -l ./locales -d en
-p, --path <PATH> - Root path to scan for Rust files (default: ".")-l, --locale-dir <DIR> - Directory containing locale YAML files (required)-d, --default-locale <LOCALE> - Default locale (default: "en")Before running i18n-sync:
t!("hello") and t!("new_key")en.yml only has: hello: "Hello"After running i18n-sync, en.yml becomes:
hello: "Hello"
new_key: ""
All other locale files (like fr.yml, es.yml) will also get the new key with empty values.
Your project should look like:
your_project/
├── src/
│ └── *.rs (with t! macros)
└── locales/
├── en.yml
├── fr.yml
└── es.yml
MIT