Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-11-09 19:45:07 +0300
committerGitHub <noreply@github.com>2021-11-09 19:45:07 +0300
commit1317eeedaeef0895e82de06d4a8c8a9080f9d12b (patch)
tree466961b4388662315d3acef01dc8a928485d415f /sphinx/util
parent563936b969dfc29ade7d48f1a802d5f6f6348f4c (diff)
parent203094b4c3d0db34527281bd29601ab418325d5c (diff)
Merge pull request #9828 from tk0miya/9618_gettext_allow_fuzzy_translations
Close #9618: i18n: Add gettext_allow_fuzzy_translations
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/i18n.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py
index e82e33f57..02b42cf0b 100644
--- a/sphinx/util/i18n.py
+++ b/sphinx/util/i18n.py
@@ -59,7 +59,7 @@ class CatalogInfo(LocaleFileInfoBase):
not path.exists(self.mo_path) or
path.getmtime(self.mo_path) < path.getmtime(self.po_path))
- def write_mo(self, locale: str) -> None:
+ def write_mo(self, locale: str, use_fuzzy: bool = False) -> None:
with open(self.po_path, encoding=self.charset) as file_po:
try:
po = read_po(file_po, locale)
@@ -69,7 +69,7 @@ class CatalogInfo(LocaleFileInfoBase):
with open(self.mo_path, 'wb') as file_mo:
try:
- write_mo(file_mo, po)
+ write_mo(file_mo, po, use_fuzzy)
except Exception as exc:
logger.warning(__('writing error: %s, %s'), self.mo_path, exc)