mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7281 from rffontenelle/improve-strings
Improve strings
This commit is contained in:
commit
46b4f595ca
@ -486,7 +486,7 @@ def patch_settings(settings: Any) -> Any:
|
|||||||
def validate_config_values(app: Sphinx, config: Config) -> None:
|
def validate_config_values(app: Sphinx, config: Config) -> None:
|
||||||
for key in list(config.latex_elements):
|
for key in list(config.latex_elements):
|
||||||
if key not in DEFAULT_SETTINGS:
|
if key not in DEFAULT_SETTINGS:
|
||||||
msg = __("Unknown configure key: latex_elements[%r]. ignored.")
|
msg = __("Unknown configure key: latex_elements[%r], ignored.")
|
||||||
logger.warning(msg % (key,))
|
logger.warning(msg % (key,))
|
||||||
config.latex_elements.pop(key)
|
config.latex_elements.pop(key)
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ files can be built by specifying individual filenames.
|
|||||||
group.add_argument('-W', action='store_true', dest='warningiserror',
|
group.add_argument('-W', action='store_true', dest='warningiserror',
|
||||||
help=__('turn warnings into errors'))
|
help=__('turn warnings into errors'))
|
||||||
group.add_argument('--keep-going', action='store_true', dest='keep_going',
|
group.add_argument('--keep-going', action='store_true', dest='keep_going',
|
||||||
help=__("With -W, keep going when getting warnings"))
|
help=__("with -W, keep going when getting warnings"))
|
||||||
group.add_argument('-T', action='store_true', dest='traceback',
|
group.add_argument('-T', action='store_true', dest='traceback',
|
||||||
help=__('show full traceback on exception'))
|
help=__('show full traceback on exception'))
|
||||||
group.add_argument('-P', action='store_true', dest='pdb',
|
group.add_argument('-P', action='store_true', dest='pdb',
|
||||||
|
@ -614,7 +614,7 @@ class Documenter:
|
|||||||
if skip_user is not None:
|
if skip_user is not None:
|
||||||
keep = not skip_user
|
keep = not skip_user
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(__('autodoc: failed to determine %r to be documented.'
|
logger.warning(__('autodoc: failed to determine %r to be documented, '
|
||||||
'the following exception was raised:\n%s'),
|
'the following exception was raised:\n%s'),
|
||||||
member, exc, type='autodoc')
|
member, exc, type='autodoc')
|
||||||
keep = False
|
keep = False
|
||||||
|
@ -150,7 +150,7 @@ def generate_autosummary_content(name: str, obj: Any, parent: Any,
|
|||||||
return app.emit_firstresult('autodoc-skip-member', objtype, name,
|
return app.emit_firstresult('autodoc-skip-member', objtype, name,
|
||||||
obj, False, {})
|
obj, False, {})
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(__('autosummary: failed to determine %r to be documented.'
|
logger.warning(__('autosummary: failed to determine %r to be documented, '
|
||||||
'the following exception was raised:\n%s'),
|
'the following exception was raised:\n%s'),
|
||||||
name, exc, type='autosummary')
|
name, exc, type='autosummary')
|
||||||
return False
|
return False
|
||||||
|
@ -38,7 +38,7 @@ class ImagemagickConverter(ImageConverter):
|
|||||||
subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)
|
subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)
|
||||||
return True
|
return True
|
||||||
except OSError:
|
except OSError:
|
||||||
logger.warning(__('convert command %r cannot be run.'
|
logger.warning(__('convert command %r cannot be run, '
|
||||||
'check the image_converter setting'),
|
'check the image_converter setting'),
|
||||||
self.config.image_converter)
|
self.config.image_converter)
|
||||||
return False
|
return False
|
||||||
@ -62,7 +62,7 @@ class ImagemagickConverter(ImageConverter):
|
|||||||
subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)
|
subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)
|
||||||
return True
|
return True
|
||||||
except OSError:
|
except OSError:
|
||||||
logger.warning(__('convert command %r cannot be run.'
|
logger.warning(__('convert command %r cannot be run, '
|
||||||
'check the image_converter setting'),
|
'check the image_converter setting'),
|
||||||
self.config.image_converter)
|
self.config.image_converter)
|
||||||
return False
|
return False
|
||||||
|
@ -359,7 +359,7 @@ def normalize_intersphinx_mapping(app: Sphinx, config: Config) -> None:
|
|||||||
else:
|
else:
|
||||||
config.intersphinx_mapping[key] = (name, (uri, inv))
|
config.intersphinx_mapping[key] = (name, (uri, inv))
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(__('Fail to read intersphinx_mapping[%s], Ignored: %r'), key, exc)
|
logger.warning(__('Failed to read intersphinx_mapping[%s], ignored: %r'), key, exc)
|
||||||
config.intersphinx_mapping.pop(key)
|
config.intersphinx_mapping.pop(key)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user