mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
[docs] Suppress inconsistent references in translated message warning
This commit is contained in:
parent
4f85494c11
commit
2c72fc9cde
16
docs/conf.py
16
docs/conf.py
@ -11,6 +11,7 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
@ -150,6 +151,21 @@ nitpick_ignore_files = [
|
||||
"whats_new",
|
||||
]
|
||||
|
||||
|
||||
# Ignore warnings about inconsistent order and/or count of references in translated messages.
|
||||
# This makes no sense, different languages can have different word order...
|
||||
def _i18n_warning_filter(record: logging.LogRecord) -> bool:
|
||||
return not record.msg.startswith(
|
||||
(
|
||||
'inconsistent references in translated message',
|
||||
'inconsistent term references in translated message',
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
_i18n_logger = logging.getLogger('sphinx')
|
||||
_i18n_logger.addFilter(_i18n_warning_filter)
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
html_experimental_html5_writer = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user