Skip to content

Commit c2e493c

Browse files
Sangarshanansangarshanan-deezerNMertsch
authored
Standardise the grammar to British english (#364)
Co-authored-by: sveeraraghavan@FRLPMC3060 <sveeraraghavan@deezer.com> Co-authored-by: Niklas Mertsch <49114330+NMertsch@users.noreply.github.com>
1 parent 019c15e commit c2e493c

15 files changed

Lines changed: 98 additions & 98 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The scripts work standalone and only require an Auth token. Please find more doc
1212
The bot has the following extensions ("Cogs"):
1313

1414
* Ping: To check if the bot is running, write `$ping` in any channel. The bot will respond with `Pong!`.
15-
* Guild Statistics: As an organizer, write `$participants` in an organizer-only channel. The bot will respond with a list of roles, and the number of members per role.
15+
* Guild Statistics: As an organiser, write `$participants` in an organiser-only channel. The bot will respond with a list of roles, and the number of members per role.
1616
* Registration: On startup, the bot posts a registration form. New users must register using their Pretix ticket data. On success, the bot assigns the appropriate roles.
1717
* Programme Notifications: Before each session, the bot posts a session summary and updates the livestream URLs.
1818

@@ -193,4 +193,4 @@ Related files:
193193
* `/root/livestreams.toml`: Livestream URL configuration
194194
* `/home/bot/registered_log.txt`: Registration log
195195
* `/home/bot/pretix_cache.json`: Pretix cache
196-
* `/home/bot/schedule_cache.json`: Program cache
196+
* `/home/bot/schedule_cache.json`: Programme cache

‎prod-config.toml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ pretix_cache_file = "pretix_cache.json"
3737
"Beginners’ Day Unconference / Humble Data Access" = ["Beginners Day"]
3838

3939
[registration.variation_to_roles]
40-
# organizers
41-
"Volunteer" = ["Organizers", "Volunteers", "Onsite Volunteers"]
40+
# organisers
41+
"Volunteer" = ["Organisers", "Volunteers", "Onsite Volunteers"]
4242

43-
[program_notifications]
43+
[programme_notifications]
4444
api_url = "https://static.europython.eu/programme/ep2026/releases/current/schedule.json"
4545
schedule_cache_file = "schedule_cache.json"
4646
livestream_url_file = "livestreams.toml"
4747
main_notification_channel_name = "programme-notifications"
4848

49-
# optional simulated start time for testing program notifications
49+
# optional simulated start time for testing programme notifications
5050
# simulated_start_time = "2026-07-15T08:50:00+02:00"
5151

52-
# optional fast mode for faster testing of program notifications
52+
# optional fast mode for faster testing of programme notifications
5353
# will only take effect if simulated_start_time is set
5454
# fast_mode = true
5555

56-
[program_notifications.rooms_to_channel_names]
56+
[programme_notifications.rooms_to_channel_names]
5757
"S1" = "s1"
5858
"S2" = "s2"
5959
"S3A" = "s3a"
@@ -62,7 +62,7 @@ main_notification_channel_name = "programme-notifications"
6262
"Exhibit Hall" = "exhibit-hall"
6363

6464
[guild_statistics]
65-
required_role = "Organizers"
65+
required_role = "Organisers"
6666

6767
[dog]
6868
channel_name = "animal-appreciation"

‎scripts/configure-guild.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def verify_permission_roles(self) -> Self:
238238

239239
ROLE_COC = "Code of Conduct Committee"
240240
ROLE_MODERATORS = "Moderators"
241-
ROLE_ORGANIZERS = "Organizers"
241+
ROLE_ORGANISERS = "Organisers"
242242
ROLE_VOLUNTEERS = "Volunteers"
243243
ROLE_SPEAKERS = "Speakers"
244244
ROLE_SPONSORS = "Sponsors"
@@ -248,10 +248,10 @@ def verify_permission_roles(self) -> Self:
248248

249249
ROLES_COC = [ROLE_COC]
250250
ROLES_MODERATORS = [ROLE_MODERATORS, *ROLES_COC]
251-
ROLES_ORGANIZERS = [ROLE_ORGANIZERS, *ROLES_MODERATORS]
252-
ROLES_VOLUNTEERS = [ROLE_VOLUNTEERS, *ROLES_ORGANIZERS]
253-
ROLES_SPEAKERS = [ROLE_SPEAKERS, *ROLES_ORGANIZERS]
254-
ROLES_SPONSORS = [ROLE_SPONSORS, *ROLES_ORGANIZERS]
251+
ROLES_ORGANISERS = [ROLE_ORGANISERS, *ROLES_MODERATORS]
252+
ROLES_VOLUNTEERS = [ROLE_VOLUNTEERS, *ROLES_ORGANISERS]
253+
ROLES_SPEAKERS = [ROLE_SPEAKERS, *ROLES_ORGANISERS]
254+
ROLES_SPONSORS = [ROLE_SPONSORS, *ROLES_ORGANISERS]
255255
ROLES_REGISTERED = [
256256
ROLE_PARTICIPANTS,
257257
ROLE_SPONSORS,
@@ -291,7 +291,7 @@ def verify_permission_roles(self) -> Self:
291291
],
292292
),
293293
Role(
294-
name=ROLE_ORGANIZERS,
294+
name=ROLE_ORGANISERS,
295295
color=COLOR_DARK_YELLOW,
296296
permissions=["mention_everyone", "use_external_apps", "manage_roles"],
297297
),
@@ -474,7 +474,7 @@ def verify_permission_roles(self) -> Self:
474474
PermissionOverwrite(
475475
roles=[ROLE_EVERYONE], deny=["send_messages", "create_public_threads"]
476476
),
477-
PermissionOverwrite(roles=[ROLE_ORGANIZERS], allow=["send_messages"]),
477+
PermissionOverwrite(roles=[ROLE_ORGANISERS], allow=["send_messages"]),
478478
],
479479
),
480480
TextChannel(
@@ -487,9 +487,9 @@ def verify_permission_roles(self) -> Self:
487487
ForumChannel(
488488
name="support",
489489
topic="""
490-
Use this forum channel to create support tickets if you **need support from the conference organization**. Please don't open forum threads related to other topics, as that makes it difficult for the organizers to keep track of support tickets that need their attention.
490+
Use this forum channel to create support tickets if you **need support from the conference organization**. Please don't open forum threads related to other topics, as that makes it difficult for the organisers to keep track of support tickets that need their attention.
491491
492-
If you to make a report to the Code of Conduct Committee, please use coc@europython.eu or contact an organizer at the conference.
492+
If you to make a report to the Code of Conduct Committee, please use coc@europython.eu or contact an organiser at the conference.
493493
""", # noqa: E501 (line too long)
494494
tags=["Remote Support", "On-Site Support"],
495495
require_tag=True,
@@ -756,7 +756,7 @@ def verify_permission_roles(self) -> Self:
756756
roles=[ROLE_EVERYONE], deny=["send_messages", "create_public_threads"]
757757
),
758758
PermissionOverwrite(roles=ROLES_REGISTERED, deny=["view_channel"]),
759-
PermissionOverwrite(roles=ROLES_ORGANIZERS, allow=["view_channel"]),
759+
PermissionOverwrite(roles=ROLES_ORGANISERS, allow=["view_channel"]),
760760
],
761761
),
762762
TextChannel(
@@ -767,7 +767,7 @@ def verify_permission_roles(self) -> Self:
767767
roles=[ROLE_EVERYONE], deny=["send_messages", "create_public_threads"]
768768
),
769769
PermissionOverwrite(roles=ROLES_REGISTERED, deny=["view_channel"]),
770-
PermissionOverwrite(roles=ROLES_ORGANIZERS, allow=["view_channel"]),
770+
PermissionOverwrite(roles=ROLES_ORGANISERS, allow=["view_channel"]),
771771
],
772772
),
773773
ForumChannel(
@@ -779,7 +779,7 @@ def verify_permission_roles(self) -> Self:
779779
""", # noqa: E501 (line too long)
780780
permission_overwrites=[
781781
PermissionOverwrite(roles=ROLES_REGISTERED, deny=["view_channel"]),
782-
PermissionOverwrite(roles=ROLES_ORGANIZERS, allow=["view_channel"]),
782+
PermissionOverwrite(roles=ROLES_ORGANISERS, allow=["view_channel"]),
783783
],
784784
),
785785
TextChannel(

‎src/europython_discord/bot.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from europython_discord.cogs.ping import PingCog
1818
from europython_discord.dog.cog import DogCog
1919
from europython_discord.dog.config import DogConfig
20-
from europython_discord.program_notifications.cog import ProgramNotificationsCog
21-
from europython_discord.program_notifications.config import ProgramNotificationsConfig
20+
from europython_discord.programme_notifications.cog import ProgrammeNotificationsCog
21+
from europython_discord.programme_notifications.config import ProgrammeNotificationsConfig
2222
from europython_discord.registration.cog import RegistrationCog
2323
from europython_discord.registration.config import RegistrationConfig
2424

@@ -32,7 +32,7 @@
3232
class Config(BaseModel):
3333
log_level: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
3434
registration: RegistrationConfig
35-
program_notifications: ProgramNotificationsConfig
35+
programme_notifications: ProgrammeNotificationsConfig
3636
guild_statistics: GuildStatisticsConfig
3737
dog: DogConfig
3838

@@ -49,7 +49,7 @@ async def run_bot(config: Config, auth_token: str) -> None:
4949
await bot.add_cog(PingCog(bot))
5050
await bot.add_cog(DogCog(bot, config.dog))
5151
await bot.add_cog(RegistrationCog(bot, config.registration))
52-
await bot.add_cog(ProgramNotificationsCog(bot, config.program_notifications))
52+
await bot.add_cog(ProgrammeNotificationsCog(bot, config.programme_notifications))
5353
await bot.add_cog(GuildStatisticsCog(bot, config.guild_statistics))
5454

5555
await bot.start(auth_token)

src/europython_discord/program_notifications/__init__.py renamed to src/europython_discord/programme_notifications/__init__.py

File renamed without changes.

src/europython_discord/program_notifications/cog.py renamed to src/europython_discord/programme_notifications/cog.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
from discord.ext import commands, tasks
88
from discord.utils import get as discord_get
99

10-
from europython_discord.program_notifications import session_to_embed
11-
from europython_discord.program_notifications.config import ProgramNotificationsConfig
12-
from europython_discord.program_notifications.livestream_connector import LivestreamConnector
13-
from europython_discord.program_notifications.models import Session
14-
from europython_discord.program_notifications.program_connector import ProgramConnector
10+
from europython_discord.programme_notifications import session_to_embed
11+
from europython_discord.programme_notifications.config import ProgrammeNotificationsConfig
12+
from europython_discord.programme_notifications.livestream_connector import LivestreamConnector
13+
from europython_discord.programme_notifications.models import Session
14+
from europython_discord.programme_notifications.programme_connector import ProgrammeConnector
1515

1616
_logger = logging.getLogger(__name__)
1717

1818

19-
class ProgramNotificationsCog(commands.Cog):
20-
def __init__(self, bot: Client, config: ProgramNotificationsConfig) -> None:
19+
class ProgrammeNotificationsCog(commands.Cog):
20+
def __init__(self, bot: Client, config: ProgrammeNotificationsConfig) -> None:
2121
self.bot = bot
2222
self.config = config
23-
self.program_connector = ProgramConnector(
23+
self.programme_connector = ProgrammeConnector(
2424
api_url=self.config.api_url,
2525
cache_file=self.config.schedule_cache_file,
2626
simulated_start_time=self.config.simulated_start_time,
@@ -30,7 +30,7 @@ def __init__(self, bot: Client, config: ProgramNotificationsConfig) -> None:
3030
self.livestream_connector = LivestreamConnector(self.config.livestream_url_file)
3131

3232
self.notified_sessions: set[tuple[str, datetime]] = set()
33-
_logger.info("Cog 'Program Notifications' has been initialized")
33+
_logger.info("Cog 'Programme Notifications' has been initialized")
3434

3535
@commands.Cog.listener()
3636
async def on_ready(self) -> None:
@@ -42,7 +42,7 @@ async def on_ready(self) -> None:
4242
_logger.debug(f"Fast mode: {self.config.fast_mode}")
4343
_logger.info("Starting the session notifier...")
4444
self.notify_sessions.start()
45-
_logger.info("Cog 'Program Notifications' is ready")
45+
_logger.info("Cog 'Programme Notifications' is ready")
4646

4747
async def cog_load(self) -> None:
4848
"""Start schedule updater task."""
@@ -66,7 +66,7 @@ async def cog_unload(self) -> None:
6666
@tasks.loop(minutes=5)
6767
async def fetch_schedule(self) -> None:
6868
_logger.info("Starting the periodic schedule update...")
69-
await self.program_connector.fetch_schedule()
69+
await self.programme_connector.fetch_schedule()
7070

7171
@tasks.loop(minutes=5)
7272
async def fetch_livestreams(self) -> None:
@@ -78,7 +78,7 @@ async def fetch_livestreams(self) -> None:
7878
async def notify_sessions(self) -> None:
7979
# determine sessions to send notifications for
8080
sessions_to_notify = []
81-
for session in await self.program_connector.get_upcoming_sessions():
81+
for session in await self.programme_connector.get_upcoming_sessions():
8282
if _get_session_key(session) in self.notified_sessions:
8383
continue # already notified
8484
if len(session.rooms) > 1:

src/europython_discord/program_notifications/config.py renamed to src/europython_discord/programme_notifications/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pydantic import AwareDatetime, BaseModel
77

88

9-
class ProgramNotificationsConfig(BaseModel):
9+
class ProgrammeNotificationsConfig(BaseModel):
1010
api_url: str
1111
schedule_cache_file: Path
1212
livestream_url_file: Path

src/europython_discord/program_notifications/livestream_connector.py renamed to src/europython_discord/programme_notifications/livestream_connector.py

File renamed without changes.

src/europython_discord/program_notifications/models.py renamed to src/europython_discord/programme_notifications/models.py

File renamed without changes.

src/europython_discord/program_notifications/program_connector.py renamed to src/europython_discord/programme_notifications/programme_connector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
import aiofiles
1010
import aiohttp
1111

12-
from europython_discord.program_notifications.models import Break, Schedule, Session
12+
from europython_discord.programme_notifications.models import Break, Schedule, Session
1313

1414
_logger = logging.getLogger(__name__)
1515

1616

17-
class ProgramConnector:
17+
class ProgrammeConnector:
1818
def __init__(
1919
self,
2020
api_url: str,
@@ -51,7 +51,7 @@ async def parse_schedule(self, schedule: dict) -> dict[date, list[Session]]:
5151
return sessions_by_day
5252

5353
async def fetch_schedule(self) -> None:
54-
"""Fetch schedule data from the Program API and write it to a file as backup."""
54+
"""Fetch schedule data from the Programme API and write it to a file as backup."""
5555
async with self._fetch_lock:
5656
try:
5757
async with (

0 commit comments

Comments
 (0)