Skip to content

Commit 3a95337

Browse files
committed
Merge tag '11.6.0' into rel
2 parents 282d525 + 6b9f1a6 commit 3a95337

File tree

13 files changed

+64
-81
lines changed

13 files changed

+64
-81
lines changed

CHANGELOG.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
Version 11.6.0
2+
--------------
3+
4+
:Date: August 20, 2024
5+
6+
* `@stsewd <https://github.com/stsewd>`__: Update common (`#11552 <https://github.com/readthedocs/readthedocs.org/pull/11552>`__)
7+
* `@humitos <https://github.com/humitos>`__: Docs: make translation section more generic (`#11549 <https://github.com/readthedocs/readthedocs.org/pull/11549>`__)
8+
* `@webknjaz <https://github.com/webknjaz>`__: Fix a typo in "invited" in email notification subjects (`#11546 <https://github.com/readthedocs/readthedocs.org/pull/11546>`__)
9+
* `@mgeier <https://github.com/mgeier>`__: Update instructions for Jupyter notebook galleries (`#11545 <https://github.com/readthedocs/readthedocs.org/pull/11545>`__)
10+
* `@agjohnson <https://github.com/agjohnson>`__: Drop "Unknown message" notification (`#11542 <https://github.com/readthedocs/readthedocs.org/pull/11542>`__)
11+
* `@stsewd <https://github.com/stsewd>`__: Login: add link to SAML login (`#11541 <https://github.com/readthedocs/readthedocs.org/pull/11541>`__)
12+
* `@robredpath <https://github.com/robredpath>`__: Update i18n docs for Sphinx (`#11538 <https://github.com/readthedocs/readthedocs.org/pull/11538>`__)
13+
* `@humitos <https://github.com/humitos>`__: Release 11.5.0 (`#11537 <https://github.com/readthedocs/readthedocs.org/pull/11537>`__)
14+
* `@humitos <https://github.com/humitos>`__: Slack: use json= to send a message using webhooks (`#11536 <https://github.com/readthedocs/readthedocs.org/pull/11536>`__)
15+
* `@humitos <https://github.com/humitos>`__: Addons: add a notification on each Sphinx build (`#11514 <https://github.com/readthedocs/readthedocs.org/pull/11514>`__)
16+
* `@stsewd <https://github.com/stsewd>`__: Ask for confirmation when adding a user to a project/organization/team (`#9440 <https://github.com/readthedocs/readthedocs.org/pull/9440>`__)
17+
118
Version 11.5.0
219
--------------
320

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
master_doc = "index"
7878
copyright = "Read the Docs, Inc & contributors"
79-
version = "11.5.0"
79+
version = "11.6.0"
8080
release = version
8181
exclude_patterns = ["_build", "shared", "_includes"]
8282
default_role = "obj"

docs/user/guides/jupyter.rst

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,8 @@ Creating galleries of examples using notebooks
237237

238238
`nbsphinx`_ has support for :doc:`creating thumbnail galleries from a list of Jupyter
239239
notebooks <nbsphinx:subdir/gallery>`.
240-
This functionality relies on `Sphinx-Gallery <https://sphinx-gallery.github.io/>`_
241-
and extends it to work with Jupyter notebooks rather than Python scripts.
242240

243-
To use it, you will need to install both nbsphinx and Sphinx-Gallery,
244-
and modify your ``conf.py`` as follows:
245-
246-
.. code-block:: python
247-
:caption: conf.py
248-
249-
extensions = [
250-
"nbsphinx",
251-
"sphinx_gallery.load_style",
252-
]
253-
254-
After doing that, there are two ways to create the gallery:
241+
There are two ways to create the gallery:
255242

