diff --git a/bin/generate-book/src/main.rs b/bin/generate-book/src/main.rs index 645f26c..54a40d6 100644 --- a/bin/generate-book/src/main.rs +++ b/bin/generate-book/src/main.rs @@ -27,6 +27,13 @@ impl Language { Self::Chinese => ".中文", } } + + fn introduction(&self) -> &'static str { + match self { + Self::Chinese => "说明", + Self::English => "Introduction", + } + } } fn main() -> Result<(), Box> { @@ -53,7 +60,7 @@ fn main() -> Result<(), Box> { cmark(chapter.iter(), &mut txt)?; let title = if i == 0 { txt = txt.split_inclusive('\n').skip(1).collect::(); - "Introduction" + language.introduction() } else { txt.lines().next().unwrap().split_once(' ').unwrap().1 }; diff --git a/book/zh/book.toml b/book/zh/book.toml index e0d677e..9ba38d8 100644 --- a/book/zh/book.toml +++ b/book/zh/book.toml @@ -2,7 +2,7 @@ authors = ["Casey Rodarmor"] language = "zh" src = "src" -title = "Just Programmer's Manual" +title = "Just 用户指南" [build] build-dir = "../../www/man/zh" diff --git a/www/index.html b/www/index.html index a8be532..2dfa4ff 100644 --- a/www/index.html +++ b/www/index.html @@ -16,7 +16,7 @@ discord crates.io
- 手冊 + 用户指南