From 92cd4e0169f62865932c81eabc9200bd14083117 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 2 Feb 2025 23:10:40 +0100 Subject: [PATCH] Add i18n settings to docs config and change the documentation title to pull it from the main index file --- docs/source/conf.py | 13 ++++++++++--- docs/source/index.rst | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 72ddad50..9162893d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,15 +5,20 @@ Documentation: http://www.sphinx-doc.org/en/master/config # -- Imports ----------------------------------------------------------------- +import datetime import os import time -import datetime # -- Project Information ----------------------------------------------------- project = "novelWriter" copyright = f"{datetime.date.today().year}" -author = "Veronica Berglyd Olsen" + +tmp_authors = ["Veronica Berglyd Olsen"] +if additional := os.environ.get("SPHINX_I18N_AUTHORS"): + tmp_authors.extend(a.strip() for a in additional.split(",")) + +author = ", ".join(tmp_authors) initFile = os.path.join( os.path.dirname(__file__), os.pardir, os.pardir, @@ -41,6 +46,8 @@ source_suffix = ".rst" master_doc = "index" today_fmt = "%A, %d %B %Y at %H:%M" language = "en" +locale_dirs = ["locales/"] +gettext_compact = False exclude_patterns = [] # -- Options for HTML Output ------------------------------------------------- @@ -80,5 +87,5 @@ latex_elements = { } latex_logo = "_static/novelwriter-pdf.png" latex_documents = [( - master_doc, "manual.tex", "User Guide", author, "manual" + master_doc, "manual.tex", None, author, "manual" )] diff --git a/docs/source/index.rst b/docs/source/index.rst index c10ea5e9..d472746b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,6 +1,6 @@ -###################### -novelWriter User Guide -###################### +########## +User Guide +########## | **Release Version:** |release| | **Updated:** |today|