Skip to content

Commit 581ea49

Browse files
authored
Merge branch 'develop' into web/feature/community-subcommunity-dropdown
2 parents 679c217 + 0ddb15d commit 581ea49

248 files changed

Lines changed: 8105 additions & 4151 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"editor.tabSize": 2,
5656
"editor.insertSpaces": true,
5757
"files.trimTrailingWhitespace": true,
58-
"eslint.useFlatConfig": false,
5958
"python-env.workspaceSearchPaths": [ "app/backend/.venv" ],
6059
"python.testing.cwd": "app/backend/src/tests",
6160
"python.testing.unittestEnabled": false,

app/backend/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "Couchers.org backend application"
55
requires-python = "==3.14.*"
66
dependencies = [
7-
"alembic>=1.17.1",
7+
"alembic>=1.18.5",
88
"babel>=2.18.0",
99
"boto3>=1.43.1",
1010
"cachetools>=6.2.1",
@@ -35,9 +35,9 @@ dependencies = [
3535
"pyyaml>=6.0.3",
3636
"regex>=2024.0.0",
3737
"requests>=2.34.2",
38-
"sentry-sdk>=2.43.0",
38+
"sentry-sdk>=2.65.0",
3939
"Shapely>=2.1.1",
40-
"sqlalchemy>=2.0.43",
40+
"sqlalchemy>=2.0.51",
4141
"sqlalchemy-utils>=0.42.0",
4242
"stripe>=13.1.0",
4343
"ua-parser>=1.0.2",

app/backend/src/couchers/email/emails.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
from couchers.i18n.localize import format_phone_number
5252
from couchers.markup import html_link, html_mailto_link, markdown_to_plaintext
5353
from couchers.notifications.quick_links import generate_quick_decline_link
54-
from couchers.proto import conversations_pb2, events_pb2, notification_data_pb2
54+
from couchers.proto import events_pb2, messages_pb2, notification_data_pb2
5555
from couchers.utils import now, to_aware_datetime
5656

5757
# Common string keys
@@ -1445,20 +1445,20 @@ class HostRequestStatusChangedEmail(EmailBase):
14451445
other_user: UserInfo
14461446
from_date: date
14471447
to_date: date
1448-
new_status: conversations_pb2.HostRequestStatus.ValueType
1448+
new_status: messages_pb2.HostRequestStatus.ValueType
14491449
view_link: str
14501450

14511451
@property
14521452
def string_key_base(self) -> str:
14531453
base_key = "host_requests.status_changed"
14541454
match self.new_status:
1455-
case conversations_pb2.HOST_REQUEST_STATUS_ACCEPTED:
1455+
case messages_pb2.HOST_REQUEST_STATUS_ACCEPTED:
14561456
return f"{base_key}.accepted_by_host"
1457-
case conversations_pb2.HOST_REQUEST_STATUS_REJECTED:
1457+
case messages_pb2.HOST_REQUEST_STATUS_REJECTED:
14581458
return f"{base_key}.declined_by_host"
1459-
case conversations_pb2.HOST_REQUEST_STATUS_CONFIRMED:
1459+
case messages_pb2.HOST_REQUEST_STATUS_CONFIRMED:
14601460
return f"{base_key}.confirmed_by_surfer"
1461-
case conversations_pb2.HOST_REQUEST_STATUS_CANCELLED:
1461+
case messages_pb2.HOST_REQUEST_STATUS_CANCELLED:
14621462
return f"{base_key}.cancelled_by_surfer"
14631463
case _:
14641464
raise ValueError(f"Unexpected host request status: {self.new_status}")
@@ -1492,20 +1492,20 @@ def from_notification(
14921492
user_name: str,
14931493
) -> Self:
14941494
other_user: UserInfo
1495-
new_status: conversations_pb2.HostRequestStatus.ValueType
1495+
new_status: messages_pb2.HostRequestStatus.ValueType
14961496
match data:
14971497
case notification_data_pb2.HostRequestAccept():
14981498
other_user = UserInfo.from_protobuf(data.host)
1499-
new_status = conversations_pb2.HostRequestStatus.HOST_REQUEST_STATUS_ACCEPTED
1499+
new_status = messages_pb2.HostRequestStatus.HOST_REQUEST_STATUS_ACCEPTED
15001500
case notification_data_pb2.HostRequestReject():
15011501
other_user = UserInfo.from_protobuf(data.host)
1502-
new_status = conversations_pb2.HostRequestStatus.HOST_REQUEST_STATUS_REJECTED
1502+
new_status = messages_pb2.HostRequestStatus.HOST_REQUEST_STATUS_REJECTED
15031503
case notification_data_pb2.HostRequestConfirm():
15041504
other_user = UserInfo.from_protobuf(data.surfer)
1505-
new_status = conversations_pb2.HostRequestStatus.HOST_REQUEST_STATUS_CONFIRMED
1505+
new_status = messages_pb2.HostRequestStatus.HOST_REQUEST_STATUS_CONFIRMED
15061506
case notification_data_pb2.HostRequestCancel():
15071507
other_user = UserInfo.from_protobuf(data.surfer)
1508-
new_status = conversations_pb2.HostRequestStatus.HOST_REQUEST_STATUS_CANCELLED
1508+
new_status = messages_pb2.HostRequestStatus.HOST_REQUEST_STATUS_CANCELLED
15091509
case _:
15101510
# Enable mypy's exhaustiveness checking
15111511
assert_never("Unexpected host request status changed notification data type.")
@@ -1526,14 +1526,14 @@ def test_instances(cls) -> list[Self]:
15261526
other_user=UserInfo.dummy_bob(),
15271527
from_date=date(2025, 6, 1),
15281528
to_date=date(2025, 6, 7),
1529-
new_status=conversations_pb2.HOST_REQUEST_STATUS_ACCEPTED,
1529+
new_status=messages_pb2.HOST_REQUEST_STATUS_ACCEPTED,
15301530
view_link="https://couchers.org/requests/123",
15311531
)
15321532
return [
1533-
replace(prototype, new_status=conversations_pb2.HOST_REQUEST_STATUS_ACCEPTED),
1534-
replace(prototype, new_status=conversations_pb2.HOST_REQUEST_STATUS_REJECTED),
1535-
replace(prototype, new_status=conversations_pb2.HOST_REQUEST_STATUS_CONFIRMED),
1536-
replace(prototype, new_status=conversations_pb2.HOST_REQUEST_STATUS_CANCELLED),
1533+
replace(prototype, new_status=messages_pb2.HOST_REQUEST_STATUS_ACCEPTED),
1534+
replace(prototype, new_status=messages_pb2.HOST_REQUEST_STATUS_REJECTED),
1535+
replace(prototype, new_status=messages_pb2.HOST_REQUEST_STATUS_CONFIRMED),
1536+
replace(prototype, new_status=messages_pb2.HOST_REQUEST_STATUS_CANCELLED),
15371537
]
15381538

15391539

app/backend/src/couchers/email/locales/cs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
},
2222
"references": {
2323
"write_action": "Napiš referenci pro {{name}}"
24+
},
25+
"generic": {
26+
"greeting_line": "Ahoj {{name}},"
2427
}
2528
}

