Open
Description
The news section contains mostly commit messages in the monthly newsletters, it also doesn't seem like a useful effort to translate those as the benefit is rather minimal.
We should find a strategy to remove the posts from the news section when running gettext to avoid that the strings appear in the translation in the first place. A quick hack might be adding a tag like shown here
diff --git a/intl.py b/intl.py
index 74d6da866..f9f8f4dba 100644
--- a/intl.py
+++ b/intl.py
@@ -56,7 +56,7 @@ def intl_gettext() -> None:
"""
subprocess.run(
- ["sphinx-build", "-b", "gettext", srcdir, outdir],
+ ["sphinx-build", "-b", "gettext", "-t", "gettext", srcdir, outdir],
cwd=root,
check=True,
)
diff --git a/source/conf.py b/source/conf.py
index 60a06560b..2abc5bbf9 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -186,6 +186,9 @@ html_sidebars = {
}
html_title = "Fortran Programming Language"
html_logo = "_static/images/fortran-logo-256x256.png"
+exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
+if tags.has("gettext"):
+ exclude_patterns.append("news/**")
master_doc = "index"
However, it would be better to just check which builder is currently used and add the required exclude pattern based on this information. Localized news are probably better provided by having multiple language specific news sections, maybe with the English plus local one being displayed on the webpage.