[Bf-docboard-svn] bf-manual: [9289] branches/blender-3.2-release/blender_docs/manual/conf.py: Build: Fix build error for translations and newer sphinx version
Aaron Carlisle
noreply at blender.org
Thu May 19 05:25:28 CEST 2022
Revision: 9289
https://developer.blender.org/rBM9289
Author: Blendify
Date: 2022-05-19 05:25:28 +0200 (Thu, 19 May 2022)
Log Message:
-----------
Build: Fix build error for translations and newer sphinx version
The sphinx api change for `CatalogInfo.write_mo` has changed,
which broke builds.
Now add the 3rd positional argument for newer versions of sphinx.
Modified Paths:
--------------
branches/blender-3.2-release/blender_docs/manual/conf.py
Modified: branches/blender-3.2-release/blender_docs/manual/conf.py
===================================================================
--- branches/blender-3.2-release/blender_docs/manual/conf.py 2022-05-19 02:52:56 UTC (rev 9288)
+++ branches/blender-3.2-release/blender_docs/manual/conf.py 2022-05-19 03:25:28 UTC (rev 9289)
@@ -13,6 +13,9 @@
import os
import sys
+
+from sphinx import version_info as sphinx_version
+
sys.path.insert(0, os.path.abspath(os.path.join('..', 'exts')))
# Sphinx errors out on single threaded builds see T86621
@@ -452,8 +455,12 @@
except ImportError:
return
CatalogInfo._write_mo_real = CatalogInfo.write_mo
- CatalogInfo.write_mo = lambda self, locale: CatalogInfo._write_mo_real(
- self, locale.replace('-', '_'))
+ if sphinx_version >= (4, 3, 0):
+ CatalogInfo.write_mo = lambda self, locale, use_fuzzy: CatalogInfo._write_mo_real(
+ self, locale.replace('-', '_'))
+ else:
+ CatalogInfo.write_mo = lambda self, locale: CatalogInfo._write_mo_real(
+ self, locale.replace('-', '_'))
monkey_patch_babl_locale_dash()
More information about the Bf-docboard-svn
mailing list