From 96eab23c72e946cecb45a850785d7806eb7b7a8e Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Wed, 22 Feb 2023 15:30:42 +0900 Subject: [PATCH] Pass `translations` to HTML renderer --- src/renderer/html_handlebars/hbs_renderer.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index e170e2fc..e1e99fd6 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -635,6 +635,12 @@ fn make_data( "language".to_owned(), json!(config.book.language.clone().unwrap_or_default()), ); + if !config.book.translations.is_empty() { + data.insert( + "translations".to_owned(), + json!(config.book.translations), + ); + } data.insert( "book_title".to_owned(), json!(config.book.title.clone().unwrap_or_default()),