Skip to content

Commit 57c26e1

Browse files
humitosagjohnson
andauthored
Apply suggestions from code review
Co-authored-by: Anthony <[email protected]>
1 parent 0a765de commit 57c26e1

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

readthedocs/config/notifications.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
),
3333
Message(
3434
id=ConfigError.CONFIG_PATH_NOT_FOUND,
35-
header=_("Config file not found"),
35+
header=_("Configuration file not found"),
3636
body=_(
3737
"""
3838
Configuration file not found in <code>{directory}</code>.

readthedocs/notifications/messages.py

+13-15
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,18 @@ def get_display_icon_classes(self):
3737
# Default classes that apply to all the notifications
3838
classes = [
3939
"fas",
40-
"fa-user-group",
41-
"fa-swap-opacity",
4240
]
4341

4442
if self.type == ERROR:
45-
classes.append("fa-exclamation")
43+
classes.append("fa-circle-xmark")
4644
if self.type == WARNING:
47-
classes.append("fa-triangle-exclamation")
45+
classes.append("fa-circle-exclamation")
4846
if self.type == INFO:
49-
classes.append("fa-????")
47+
classes.append("fa-circle-info")
5048
if self.type == NOTE:
51-
classes.append("fa-????")
49+
classes.append("fa-circle-info")
5250
if self.type == TIP:
53-
classes.append("fa-????")
51+
classes.append("fa-circle-info")
5452

5553
return " ".join(classes)
5654

@@ -111,7 +109,7 @@ def get_rendered_body(self):
111109
header=_("Build cancelled manually."),
112110
body=_(
113111
"""
114-
The user has cancel this build.
112+
The user has cancelled this build.
115113
"""
116114
),
117115
type=INFO,
@@ -121,8 +119,8 @@ def get_rendered_body(self):
121119
header=_("Build skipped manually."),
122120
body=_(
123121
"""
124-
One of the commands exited with code 183
125-
and the build was skipped.
122+
This build was skipped because
123+
one of the commands exited with code 183
126124
"""
127125
),
128126
type=INFO,
@@ -132,7 +130,7 @@ def get_rendered_body(self):
132130
header=_("Builds are temporary disabled for this project."),
133131
body=_(
134132
"""
135-
This is due to an excess usage of our resources.
133+
This is due to excessive usage of our resources.
136134
Please, contact our support team if you think this is a mistake
137135
and builds should be re-enabled.
138136
"""
@@ -144,8 +142,8 @@ def get_rendered_body(self):
144142
header=_("Concurrency limit reached"),
145143
body=_(
146144
"""
147-
Your project/organization/user is currently building the maximum concurrency builds allowed ({limit}).
148-
It will automatically retried in 5 minutes.
145+
Your project, organization, or user is currently building the maximum concurrency builds allowed ({limit}).
146+
It will automatically retry in 5 minutes.
149147
"""
150148
),
151149
type=WARNING,
@@ -253,11 +251,11 @@ def get_rendered_body(self):
253251
),
254252
Message(
255253
id=BuildUserError.FILE_TOO_LARGE,
256-
header=_("There is at least one file size that exceeds the limits"),
254+
header=_("There is at least one file that exceeds the size limit"),
257255
body=_(
258256
"""
259257
A file from your build process is too large to be processed by Read the Docs.
260-
Please ensure no files generated are larger than 1GB.
258+
Please ensure no generated files are larger than 1GB.
261259
"""
262260
),
263261
type=ERROR,

readthedocs/oauth/notifications.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
messages = [
1313
Message(
1414
id=MESSAGE_OAUTH_WEBHOOK_NO_ACCOUNT,
15-
header=_("Webhook not attached to this project"),
15+
header=_("Unable to attach webhook to this project"),
1616
body=_(
1717
"""
1818
Could not add webhook for {instance.name}.
@@ -23,7 +23,7 @@
2323
),
2424
Message(
2525
id=MESSAGE_OAUTH_WEBHOOK_NO_PERMISSIONS,
26-
header=_("Webhook not attached to this project"),
26+
header=_("Unable to attach webhook to this project"),
2727
body=_(
2828
"""
2929
Could not add webhook for {instance.name}.
@@ -34,7 +34,7 @@
3434
),
3535
Message(
3636
id=MESSAGE_OAUTH_WEBHOOK_INVALID,
37-
header=_("The project doesn't have a valid webhook setup"),
37+
header=_("The project doesn't have a valid webhook set up"),
3838
body=_(
3939
"""
4040
The project {instance.name} doesn't have a valid webhook set up,

readthedocs/oauth/tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def attach_webhook(project_pk, user_pk, integration=None):
227227
attached_to=project,
228228
format_values={
229229
"provider_name": provider.name,
230-
"url_docs_webhook": "http://docs.readthedocs.io/en/latest/webhooks.html",
230+
"url_docs_webhook": "https://docs.readthedocs.io/page/webhooks.html",
231231
},
232232
)
233233
else:

readthedocs/projects/notifications.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
),
2727
Message(
2828
id=RepositoryError.GENERIC,
29-
header=_("Error when cloning the repository"),
29+
header=_("Error while cloning the repository"),
3030
body=_(
3131
"""
3232
There was a problem cloning your repository.
@@ -48,7 +48,7 @@
4848
),
4949
Message(
5050
id=RepositoryError.FAILED_TO_CHECKOUT,
51-
header=_("Error when checking out the repository"),
51+
header=_("Error while checking out the repository"),
5252
body=_(
5353
"""
5454
Failed to checkout revision: <code>{revision}</code>
@@ -58,7 +58,7 @@
5858
),
5959
Message(
6060
id=RepositoryError.CLONE_ERROR_WITH_PRIVATE_REPO_ALLOWED,
61-
header=_("Error when cloning the repository"),
61+
header=_("Error while cloning the repository"),
6262
body=_(
6363
"""
6464
There was a problem connecting to your repository,
@@ -69,7 +69,7 @@
6969
),
7070
Message(
7171
id=RepositoryError.CLONE_ERROR_WITH_PRIVATE_REPO_NOT_ALLOWED,
72-
header=_("Error when cloning the repository"),
72+
header=_("Error while cloning the repository"),
7373
body=_(
7474
"""
7575
There was a problem connecting to your repository,
@@ -81,7 +81,7 @@
8181
),
8282
Message(
8383
id=ProjectConfigurationError.NOT_FOUND,
84-
header=_("Sphinx's configuration file missing"),
84+
header=_("Sphinx configuration file is missing"),
8585
body=_(
8686
"""
8787
A configuration file was not found.
@@ -92,7 +92,7 @@
9292
),
9393
Message(
9494
id=ProjectConfigurationError.MULTIPLE_CONF_FILES,
95-
header=_("Multiple Sphinx's configuration file found"),
95+
header=_("Multiple Sphinx configuration files found"),
9696
body=_(
9797
"""
9898
We found more than one <code>conf.py</code> and are not sure which one to use.

0 commit comments

Comments
 (0)