1.0.1 |
|
---|---|
1.0.0 |
|
0.2.0 |
|
0.1.0 |
|
#301 在 #翻译
每月42 次下载
46KB
727 代码行
Copyright (C) 2020-2022 TheAwiteb
https://github.com/TheAwiteb/inrs
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
需求
特性
- 使用 Rust 🦀 编写。
- 按键(在 json 文件中)排序翻译。
- 添加缺失的键,在 json 文件中使用空翻译。
- 使用
create
命令创建新语言。 - 使用
update
命令在指定语言中添加/更新翻译。 - 使用
delete trans
命令按键从所有语言中删除翻译。 - 使用
delete lang
命令从 i18n 目录中删除语言。
缺点
- 仅支持 json 文件
安装
使用 Cargo
cargo install inrs
inrs --version
从源代码
# Clone the repo
git clone https://github.com/theawiteb/inrs.git
# Change directory to it
cd inrs
# Build it with cargo
cargo build --release
# Move the binary to `/usr/bin` (Unix like system) (need permission to move in `/usr/bin`)
# You can change binary directory to `~/.cargo/bin` if its exists and its in `$PATH`
sudo mv ./target/release/inrs /usr/bin/inrs
# Print the version
inrs --version
使用
USAGE:
inrs [OPTIONS] <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-p, --path <PATH> Path of i18n directory 📂 [default: i18n]
-V, --version Print version information
SUBCOMMANDS:
create Create new language file 🔤
delete Delete translation/language 🚧
help Print this message or the help of the given subcommand(s)
update Add/Update translation 🆕
图像
左 | 右 |
---|---|
许可证
GNU 通用公共许可证版本 3,更多信息请参阅 https://www.gnu.org/licenses/
依赖
~2–13MB
~97K SLoC