256243
- From a reStructuredText source file, using the ``.. nbgallery::`` directive,
257244
:ref:`as showcased in the
@@ -266,9 +253,7 @@ After doing that, there are two ways to create the gallery:
266253

267254
Panel to modify cell metadata in JupyterLab
268255

269-
For example, this reST markup would create a thumbnail gallery
270-
with generic images as thumbnails,
271-
thanks to the Sphinx-Gallery default style:
256+
For example, this markup would create a thumbnail gallery:
272257

273258
.. tabs::
274259

docs/user/img/translation_bar.png

18.6 KB
Loading

docs/user/localization.rst

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,30 @@ The language will be represented in the URL for your project.
3131
For example,
3232
a project that is in Spanish will have a default URL of ``/es/latest/`` instead of ``/en/latest/``.
3333

34-
Projects with multiple translations (Sphinx-only)
35-
-------------------------------------------------
34+
Projects with multiple translations
35+
-----------------------------------
3636

3737
.. seealso::
3838

3939
:doc:`guides/manage-translations-sphinx`
40-
Describes the whole process for a documentation with multiples languages in the same repository and how to keep the translations updated on time.
40+
Describes the whole process for a Sphinx documentation projects with multiples languages
41+
in the same repository and how to keep the translations updated on time.
4142

42-
This situation is a bit more complicated.
43-
To support this,
44-
you will have one parent project and a number of projects marked as translations of that parent.
45-
Let's use ``phpmyadmin`` as an example.
43+
Each language must have its own project on Read the Docs.
44+
You will choose one to be the parent project,
45+
and add each of the other projects as "Translations" of the parent project.
4646

47-
The main ``phpmyadmin`` project is the parent for all translations.
48-
Then you must create a project for each translation,
49-
for example ``phpmyadmin-spanish``.
50-
You will set the *Language* for ``phpmyadmin-spanish`` to ``Spanish``.
51-
In the parent projects *Translations* page,
52-
you will say that ``phpmyadmin-spanish`` is a translation for your project.
47+
Let's use ``godot`` as an example.
48+
49+
The ``godot`` project is the parent.
50+
Each translation then has its own project, for example ``godot-es``.
51+
The *Language* for ``godot-es`` is set to ``Spanish``.
52+
Then, on the *Translations* page of the ``godot`` project, ``godot-es`` is set as translation.
5353

5454
This has the results of serving:
5555

56-
* ``phpmyadmin`` at ``http://phpmyadmin.readthedocs.io/en/latest/``
57-
* ``phpmyadmin-spanish`` at ``http://phpmyadmin.readthedocs.io/es/latest/``
56+
* ``godot`` at ``https://docs.godotengine.org/en/stable/``
57+
* ``godot-es`` at ``https://docs.godotengine.org/es/stable/``
5858

5959
It also gets included in the Read the Docs :term:`flyout menu`:
6060

@@ -65,12 +65,6 @@ It also gets included in the Read the Docs :term:`flyout menu`:
6565
parent project that the domain was configured on. See
6666
:doc:`/custom-domains` for more information.
6767

68-
.. note:: You can include multiple translations in the same repository,
69-
with same ``conf.py`` and ``.rst`` files,
70-
but each project must specify the language to build for those docs.
71-
72-
.. note:: You must commit the ``.po`` files for Read the Docs to translate your documentation.
73-
7468

7569
Translation workflows
7670
~~~~~~~~~~~~~~~~~~~~~
@@ -80,23 +74,20 @@ the workflow of your translators becomes a critical component.
8074

8175
Considerations include:
8276

83-
* Are your translators able to use a git workflow? For instance, are they able to translate directly via GitHub?
77+
* Are your translators able to use a Git workflow? For instance, are they able to translate directly via GitHub?
8478
* Do you benefit from machine translation?
8579
* Do you need different roles, for instance do you need translators and editors?
8680
* What is your source language?
8781
* When are your translated versions published?
8882

89-
By using Sphinx and .po files,
90-
you will be able to automatically synchronize between your documentation source messages on your git platform and your translation platform.
91-
9283
There are many translation platforms that support this workflow.
9384
These include:
9485

9586
* `Weblate <https://weblate.org/>`_
9687
* `Transifex <https://www.transifex.com/>`_
9788
* `Crowdin <https://crowdin.com/>`_
9889

99-
Because Read the Docs builds your git repository,
90+
Because Read the Docs builds your Git repository,
10091
you can use any of the above solutions.
101-
Any solution that synchronizes your translations with your git repository
92+
Any solution that synchronizes your translations with your Git repository
10293
will ensure that your translations are automatically published with Read the Docs.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "11.5.0",
3+
"version": "11.6.0",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "11.5.0"
4+
__version__ = "11.6.0"

