Commit Graph
224 Commits
Author SHA1 Message Date
Dimitri Papadopoulos 669bcc0a19 Fix typos found by codespell 2023-03-27 07:22:07 +02:00
Adam Turner 13442f6901 Fix pytest style issues 2023-02-18 02:16:50 +00:00
Adam Turner c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Adam Turner a13cf2c24d Adopt `profile = "black" for isort`
This allows using Ruff's import sorting fixers
2023-01-07 18:31:15 +00:00
Adam Turner 4032070e81 Run pyupgrade (#11070) 2023-01-02 00:01:14 +00:00
Adam Turner 965768bfda Fix tests for Pygments 2.14
Pygments 2.14 was released on 01/01/2023 [0]

[0]: https://pygments.org/docs/changelog/#version-2-14-0
2023-01-01 19:17:03 +00:00
James Addison 041e5f8268 Add test coverage for 'today_fmt' reference substitution (#10980) 2022-12-29 14:19:43 +00:00
Adam Turner 080517ce55 Increase minimum Docutils to 0.17 2022-09-27 18:31:47 +01:00
Adam Turner f35d2a6cc7 Remove Pygments compatability code (#10812) 2022-09-09 05:08:48 +01:00
Adam Turner 24e3b7c8c8 .read_text() -> .read_text(encoding='utf8') 2022-04-27 03:04:19 +01:00
Adam Turner 0447fbe60d Use docutils.__version_info__ directly 2022-04-22 04:21:38 +01:00
Adam Turner 55669f6cfc Specify encoding 2022-04-22 04:21:12 +01:00
Takeshi KOMIYA b20e04968e Merge pull request #10107 from Jean-Abou-Samra/intl-warnings
Implement #noqa for i18n
2022-03-27 23:00:57 +09:00
Adam Turner 6bb7b891a1 Remove copyright and licence fields 2022-02-20 03:06:23 +00:00
Adam Turner b691ebcc3e Conform to PEP 257 summary line conventions 2022-02-20 02:57:02 +00:00
Adam Turner 5694e0ce60 Fix module docstring indentation 2022-02-20 00:35:13 +00:00
Adam Turner 4f5a3269a6 Fix module docstring first line 2022-02-20 00:11:08 +00:00
Adam Turner 6b8bccec59 Remove module titles in docstrings 2022-02-19 23:17:29 +00:00
Jean Abou Samra 94d78d8747 Close #3985: Implement #noqa for i18n
When cross-references in the original paragraph and the translated
paragraph do not match, a warning is emitted.  It is useful, because
it allows to catch mistakes, but it can also be an annoyance since
sometimes it is expected that the cross-references will not match.
For example, a reference that is repeated in the original text may
need to be factored out for good style in the target language.
Another example: if the translator needs to translate a universally
understood term in the source language into a term that not everyone
knows is the translation of this original term, adding a reference to
the glossary can be warranted.  This allows the translated message to
start with '#noqa' in order to disable the warning.
2022-02-15 19:51:06 +01:00
Daniel Eades 6697ed62ed address some unused loop control variables (B007) 2022-01-12 20:19:18 +00:00
Jean Abou Samra 0269bec1ed In translated docs, sort glossaries by translated terms
This is done by moving the sorting from the glossary directive to a
transform operating after the i18n transform.

Closes #9827
2022-01-12 16:47:40 +01:00
Takeshi KOMIYA b84771dcd2 A happy new year! 2022-01-01 18:45:03 +09:00
Takeshi KOMIYA 203094b4c3 Close #9618: i18n: Add gettext_allow_fuzzy_translations 2021-11-10 01:32:02 +09:00
Takeshi KOMIYA bde6c8d2ef Fix test: Tests has been broken with pygments-2.10+ 2021-08-19 23:26:42 +09:00
Joe Nelson e6ae41ed52 Include "role" attribute in expected HTML fragment 2021-06-21 17:08:24 -05:00
igo95862 e67c9e5df1 doc: Upgrade docutils.sourceforge.io links to HTTPS
Also change any docutils.sourceforge.net link to io
top level domain.
2021-05-16 15:53:49 +03:00
Takeshi KOMIYA ce5d66e618 Merge pull request #9053 from tk0miya/title_node_for_toctree_caption
Fix #8870: Use title node for the caption of toctree
2021-04-09 01:35:46 +09:00
Takeshi KOMIYA 5604f9c420 Fix #8870: Use title node for the caption of toctree
Since docutils-0.17, the caption node should not use for the non-figure
nodes.  Therefore, this replaces it by the title node.
2021-04-09 01:02:29 +09:00
Takeshi KOMIYA 41a377fee5 Merge branch '3.x' 2021-04-04 00:06:45 +09:00
Takeshi KOMIYA a6d9b24a3b test: Update testcase for docutils-0.17 (toctree caption)
Since v0.17, docutils starts to use <figcaption> for caption on HTML
output.  This modifies the expected value of our testcases to support
it.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA 84b9d49826 test: Update testcase for docutils-0.17 (<section>)
Since v0.17, docutils starts to use <section> for section on HTML
output.  This modifies the expected value of our testcases to support
it.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA 4b452338f9 Merge branch '3.x' 2021-01-01 13:57:19 +09:00
Takeshi KOMIYA f996859420 A happy new year!
.. note::

   $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
   $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA 3a4ae2092a Merge branch '3.x' 2020-11-21 01:01:36 +09:00
Takeshi KOMIYA f86366a2df test: Merge testcases having the same name 2020-11-16 00:03:20 +09:00
Takeshi KOMIYA 279e547860 Merge branch '3.x' 2020-11-12 02:50:43 +09:00
François Freitag 0949735210 Sort imports with isort
Keep imports alphabetically sorted and their order homogeneous across
Python source files.

The isort project has more feature and is more active than the
flake8-import-order plugin.

Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA 598b85da75 Merge branch '3.x' into master 2020-10-04 22:41:44 +09:00
Takeshi KOMIYA 37235c71e0 Fix #6640: i18n: Failed to override system message translation
Our document describes that users can override system messages via
their own message catalog named `sphinx.mo` under the locale_dirs.
But it has not been used since its beginning of i18n mechanism because
the priority of users' message catalog is lower than system's.

This makes the priority of users' message catalog higher than system's.
2020-10-04 13:31:37 +09:00
Takeshi KOMIYA 327c187284 Merge branch '3.x' 2020-07-24 23:49:45 +09:00
Takeshi KOMIYA 35e1623338 Fix #4888: i18n: Failed to add an explicit title to `:ref:` role
To allow to give (or not to give) an explicit title to the
pending_xref nodes on translation, this skips to override the
attribute on merge original and translated documents.
2020-07-19 15:00:38 +09:00
Takeshi KOMIYA 897be0ebae Close #7784: i18n: The alt text for image is translated by default
Make alt text for image translatable by default without settings of
gettext_additional_targets.
2020-07-19 12:58:28 +09:00
Takeshi KOMIYA 7aa5584a47 Fix #7301: capital characters are not allowed for node_id 2020-03-29 23:55:56 +09:00
Takeshi KOMIYA 7bbf79c313 Fix #7301: Allow . and _ for node_id
In development of 3.0, Sphinx starts to obey to the rule of
"Identifier Normalization" of docutils.  This extends it to allow
dots(".") and underscores("_") for node identifier.

It allows Sphinx to generate node identifier from source string as
possible as it is (bacause dots and underscores are usually used in
many programming langauges).

This change will keep not to break hyperlinks as possible.
2020-03-22 16:39:00 +09:00
Takeshi KOMIYA 729efd28b0 py domain: Generate node_id for objects in the right way 2020-03-07 02:00:50 +09:00
Takeshi KOMIYA 4dd8b1022f test: Use read_text() and read_bytes() 2020-02-01 11:58:51 +09:00
Takeshi KOMIYA eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA 5a05cabd6a Fix #6867: text: extra spaces are inserted to hyphenated words on folding lines 2019-11-30 22:44:13 +09:00
Takeshi KOMIYA 5aee836dc1 Close #4683: i18n: make explicit titles in toctree translatable 2019-11-01 22:01:06 +09:00
Takeshi KOMIYA 95723aa6f6 Fix flake8 violations 2019-07-01 00:28:30 +09:00