From 8626cd11efe755af7e16a7eef708889cd6d4eb44 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Sat, 31 Oct 2026 13:24:22 +0100
Subject: [PATCH] fix: name the calendar description field plainly instead of
the desktop help text
---
locales/rn/de.json | 1 +
locales/rn/en.json | 1 +
src/components/calendar/CalendarEditSheet.tsx | 6 ++--
.../calendar-edit-description-label.test.ts | 29 +++++++++++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 src/components/calendar/__tests__/calendar-edit-description-label.test.ts
diff --git a/locales/rn/de.json b/locales/rn/de.json
index 7c8e1686..9cce5e08 100644
--- a/locales/rn/de.json
+++ b/locales/rn/de.json
@@ -78,6 +78,7 @@
"clear_title": "Alle Termine entfernen?",
"delete_description": "Der Kalender und alle seine Termine werden gelöscht. Dies kann nicht rückgängig gemacht werden.",
"delete_title": "Kalender löschen?",
+ "description_field": "Beschreibung",
"description_placeholder": "Optional",
"edit_calendar": "Kalender bearbeiten",
"new_calendar": "Neuer Kalender"
diff --git a/locales/rn/en.json b/locales/rn/en.json
index fb90bce8..a819ca55 100644
--- a/locales/rn/en.json
+++ b/locales/rn/en.json
@@ -99,6 +99,7 @@
"custom_color": "Custom color (hex)",
"delete_description": "The calendar and all of its events will be deleted. This cannot be undone.",
"delete_title": "Delete calendar?",
+ "description_field": "Description",
"description_placeholder": "Optional",
"edit_calendar": "Edit calendar",
"fewer_colors": "Fewer colors",
diff --git a/src/components/calendar/CalendarEditSheet.tsx b/src/components/calendar/CalendarEditSheet.tsx
index 67d9f5c3..2c1fcf94 100644
--- a/src/components/calendar/CalendarEditSheet.tsx
+++ b/src/components/calendar/CalendarEditSheet.tsx
@@ -307,9 +307,11 @@ export function CalendarEditSheet({ visible, calendar, onSave, onClose }: Calend
))}
)}
- {t('calendar.management.description', 'Description')}
+ {/* Not calendar.management.description: in the webmail's
+ catalog that is the management page's desktop help text. */}
+ {t('calendar.management.description_field', 'Description')}
JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
+const common = catalog('locales/en/common.json');
+const overlay = catalog('locales/rn/en.json');
+
+function lookup(tree: Record, key: string): unknown {
+ return key.split('.').reduce((node, part) => (node as Record | undefined)?.[part], tree);
+}
+
+// The app reads the overlay over the webmail's catalog.
+const english = (key: string) => (lookup(overlay, key) ?? lookup(common, key)) as string | undefined;
+
+describe('the calendar sheet’s description field', () => {
+ it('is named "Description", not by the webmail’s desktop help text', () => {
+ const before = source.slice(0, source.indexOf('value={description}'));
+ const input = before.slice(before.lastIndexOf('\{t\('([^']+)'/g)];
+ expect(english(labels[labels.length - 1][1])).toBe('Description');
+ });
+});