mirror of
https://github.com/casey/just.git
synced 2024-11-22 18:34:06 +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 => ".中文",
|
||||
}
|
||||
}
|
||||
|
||||
fn introduction(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Chinese => "说明",
|
||||
Self::English => "Introduction",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
@ -53,7 +60,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
cmark(chapter.iter(), &mut txt)?;
|
||||
let title = if i == 0 {
|
||||
txt = txt.split_inclusive('\n').skip(1).collect::<String>();
|
||||
"Introduction"
|
||||
language.introduction()
|
||||
} else {
|
||||
txt.lines().next().unwrap().split_once(' ').unwrap().1
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Casey Rodarmor"]
|
||||
language = "zh"
|
||||
src = "src"
|
||||
title = "Just Programmer's Manual"
|
||||
title = "Just 用户指南"
|
||||
|
||||
[build]
|
||||
build-dir = "../../www/man/zh"
|
||||
|
@ -16,7 +16,7 @@
|
||||
<a href="https://discord.gg/ezYScXR">discord</a>
|
||||
<a href="https://crates.io/crates/just">crates.io</a>
|
||||
<div></div>
|
||||
<a href="man/zh/">手冊</a>
|
||||
<a href="man/zh/">用户指南</a>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user