Merge pull request #2689 from ehuss/revert-multilingual
Revert: Remove the book.multilingual field and don't serialize it
This commit is contained in:
commit
2a4e5140c9
2 changed files with 9 additions and 0 deletions
|
|
@ -117,6 +117,7 @@ mod nop_lib {
|
||||||
"book": {
|
"book": {
|
||||||
"authors": ["AUTHOR"],
|
"authors": ["AUTHOR"],
|
||||||
"language": "en",
|
"language": "en",
|
||||||
|
"multilingual": false,
|
||||||
"src": "src",
|
"src": "src",
|
||||||
"title": "TITLE"
|
"title": "TITLE"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -420,6 +420,11 @@ pub struct BookConfig {
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
/// Location of the book source relative to the book's root directory.
|
/// Location of the book source relative to the book's root directory.
|
||||||
pub src: PathBuf,
|
pub src: PathBuf,
|
||||||
|
/// Does this book support more than one language?
|
||||||
|
// TODO: Remove this field in 0.5, it is unused:
|
||||||
|
// https://github.com/rust-lang/mdBook/issues/2636
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
pub multilingual: bool,
|
||||||
/// The main language of the book.
|
/// The main language of the book.
|
||||||
pub language: Option<String>,
|
pub language: Option<String>,
|
||||||
/// The direction of text in the book: Left-to-right (LTR) or Right-to-left (RTL).
|
/// The direction of text in the book: Left-to-right (LTR) or Right-to-left (RTL).
|
||||||
|
|
@ -434,6 +439,7 @@ impl Default for BookConfig {
|
||||||
authors: Vec::new(),
|
authors: Vec::new(),
|
||||||
description: None,
|
description: None,
|
||||||
src: PathBuf::from("src"),
|
src: PathBuf::from("src"),
|
||||||
|
multilingual: false,
|
||||||
language: Some(String::from("en")),
|
language: Some(String::from("en")),
|
||||||
text_direction: None,
|
text_direction: None,
|
||||||
}
|
}
|
||||||
|
|
@ -817,6 +823,7 @@ mod tests {
|
||||||
title = "Some Book"
|
title = "Some Book"
|
||||||
authors = ["Michael-F-Bryan <michaelfbryan@gmail.com>"]
|
authors = ["Michael-F-Bryan <michaelfbryan@gmail.com>"]
|
||||||
description = "A completely useless book"
|
description = "A completely useless book"
|
||||||
|
multilingual = true
|
||||||
src = "source"
|
src = "source"
|
||||||
language = "ja"
|
language = "ja"
|
||||||
|
|
||||||
|
|
@ -855,6 +862,7 @@ mod tests {
|
||||||
title: Some(String::from("Some Book")),
|
title: Some(String::from("Some Book")),
|
||||||
authors: vec![String::from("Michael-F-Bryan <michaelfbryan@gmail.com>")],
|
authors: vec![String::from("Michael-F-Bryan <michaelfbryan@gmail.com>")],
|
||||||
description: Some(String::from("A completely useless book")),
|
description: Some(String::from("A completely useless book")),
|
||||||
|
multilingual: true,
|
||||||
src: PathBuf::from("source"),
|
src: PathBuf::from("source"),
|
||||||
language: Some(String::from("ja")),
|
language: Some(String::from("ja")),
|
||||||
text_direction: None,
|
text_direction: None,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue