mirror of
https://github.com/casey/just.git
synced 2024-11-26 11:43:43 +03:00
Translate Chinese manual introduction and title (#1220)
This commit is contained in:
parent
97fde19a93
commit
543264b2f0
@ -27,6 +27,13 @@ impl Language {
|
|||||||
Self::Chinese => ".中文",
|
Self::Chinese => ".中文",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn introduction(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::Chinese => "说明",
|
||||||
|
Self::English => "Introduction",
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn Error>> {
|
fn main() -> Result<(), Box<dyn Error>> {
|
||||||
@ -53,7 +60,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
cmark(chapter.iter(), &mut txt)?;
|
cmark(chapter.iter(), &mut txt)?;
|
||||||
let title = if i == 0 {
|
let title = if i == 0 {
|
||||||
txt = txt.split_inclusive('\n').skip(1).collect::<String>();
|
txt = txt.split_inclusive('\n').skip(1).collect::<String>();
|
||||||
"Introduction"
|
language.introduction()
|
||||||
} else {
|
} else {
|
||||||
txt.lines().next().unwrap().split_once(' ').unwrap().1
|
txt.lines().next().unwrap().split_once(' ').unwrap().1
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
authors = ["Casey Rodarmor"]
|
authors = ["Casey Rodarmor"]
|
||||||
language = "zh"
|
language = "zh"
|
||||||
src = "src"
|
src = "src"
|
||||||
title = "Just Programmer's Manual"
|
title = "Just 用户指南"
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
build-dir = "../../www/man/zh"
|
build-dir = "../../www/man/zh"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<a href="https://discord.gg/ezYScXR">discord</a>
|
<a href="https://discord.gg/ezYScXR">discord</a>
|
||||||
<a href="https://crates.io/crates/just">crates.io</a>
|
<a href="https://crates.io/crates/just">crates.io</a>
|
||||||
<div></div>
|
<div></div>
|
||||||
<a href="man/zh/">手冊</a>
|
<a href="man/zh/">用户指南</a>
|
||||||
<div></div>
|
<div></div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user