readthedocs/invitations/backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def send_invitation(self):
6767
)
6868
send_email(
6969
recipient=email,
70-
subject=f"{from_name} has invite you to join the {object_description}",
70+
subject=f"{from_name} has invited you to join the {object_description}",
7171
template="invitations/email/invitation.txt",
7272
template_html="invitations/email/invitation.html",
7373
context={

readthedocs/notifications/models.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import textwrap
2-
31
import structlog
42
from django.contrib.contenttypes.fields import GenericForeignKey
53
from django.contrib.contenttypes.models import ContentType
@@ -8,8 +6,8 @@
86
from django.utils.translation import gettext_noop as _
97
from django_extensions.db.models import TimeStampedModel
108

11-
from .constants import CANCELLED, DISMISSED, READ, UNREAD, WARNING
12-
from .messages import Message, registry
9+
from .constants import CANCELLED, DISMISSED, READ, UNREAD
10+
from .messages import registry
1311
from .querysets import NotificationQuerySet
1412

1513
log = structlog.get_logger(__name__)
@@ -76,24 +74,11 @@ def get_message(self):
7674

7775
message = registry.get(self.message_id, format_values=format_values)
7876
if message is None:
79-
# Log the error and return an unknown error to avoid breaking the response.
77+
# Log the error and let the None message return through the API
8078
log.error(
8179
"The message ID retrieved is not in our registry anymore.",
8280
message_id=self.message_id,
8381
)
84-
return Message(
85-
id="unknown-message",
86-
header=_("Unknown message"),
87-
body=_(
88-
textwrap.dedent(
89-
"""
90-
It seems it was an old message,
91-
and is not in our registry anymore.
92-
"""
93-
).strip(),
94-
),
95-
type=WARNING,
96-
)
9782

9883
return message
9984

readthedocs/subscriptions/event_handlers.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ def subscription_canceled(event):
229229
except SSOIntegration.DoesNotExist:
230230
sso_integration = "Read the Docs Auth"
231231

232+
# https://api.slack.com/surfaces/messages#payloads
232233
slack_message = {
233234
"blocks": [
234235
{
@@ -241,19 +242,11 @@ def subscription_canceled(event):
241242
"fields": [
242243
{
243244
"type": "mrkdwn",
244-
"text": f":office: *Name:* {organization.name}",
245+
"text": f":office: *Name:* <{settings.ADMIN_URL}/organizations/organization/{organization.pk}/change/|{organization.name}>",
245246
},
246247
{
247248
"type": "mrkdwn",
248-
"text": f":dollar: *Plan:* {stripe_subscription.plan.id}",
249-
},
250-
{
251-
"type": "mrkdwn",
252-
"text": f":hash: *Slug:* {organization.slug}",
253-
},
254-
{
255-
"type": "mrkdwn",
256-
"text": f":person_frowning: *Stripe customer:* <https://dashboard.stripe.com/customers/{stripe_subscription.customer_id}|{stripe_subscription.customer_id}>",
249+
"text": f":dollar: *Plan:* <https://dashboard.stripe.com/customers/{stripe_subscription.customer_id}|{stripe_subscription.plan.product.name}> (${str(total_spent)})",
257250
},
258251
{
259252
"type": "mrkdwn",
@@ -286,11 +279,14 @@ def subscription_canceled(event):
286279
]
287280
}
288281
try:
289-
requests.post(
282+
response = requests.post(
290283
settings.SLACK_WEBHOOK_SALES_CHANNEL,
291-
data=slack_message,
284+
json=slack_message,
292285
timeout=3,
293286
)
287+
if not response.ok:
288+
log.error("There was an issue when sending a message to Slack webhook")
289+
294290
except requests.Timeout:
295291
log.warning("Timeout sending a message to Slack webhook")
296292

readthedocs/templates/account/login.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ <h3>{% trans 'Or' %}</h3>
7171
<div class="clearfix">
7272
<ul class="socialaccount_providers">
7373
{% include "socialaccount/snippets/provider_list.html" with process="login" next=request.GET.next verbiage="Log in using" %}
74+
{% if USE_ORGANIZATIONS %}
75+
<li>
76+
<form action="{% url "saml_resolve_login" %}{% if redirect_field_value %}?{{ redirect_field_name }}={{ redirect_field_value }}{% endif %}" method="get">
77+
<button class="socialaccount-provider button" type="submit">
78+
{% trans "Log in using single sign-on" %}
79+
</button>
80+
</form>
81+
</li>
82+
{% endif %}
7483
</ul>
7584
</div>
7685
{% endif %}

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = readthedocs
3-
version = 11.5.0
3+
version = 11.6.0
44
license = MIT
55
description = Read the Docs builds and hosts documentation
66
author = Read the Docs, Inc
@@ -29,7 +29,7 @@ github_owner = readthedocs
2929
github_repo = readthedocs.org
3030

3131
[bumpver]
32-
current_version = "11.5.0"
32+
current_version = "11.6.0"
3333
version_pattern = "MAJOR.MINOR.PATCH[TAGNUM]"
3434
commit_message = "Bump version {old_version} -> {new_version}"
3535
commit = False

0 commit comments

Comments
 (0)