app/backend/src/couchers/email/locales/de.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@
6464
"instructions_days_other": "Um deinen \"Kann-Hosten\"-Status zu behalten, melde dich bitte innerhalb der nächsten <b>{{count}} Tage</b> wieder an. Andernfalls ändern wir deinen Hosting-Status auf \"Kann nicht hosten.\"",
6565
"login_action": "Melde dich wieder an",
6666
"encouragement": "Diese Check-ins helfen Surfern, aktive Hosts leichter zu finden und halten die Antwortzeiten korrekt.",
67-
"latest_release": "Falls du es verpasst hast: Wir haben kürzlich Version {{version}} veröffentlicht. Zu den neuesten Updates gehören eine neue App für iOS und Android, ein verbessertes Dashboard, überarbeitete Nachrichten und neue Event-Funktionen. Lies mehr im <a href=\"{{blog_url}}\">Couchers.org Blog</a>."
67+
"latest_release": "Falls du es verpasst hast: Wir haben kürzlich Version {{version}} veröffentlicht. Zu den neuesten Updates gehören: mobile Apps für iOS und Android, ein verbessertes Dashboard, überarbeitete Nachrichten und neue Event-Funktionen. Lies mehr im <a href=\"{{blog_url}}\">Couchers.org Blog</a>."
6868
},
6969
"api_key_issued": {
7070
"subject": "Dein API-Schlüssel für Couchers.org",
7171
"header": "Du hast kürzlich einen API-Schlüssel für Couchers.org angefordert. Wir haben dir den folgenden API-Schlüssel ausgestellt:",
7272
"expiry": "Der Schlüssel läuft am <b>{{ datetime }}</b> ab.",
7373
"usage_warning": "Dieser API-Schlüssel ist einzigartig für dein Konto; teile ihn mit niemandem. Er gewährt vollständigen Zugriff auf dein Konto, und du bist für alle Aktionen verantwortlich, die mit diesem API-Schlüssel durchgeführt werden.",
74-
"policy_warning": "Bitte denke daran, während der Nutzung unserer APIs unsere Nutzungsbedingungen, unsere Community-Richtlinien und andere Richtlinien einzuhalten. Alle Zugriffe werden protokolliert und analysiert, und wir können deinen Zugriff oder dein Konto sperren, wenn du den Dienst missbrauchst."
74+
"policy_warning": "Bitte denke daran, während der Nutzung unserer APIs unsere <a href=\"{{terms_url}}\">Nutzungsbedingungen</a>, unsere Community-Richtlinien und andere Richtlinien einzuhalten. Alle Zugriffe werden protokolliert und analysiert, und wir können deinen Zugriff oder dein Konto sperren, wenn du den Dienst missbrauchst."
7575
},
7676
"badges": {
7777
"added": {
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
{}
1+
{
2+
"account_deletion": {
3+
"completed": {
4+
"recovery_instructions_days_one": "Si cambias de opinión, <strong>tienes {{count}} día para recuperar tu cuenta</strong> haciendo clic en el siguiente enlace:",
5+
"recovery_instructions_days_many": "Si cambias de opinión, <strong>tienes {{count}} de días para recuperar tu cuenta</strong> haciendo clic en el siguiente enlace:",
6+
"recovery_instructions_days_other": "Si cambias de opinión, <strong>tienes {{count}} días para recuperar tu cuenta</strong> haciendo clic en el siguiente enlace:"
7+
}
8+
},
9+
"activeness_probe": {
10+
"instructions_days_one": "Para mantener tu estado de \"Puedo alojar\", vuelve a iniciar sesión dentro del próximos <b>{{count}} día</b>. De lo contrario, cambiaremos tu estado de alojamiento a \"No puedo alojar.\"",
11+
"instructions_days_many": "Para mantener tu estado de \"Puedo alojar\", vuelve a iniciar sesión dentro de los próximos <b>{{count}} de días</b>. De lo contrario, cambiaremos tu estado de alojamiento a \"No puedo alojar.\"",
12+
"instructions_days_other": "Para mantener tu estado de \"Puedo alojar\", vuelve a iniciar sesión dentro de los próximos <b>{{count}} días</b>. De lo contrario, cambiaremos tu estado de alojamiento a \"No puedo alojar.\""
13+
},
14+
"chat_messages": {
15+
"missed": {
16+
"count_in_dm_one": "{{count}} mensaje de <b>{{author}}</b>:",
17+
"count_in_dm_many": "{{count}} de mensajes de <b>{{author}}</b>:",
18+
"count_in_dm_other": "{{count}} mensajes de <b>{{author}}</b>:"
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)