Skip to content

Your favorite shift management application!

feat: Centralize i18n keys and migrate usages (#42)

panteLacf8b06ef544
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 224d3ad..3a2d114 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -149,6 +149,69 @@ next-intl setup with auto-detection:
- Usage: `const t = useTranslations()` → `t("shift.create")`
- Date formatting: `locale === "de" ? de : enUS`
+**Translation Structure (Optimized)**:
+
+The translation files use a centralized structure to eliminate duplicates and ensure consistency.
+
+**German Translation Style**:
+
+- Always use informal "du" form (never formal "Sie" form)
+- Examples: "Möchtest du..." (not "Möchten Sie..."), "Bitte entsperre..." (not "Bitte entsperren Sie...")
+- This applies to all user-facing messages, descriptions, hints, and instructions
+
+**Common Keys (Parametrized)**:
+
+```typescript
+// Success/Error Messages - use {item} parameter
+toast.success(t("common.created", { item: t("shift.title") }));
+toast.error(t("common.createError", { item: t("calendar.title") }));
+toast.success(t("common.updated", { item: t("preset.create") }));
+toast.error(t("common.deleteError", { item: t("note.note") }));
+
+// Available: common.created, common.updated, common.deleted
+// common.createError, common.updateError, common.deleteError
+// common.deleteConfirm, common.deleteConfirmWithWarning
+```
+
+**Validation Keys (Centralized)**:
+
+```typescript
+// Password validation
+setError(t("validation.passwordMatch"));
+setError(t("validation.passwordIncorrect"));
+setError(t("validation.passwordRequired"));
+
+// File/URL validation
+toast.error(t("validation.fileRequired"));
+toast.error(t("validation.fileTooLarge", { maxSize: "5MB" }));
+toast.error(t("validation.urlRequired"));
+toast.error(t("validation.urlInvalid"));
+toast.error(t("validation.urlAlreadyExists"));
+```
+
+**Form Field Keys (Reusable)**:
+
+```typescript
+// Form labels and placeholders
+<Label>{t("form.nameLabel")}</Label>
+<Input placeholder={t("form.namePlaceholder", { example: t("calendar.name") })} />
+<Label>{t("form.colorLabel")}</Label>
+<Label>{t("form.passwordLabel")}</Label>
+<Input placeholder={t("form.passwordPlaceholder")} />
+<Label>{t("form.notesLabel")}</Label>
+<Textarea placeholder={t("form.notesPlaceholder")} />
+<Label>{t("form.urlLabel")}</Label>
+<Input placeholder={t("form.urlPlaceholder")} />
+```
+
+**Key Rules**:
+
+- **Never duplicate** CRUD success/error messages - always use `common.*` with `{item}` parameter
+- **Never duplicate** validation messages - use `validation.*` namespace
+- **Never duplicate** form field labels - use `form.*` namespace
+- Feature-specific keys (e.g., `shift.startTime`, `calendar.select`) remain in their namespace
+- When adding new features, check if message fits `common.*`, `validation.*`, or `form.*` before creating new keys
+
**Translation Key Usage Status**:
All translation keys in `messages/{de,en}.json` are actively used.
diff --git a/app/page.tsx b/app/page.tsx
index 5015d57..3a1fd9a 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -915,11 +915,11 @@ function HomeContent() {
// Trigger data refetch after successful password entry
handlePasswordSuccess(password);
} else {
- toast.error(t("password.errorIncorrect"));
+ toast.error(t("validation.passwordIncorrect"));
}
})
.catch(() => {
- toast.error(t("password.errorIncorrect"));
+ toast.error(t("validation.passwordIncorrect"));
});
}
}}
@@ -930,13 +930,13 @@ function HomeContent() {
htmlFor="unlock-password"
className="text-sm font-medium"
>
- {t("password.password")}
+ {t("form.passwordLabel")}
</Label>
<Input
id="unlock-password"
name="password"
type="password"
- placeholder={t("password.passwordPlaceholder")}
+ placeholder={t("form.passwordPlaceholder")}
className="h-11 border-primary/30 focus:border-primary/50 focus:ring-primary/20"
autoFocus
/>
diff --git a/components/calendar-dialog.tsx b/components/calendar-dialog.tsx
index c59dae5..f976587 100644
--- a/components/calendar-dialog.tsx
+++ b/components/calendar-dialog.tsx
@@ -105,7 +105,9 @@ export function CalendarDialog({
</Label>
<Input
id="name"
- placeholder={t("calendar.namePlaceholder")}
+ placeholder={t("form.namePlaceholder", {
+ example: t("calendar.name"),
+ })}
value={name}
onChange={(e) => setName(e.target.value)}
className="h-11 border-border/50 focus:border-primary/50 focus:ring-primary/20 bg-background/50 backdrop-blur-sm transition-all"
@@ -115,7 +117,7 @@ export function CalendarDialog({
<div className="space-y-3">
<Label className="text-sm font-medium flex items-center gap-2">
<div className="w-1 h-4 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
- {t("calendar.color")}
+ {t("form.colorLabel")}
</Label>
<div className="grid grid-cols-4 gap-3 p-4 bg-muted/30 rounded-xl border border-border/30">
{PRESET_COLORS.map((colorObj) => (
@@ -181,12 +183,12 @@ export function CalendarDialog({
>
<div className="space-y-2">
<Label htmlFor="password" className="text-sm">
- {t("password.password")}
+ {t("form.passwordLabel")}
</Label>
<Input
id="password"
type="password"
- placeholder={t("password.passwordPlaceholder")}
+ placeholder={t("form.passwordPlaceholder")}
value={password}
onChange={(e) => setPassword(e.target.value)}
className="h-10 border-primary/30 focus:border-primary/50 focus:ring-primary/20 bg-background/80"
diff --git a/components/delete-calendar-dialog.tsx b/components/delete-calendar-dialog.tsx
index ab2b28d..a42e547 100644
--- a/components/delete-calendar-dialog.tsx
+++ b/components/delete-calendar-dialog.tsx
@@ -77,14 +77,14 @@ export function DeleteCalendarDialog({
className="text-sm font-medium flex items-center gap-2"
>
<div className="w-1 h-4 bg-gradient-to-b from-destructive to-destructive/50 rounded-full"></div>
- {t("password.password")}
+ {t("form.passwordLabel")}
</Label>
<Input
id="password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
- placeholder={t("password.passwordPlaceholder")}
+ placeholder={t("form.passwordPlaceholder")}
className="h-11 border-destructive/30 focus:border-destructive/50 focus:ring-destructive/20 bg-background/50"
required
autoFocus
diff --git a/components/external-sync-manage-dialog.tsx b/components/external-sync-manage-dialog.tsx
index d3dd53b..8639b8d 100644
--- a/components/external-sync-manage-dialog.tsx
+++ b/components/external-sync-manage-dialog.tsx
@@ -191,20 +191,20 @@ export function ExternalSyncManageDialog({
// For file upload
if (importType === "file") {
if (!icsFile) {
- toast.error(t("externalSync.fileRequired"));
+ toast.error(t("validation.fileRequired"));
return;
}
} else {
// For URL-based imports
if (!formUrl.trim()) {
- toast.error(t("externalSync.urlRequired"));
+ toast.error(t("validation.urlRequired"));
return;
}
// Detect and validate calendar URL format
const detectedType = detectCalendarSyncType(formUrl.trim());
if (!isValidCalendarUrl(formUrl.trim(), detectedType)) {
- toast.error(t("externalSync.invalidUrlFormat"));
+ toast.error(t("validation.urlInvalid"));
return;
}
@@ -217,7 +217,7 @@ export function ExternalSyncManageDialog({
);
if (urlExists) {
- toast.error(t("externalSync.urlAlreadyExists"));
+ toast.error(t("validation.urlAlreadyExists"));
return;
}
}
@@ -231,7 +231,7 @@ export function ExternalSyncManageDialog({
// Check file size (limit: 5MB)
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
if (icsFile.size > MAX_FILE_SIZE) {
- toast.error(t("externalSync.fileTooLarge"));
+ toast.error(t("validation.fileTooLarge", { maxSize: "5MB" }));
setIsLoading(false);
return;
}
@@ -271,16 +271,23 @@ export function ExternalSyncManageDialog({
setShowAddForm(false);
await fetchSyncs();
onSyncComplete?.(); // Trigger refresh to update parent state
- toast.success(t("externalSync.createSuccess"));
+ toast.success(
+ t("common.created", { item: t("externalSync.syncTypeCustom") })
+ );
// Auto-sync the newly created sync
await handleSync(newSync.id);
} else {
const data = await response.json();
- toast.error(data.error || t("externalSync.createError"));
+ toast.error(
+ data.error ||
+ t("common.createError", { item: t("externalSync.syncTypeCustom") })
+ );
}
} catch (error) {
console.error("Failed to create sync:", error);
- toast.error(t("externalSync.createError"));
+ toast.error(
+ t("common.createError", { item: t("externalSync.syncTypeCustom") })
+ );
} finally {
setIsLoading(false);
}
@@ -315,14 +322,21 @@ export function ExternalSyncManageDialog({
setFormAutoSyncInterval(0);
await fetchSyncs();
onSyncComplete?.(); // Trigger refresh of shifts and externalSyncs
- toast.success(t("externalSync.updateSuccess"));
+ toast.success(
+ t("common.updated", { item: t("externalSync.syncTypeCustom") })
+ );
} else {
const data = await response.json();
- toast.error(data.error || t("externalSync.updateError"));
+ toast.error(
+ data.error ||
+ t("common.updateError", { item: t("externalSync.syncTypeCustom") })
+ );
}
} catch (error) {
console.error("Failed to update sync:", error);
- toast.error(t("externalSync.updateError"));
+ toast.error(
+ t("common.updateError", { item: t("externalSync.syncTypeCustom") })
+ );
} finally {
setIsLoading(false);
}
@@ -383,14 +397,21 @@ export function ExternalSyncManageDialog({
if (response.ok) {
await fetchSyncs();
onSyncComplete?.();
- toast.success(t("externalSync.deleteSuccess"));
+ toast.success(
+ t("common.deleted", { item: t("externalSync.syncTypeCustom") })
+ );
} else {
const data = await response.json();
- toast.error(data.error || t("externalSync.deleteError"));
+ toast.error(
+ data.error ||
+ t("common.deleteError", { item: t("externalSync.syncTypeCustom") })
+ );
}
} catch (error) {
console.error("Delete error:", error);
- toast.error(t("externalSync.deleteError"));
+ toast.error(
+ t("common.deleteError", { item: t("externalSync.syncTypeCustom") })
+ );
} finally {
setIsDeleting(null);
}
@@ -462,10 +483,15 @@ export function ExternalSyncManageDialog({
if (response.ok) {
await fetchSyncs();
onSyncComplete?.(); // Trigger refresh
- toast.success(t("externalSync.updateSuccess"));
+ toast.success(
+ t("common.updated", { item: t("externalSync.syncTypeCustom") })
+ );
} else {
const data = await response.json();
- toast.error(data.error || t("externalSync.updateError"));
+ toast.error(
+ data.error ||
+ t("common.updateError", { item: t("externalSync.syncTypeCustom") })
+ );
// Revert optimistic update on error
if (editingSync && editingSync.id === syncId) {
@@ -477,7 +503,9 @@ export function ExternalSyncManageDialog({
}
} catch (error) {
console.error("Failed to update visibility:", error);
- toast.error(t("externalSync.updateError"));
+ toast.error(
+ t("common.updateError", { item: t("externalSync.syncTypeCustom") })
+ );
// Revert optimistic update on error
if (editingSync && editingSync.id === syncId) {
@@ -539,16 +567,25 @@ export function ExternalSyncManageDialog({
autoSyncInterval: formAutoSyncInterval,
};
}
- toast.success(t("externalSync.updateSuccess"));
+ toast.success(
+ t("common.updated", { item: t("externalSync.syncTypeCustom") })
+ );
return true;
} else {
const data = await response.json();
- toast.error(data.error || t("externalSync.updateError"));
+ toast.error(
+ data.error ||
+ t("common.updateError", {
+ item: t("externalSync.syncTypeCustom"),
+ })
+ );
return false;
}
} catch (error) {
console.error("Failed to save sync:", error);
- toast.error(t("externalSync.updateError"));
+ toast.error(
+ t("common.updateError", { item: t("externalSync.syncTypeCustom") })
+ );
return false;
}
},
@@ -660,7 +697,7 @@ export function ExternalSyncManageDialog({
// Get URL placeholder - show generic placeholder for all
const getUrlPlaceholder = () => {
- return t("externalSync.urlPlaceholder");
+ return t("form.urlPlaceholder");
};
const getUrlHint = () => {
@@ -808,17 +845,17 @@ export function ExternalSyncManageDialog({
{(showAddForm || editingSync) && (
<div className="rounded-xl border border-border/50 bg-muted/20 p-4 space-y-4">
<h3 className="font-semibold">
- {editingSync
- ? t("externalSync.editSync")
- : t("externalSync.addSync")}
+ {editingSync ? t("externalSync.editSync") : t("common.add")}
</h3>
<div className="space-y-2">
- <Label htmlFor="sync-name">{t("externalSync.nameLabel")}</Label>
+ <Label htmlFor="sync-name">{t("form.nameLabel")}</Label>
<Input
id="sync-name"
type="text"
- placeholder={t("externalSync.namePlaceholder")}
+ placeholder={t("form.namePlaceholder", {
+ example: t("externalSync.syncTypeCustom"),
+ })}
value={formName}
onChange={(e) => setFormName(e.target.value)}
disabled={isLoading}
@@ -888,9 +925,7 @@ export function ExternalSyncManageDialog({
// Show URL input for new syncs OR when editing non-one-time-import syncs
(!editingSync || !editingSync.isOneTimeImport) && (
<div className="space-y-2">
- <Label htmlFor="sync-url">
- {t("externalSync.urlLabel")}
- </Label>
+ <Label htmlFor="sync-url">{t("form.urlLabel")}</Label>
<Input
id="sync-url"
type="text"
@@ -916,7 +951,7 @@ export function ExternalSyncManageDialog({
<ColorPicker
color={formColor}
onChange={setFormColor}
- label={t("externalSync.colorLabel")}
+ label={t("form.colorLabel")}
presetColors={PRESET_COLORS}
/>
<p className="text-xs text-muted-foreground">
@@ -1109,7 +1144,7 @@ export function ExternalSyncManageDialog({
{isLoading ? (
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
) : null}
- {t("externalSync.addSync")}
+ {t("common.add")}
</Button>
</div>
)}
diff --git a/components/manage-password-dialog.tsx b/components/manage-password-dialog.tsx
index 45b9b80..ee3368e 100644
--- a/components/manage-password-dialog.tsx
+++ b/components/manage-password-dialog.tsx
@@ -61,7 +61,7 @@ export function ManagePasswordDialog({
// Always require current password when calendar has password
if (hasPassword && !currentPassword) {
- setError(t("password.errorRequired"));
+ setError(t("validation.passwordRequired"));
return;
}
@@ -69,7 +69,7 @@ export function ManagePasswordDialog({
const isChangingPassword = !removePassword && newPassword;
if (isChangingPassword) {
if (newPassword !== confirmPassword) {
- setError(t("password.errorMatch"));
+ setError(t("validation.passwordMatch"));
return;
}
}
@@ -102,13 +102,13 @@ export function ManagePasswordDialog({
});
if (response.status === 401) {
- setError(t("password.errorIncorrect"));
+ setError(t("validation.passwordIncorrect"));
setLoading(false);
return;
}
if (!response.ok) {
- setError(t("password.errorIncorrect"));
+ setError(t("validation.passwordIncorrect"));
setLoading(false);
return;
}
@@ -129,7 +129,7 @@ export function ManagePasswordDialog({
onOpenChange(false);
} catch (error) {
console.error("Failed to update password:", error);
- setError(t("password.errorIncorrect"));
+ setError(t("validation.passwordIncorrect"));
} finally {
setLoading(false);
}
@@ -233,7 +233,7 @@ export function ManagePasswordDialog({
<div className="w-1 h-4 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
{hasPassword
? t("password.newPassword")
- : t("password.password")}
+ : t("form.passwordLabel")}
</Label>
<Input
id="newPassword"
diff --git a/components/password-dialog.tsx b/components/password-dialog.tsx
index 1cca959..bf9239f 100644
--- a/components/password-dialog.tsx
+++ b/components/password-dialog.tsx
@@ -53,11 +53,11 @@ export function PasswordDialog({
onSuccess(password);
onOpenChange(false);
} else {
- setError(t("password.errorIncorrect"));
+ setError(t("validation.passwordIncorrect"));
}
} catch (error) {
console.error("Failed to verify password:", error);
- setError(t("password.errorIncorrect"));
+ setError(t("validation.passwordIncorrect"));
} finally {
setLoading(false);
}
@@ -68,7 +68,7 @@ export function PasswordDialog({
<DialogContent className="sm:max-w-[440px] p-0 gap-0 border border-border/50 bg-gradient-to-b from-background via-background to-muted/30 backdrop-blur-xl shadow-2xl">
<DialogHeader className="border-b border-border/50 bg-gradient-to-r from-red-500/10 via-red-500/5 to-transparent p-6 pb-5 space-y-1.5">
<DialogTitle className="text-xl font-semibold bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text">
- {t("password.password")} {t("common.required")}
+ {t("form.passwordLabel")} {t("common.required")}
</DialogTitle>
<DialogDescription asChild>
<div className="text-sm text-muted-foreground flex items-center gap-2">
@@ -84,7 +84,7 @@ export function PasswordDialog({
className="text-sm font-medium flex items-center gap-2"
>
<div className="w-1 h-4 bg-gradient-to-b from-red-500 to-red-500/50 rounded-full"></div>
- {t("password.password")}
+ {t("form.passwordLabel")}
</Label>
<Input
id="password"
@@ -115,7 +115,7 @@ export function PasswordDialog({
disabled={loading || !password}
className="flex-1 h-11 bg-gradient-to-r from-red-500 to-red-500/90 hover:from-red-500/90 hover:to-red-500/80 shadow-lg shadow-red-500/25 disabled:opacity-50 disabled:shadow-none"
>
- {loading ? t("common.loading") : t("password.unlock")}
+ {loading ? t("common.loading") : t("common.unlock")}
</Button>
</div>
</form>
diff --git a/components/preset-edit-dialog.tsx b/components/preset-edit-dialog.tsx
index ca4e7fa..842c579 100644
--- a/components/preset-edit-dialog.tsx
+++ b/components/preset-edit-dialog.tsx
@@ -173,7 +173,9 @@ export function PresetEditDialog({
</Label>
<Input
id="preset-title"
- placeholder={t("preset.namePlaceholder")}
+ placeholder={t("form.namePlaceholder", {
+ example: t("preset.presetName"),
+ })}
value={formData.title}
onChange={(e) =>
setFormData({ ...formData, title: e.target.value })
@@ -240,7 +242,7 @@ export function PresetEditDialog({
<ColorPicker
color={formData.color}
onChange={(color) => setFormData({ ...formData, color })}
- label={t("shift.color")}
+ label={t("form.colorLabel")}
presetColors={PRESET_COLORS}
/>
@@ -250,11 +252,11 @@ export function PresetEditDialog({
className="text-sm font-medium flex items-center gap-2"
>
<div className="w-1 h-4 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
- {t("shift.notesOptional")}
+ {t("form.notesLabel")}
</Label>
<Input
id="preset-notes"
- placeholder={t("shift.notesPlaceholder")}
+ placeholder={t("form.notesPlaceholder")}
value={formData.notes}
onChange={(e) =>
setFormData({ ...formData, notes: e.target.value })
diff --git a/components/preset-selector.tsx b/components/preset-selector.tsx
index 23f17f0..63849d2 100644
--- a/components/preset-selector.tsx
+++ b/components/preset-selector.tsx
@@ -86,11 +86,11 @@ export function PresetSelector({
`Failed to create preset: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("preset.saveError"));
+ toast.error(t("common.createError", { item: t("preset.create") }));
return;
}
- toast.success(t("preset.created"));
+ toast.success(t("common.created", { item: t("preset.create") }));
} else if (editingPreset) {
const response = await fetch(`/api/presets/${editingPreset.id}`, {
method: "PATCH",
@@ -104,11 +104,11 @@ export function PresetSelector({
`Failed to update preset: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("preset.saveError"));
+ toast.error(t("common.updateError", { item: t("preset.create") }));
return;
}
- toast.success(t("preset.updated"));
+ toast.success(t("common.updated", { item: t("preset.create") }));
if (onShiftsChange) onShiftsChange();
if (onStatsRefresh) onStatsRefresh();
@@ -123,7 +123,7 @@ export function PresetSelector({
}
} catch (error) {
console.error("Failed to save preset:", error);
- toast.error(t("preset.saveError"));
+ toast.error(t("common.updateError", { item: t("preset.create") }));
}
};
@@ -148,7 +148,7 @@ export function PresetSelector({
`Failed to delete preset: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("preset.deleteError"));
+ toast.error(t("common.deleteError", { item: t("preset.create") }));
return;
}
@@ -158,10 +158,10 @@ export function PresetSelector({
onPresetsChange();
if (onShiftsChange) onShiftsChange();
- toast.success(t("preset.deleted"));
+ toast.success(t("common.deleted", { item: t("preset.create") }));
} catch (error) {
console.error("Failed to delete preset:", error);
- toast.error(t("preset.deleteError"));
+ toast.error(t("common.deleteError", { item: t("preset.create") }));
}
});
};
diff --git a/components/shift-form-fields.tsx b/components/shift-form-fields.tsx
index dae7ae4..52b2b63 100644
--- a/components/shift-form-fields.tsx
+++ b/components/shift-form-fields.tsx
@@ -138,11 +138,11 @@ export function ShiftFormFields({
className="text-sm font-medium flex items-center gap-2"
>
<div className="w-1 h-4 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
- {t("shift.notesOptional")}
+ {t("form.notesLabel")}
</Label>
<Textarea
id="notes"
- placeholder={t("shift.notesPlaceholder")}
+ placeholder={t("form.notesPlaceholder")}
value={formData.notes}
onChange={(e) =>
onFormDataChange({ ...formData, notes: e.target.value })
@@ -156,7 +156,7 @@ export function ShiftFormFields({
<ColorPicker
color={formData.color || "#3b82f6"}
onChange={(color) => onFormDataChange({ ...formData, color })}
- label={t("shift.color")}
+ label={t("form.colorLabel")}
presetColors={PRESET_COLORS}
/>
diff --git a/components/sync-notification-dialog.tsx b/components/sync-notification-dialog.tsx
index 275b0cc..9aee04c 100644
--- a/components/sync-notification-dialog.tsx
+++ b/components/sync-notification-dialog.tsx
@@ -148,13 +148,19 @@ export function SyncNotificationDialog({
if (response.ok) {
setLogs([]);
- toast.success(t("syncNotifications.deleteSuccess"));
+ toast.success(
+ t("common.deleted", { item: t("syncNotifications.title") })
+ );
} else {
- toast.error(t("syncNotifications.deleteError"));
+ toast.error(
+ t("common.deleteError", { item: t("syncNotifications.title") })
+ );
}
} catch (error) {
console.error("Failed to delete sync logs:", error);
- toast.error(t("syncNotifications.deleteError"));
+ toast.error(
+ t("common.deleteError", { item: t("syncNotifications.title") })
+ );
} finally {
setIsDeleting(false);
}
@@ -182,11 +188,15 @@ export function SyncNotificationDialog({
// Notify parent to refresh error status
onErrorsMarkedRead?.();
} else {
- toast.error(t("syncNotifications.markAsReadError"));
+ toast.error(
+ t("common.updateError", { item: t("syncNotifications.title") })
+ );
}
} catch (error) {
console.error("Failed to mark errors as read:", error);
- toast.error(t("syncNotifications.markAsReadError"));
+ toast.error(
+ t("common.updateError", { item: t("syncNotifications.title") })
+ );
} finally {
setIsMarkingRead(false);
}
diff --git a/hooks/useCalendars.ts b/hooks/useCalendars.ts
index 5b053a3..4dc9ef9 100644
--- a/hooks/useCalendars.ts
+++ b/hooks/useCalendars.ts
@@ -57,7 +57,7 @@ export function useCalendars(initialCalendarId?: string | null) {
`Failed to create calendar: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("calendar.createError"));
+ toast.error(t("common.createError", { item: t("calendar.title") }));
return;
}
@@ -70,10 +70,10 @@ export function useCalendars(initialCalendarId?: string | null) {
setCachedPassword(newCalendar.id, password);
}
- toast.success(t("calendar.created"));
+ toast.success(t("common.created", { item: t("calendar.title") }));
} catch (error) {
console.error("Failed to create calendar:", error);
- toast.error(t("calendar.createError"));
+ toast.error(t("common.createError", { item: t("calendar.title") }));
}
};
@@ -88,7 +88,7 @@ export function useCalendars(initialCalendarId?: string | null) {
});
if (response.status === 401) {
- toast.error(t("password.errorIncorrect"));
+ toast.error(t("validation.passwordIncorrect"));
return false;
}
@@ -108,7 +108,7 @@ export function useCalendars(initialCalendarId?: string | null) {
});
removeCachedPassword(calendarId);
- toast.success(t("calendar.deleted"));
+ toast.success(t("common.deleted", { item: t("calendar.title") }));
return true;
} else {
const errorText = await response.text();
@@ -116,12 +116,12 @@ export function useCalendars(initialCalendarId?: string | null) {
`Failed to delete calendar: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("calendar.deleteError"));
+ toast.error(t("common.deleteError", { item: t("calendar.title") }));
return false;
}
} catch (error) {
console.error("Failed to delete calendar:", error);
- toast.error(t("calendar.deleteError"));
+ toast.error(t("common.deleteError", { item: t("calendar.title") }));
}
return false;
};
diff --git a/hooks/useNotes.ts b/hooks/useNotes.ts
index 7eff6d5..154bcce 100644
--- a/hooks/useNotes.ts
+++ b/hooks/useNotes.ts
@@ -72,17 +72,17 @@ export function useNotes(calendarId: string | undefined) {
`Failed to create note: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("note.createError"));
+ toast.error(t("common.createError", { item: t("note.note") }));
return false;
}
const newNote = await response.json();
setNotes((prev) => [...prev, newNote]);
- toast.success(t("note.created"));
+ toast.success(t("common.created", { item: t("note.note") }));
return true;
} catch (error) {
console.error("Failed to create note:", error);
- toast.error(t("note.createError"));
+ toast.error(t("common.createError", { item: t("note.note") }));
return false;
}
};
@@ -112,17 +112,17 @@ export function useNotes(calendarId: string | undefined) {
`Failed to update note: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("note.updateError"));
+ toast.error(t("common.updateError", { item: t("note.note") }));
return false;
}
const updatedNote = await response.json();
setNotes((prev) => prev.map((n) => (n.id === noteId ? updatedNote : n)));
- toast.success(t("note.updated"));
+ toast.success(t("common.updated", { item: t("note.note") }));
return true;
} catch (error) {
console.error("Failed to update note:", error);
- toast.error(t("note.updateError"));
+ toast.error(t("common.updateError", { item: t("note.note") }));
return false;
}
};
@@ -153,16 +153,16 @@ export function useNotes(calendarId: string | undefined) {
`Failed to delete note: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("note.deleteError"));
+ toast.error(t("common.deleteError", { item: t("note.note") }));
return false;
}
setNotes((prev) => prev.filter((n) => n.id !== noteId));
- toast.success(t("note.deleted"));
+ toast.success(t("common.deleted", { item: t("note.note") }));
return true;
} catch (error) {
console.error("Failed to delete note:", error);
- toast.error(t("note.deleteError"));
+ toast.error(t("common.deleteError", { item: t("note.note") }));
return false;
}
};
diff --git a/hooks/useShifts.ts b/hooks/useShifts.ts
index 902dec3..18e1937 100644
--- a/hooks/useShifts.ts
+++ b/hooks/useShifts.ts
@@ -73,7 +73,7 @@ export function useShifts(calendarId: string | undefined) {
errorText
);
setShifts((shifts) => shifts.filter((s) => s.id !== tempId));
- toast.error(t("shift.createError"));
+ toast.error(t("common.createError", { item: t("shift.title") }));
return null;
}
@@ -81,12 +81,12 @@ export function useShifts(calendarId: string | undefined) {
setShifts((shifts) =>
shifts.map((s) => (s.id === tempId ? newShift : s))
);
- toast.success(t("shift.created"));
+ toast.success(t("common.created", { item: t("shift.title") }));
return newShift;
} catch (error) {
console.error("Failed to create shift:", error);
setShifts((shifts) => shifts.filter((s) => s.id !== tempId));
- toast.error(t("shift.createError"));
+ toast.error(t("common.createError", { item: t("shift.title") }));
return null;
}
};
@@ -116,17 +116,17 @@ export function useShifts(calendarId: string | undefined) {
`Failed to update shift: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("shift.updateError"));
+ toast.error(t("common.updateError", { item: t("shift.title") }));
return false;
}
const updatedShift = await response.json();
setShifts((prev) => prev.map((s) => (s.id === id ? updatedShift : s)));
- toast.success(t("shift.updated"));
+ toast.success(t("common.updated", { item: t("shift.title") }));
return true;
} catch (error) {
console.error("Failed to update shift:", error);
- toast.error(t("shift.updateError"));
+ toast.error(t("common.updateError", { item: t("shift.title") }));
return false;
}
};
@@ -154,16 +154,16 @@ export function useShifts(calendarId: string | undefined) {
`Failed to delete shift: ${response.status} ${response.statusText}`,
errorText
);
- toast.error(t("shift.deleteError"));
+ toast.error(t("common.deleteError", { item: t("shift.title") }));
return false;
}
setShifts((prev) => prev.filter((s) => s.id !== id));
- toast.success(t("shift.deleted"));
+ toast.success(t("common.deleted", { item: t("shift.title") }));
return true;
} catch (error) {
console.error("Failed to delete shift:", error);
- toast.error(t("shift.deleteError"));
+ toast.error(t("common.deleteError", { item: t("shift.title") }));
return false;
}
};
diff --git a/messages/de.json b/messages/de.json
index 9ad7124..20a75e0 100644
--- a/messages/de.json
+++ b/messages/de.json
@@ -8,7 +8,38 @@
"create": "Erstellen",
"loading": "Lädt...",
"required": "erforderlich",
- "unlock": "Entsperren"
+ "unlock": "Entsperren",
+ "manage": "Verwalten",
+ "add": "Hinzufügen",
+ "created": "{item} erfolgreich erstellt",
+ "updated": "{item} erfolgreich aktualisiert",
+ "deleted": "{item} erfolgreich gelöscht",
+ "createError": "{item} konnte nicht erstellt werden",
+ "updateError": "{item} konnte nicht aktualisiert werden",
+ "deleteError": "{item} konnte nicht gelöscht werden",
+ "deleteConfirm": "{item} \"{name}\" wirklich löschen?",
+ "deleteConfirmWithWarning": "{item} \"{name}\" wirklich löschen? {warning}"
+ },
+ "validation": {
+ "passwordMatch": "Passwörter stimmen nicht überein",
+ "passwordIncorrect": "Falsches Passwort",
+ "passwordRequired": "Passwort erforderlich",
+ "fileRequired": "Bitte wähle eine Datei aus",
+ "fileTooLarge": "Datei ist zu groß. Maximale Größe beträgt {maxSize}.",
+ "urlRequired": "Bitte gib eine URL ein",
+ "urlInvalid": "Ungültiges URL-Format",
+ "urlAlreadyExists": "Diese URL wurde bereits hinzugefügt"
+ },
+ "form": {
+ "namePlaceholder": "z.B. {example}",
+ "nameLabel": "Name",
+ "colorLabel": "Farbe",
+ "notesLabel": "Notizen (optional)",
+ "notesPlaceholder": "Zusätzliche Informationen...",
+ "passwordLabel": "Passwort",
+ "passwordPlaceholder": "Passwort eingeben",
+ "urlLabel": "URL",
+ "urlPlaceholder": "https://..."
},
"app": {
"title": "BetterShift",
@@ -20,17 +51,10 @@
"createDescription": "Erstelle einen neuen Kalender, um deine Schichten zu organisieren",
"selectDescription": "Wähle einen Kalender aus, um deine Schichten zu verwalten",
"name": "Kalendername",
- "namePlaceholder": "z.B. Meine Schichten",
- "color": "Farbe",
- "managePassword": "Passwort verwalten",
"select": "Dein BetterShift Kalender",
"deleteCalendar": "Kalender löschen",
- "deleteConfirm": "Kalender \"{name}\" wirklich löschen? Alle Schichten, Presets und Notizen werden ebenfalls gelöscht.",
- "deleteWarning": "Diese Aktion kann nicht rückgängig gemacht werden. Alle Schichten, Presets und Notizen werden permanent gelöscht.",
- "created": "Kalender erfolgreich erstellt",
- "deleted": "Kalender erfolgreich gelöscht",
- "createError": "Kalender konnte nicht erstellt werden",
- "deleteError": "Kalender konnte nicht gelöscht werden"
+ "deleteWarning": "Alle Schichten, Presets und Notizen werden ebenfalls gelöscht.",
+ "managePassword": "Passwort verwalten"
},
"color": {
"custom": "Eigene Farbe",
@@ -39,8 +63,6 @@
},
"password": {
"optional": "Passwortschutz (optional)",
- "password": "Passwort",
- "passwordPlaceholder": "Passwort eingeben",
"currentPassword": "Aktuelles Passwort",
"currentPasswordPlaceholder": "Aktuelles Passwort eingeben",
"newPassword": "Neues Passwort",
@@ -53,16 +75,12 @@
"enterCalendarPassword": "Kalenderpasswort eingeben",
"currentlyProtected": "Dieser Kalender ist derzeit passwortgeschützt.",
"notProtected": "Dieser Kalender ist derzeit nicht passwortgeschützt.",
- "lockCalendar": "Kalender sperren",
- "lockCalendarHint": "Kalender komplett sperren - Passwort erforderlich für alle Aktionen",
+ "lockCalendar": "Kalender komplett sperren",
+ "lockCalendarHint": "Sperrt Kalender komplett - Passwort zum sehen und verwalten erforderlich",
"lockRequiresPassword": "Kalendersperre erfordert ein Passwort",
"currentlyLocked": "Dieser Kalender ist derzeit gesperrt.",
- "errorMatch": "Passwörter stimmen nicht überein",
- "errorIncorrect": "Falsches Passwort",
- "errorRequired": "Passwort erforderlich",
- "unlock": "Entsperren",
"unlockRequired": "Kalender ist passwortgeschützt",
- "unlockRequiredDescription": "Dieser Kalender ist passwortgeschützt. Bitte entsperren Sie den Kalender, um Vorlagen zu verwalten und Schichten zu erstellen.",
+ "unlockRequiredDescription": "Dieser Kalender ist passwortgeschützt. Bitte entsperre den Kalender, um Vorlagen zu verwalten und Schichten zu erstellen.",
"unlockCalendar": "Kalender entsperren"
},
"note": {
@@ -71,13 +89,7 @@
"note": "Notiz",
"notePlaceholder": "z.B. Frühdienst weil nachmittags Termin...",
"hintMobile": "Langes Drücken auf einen Tag öffnet Notizen. Das Notiz-Icon zeigt vorhandene Notizen an.",
- "hintDesktop": "Rechtsklick auf einen Tag öffnet Notizen. Das Notiz-Icon zeigt vorhandene Notizen an.",
- "created": "Notiz erfolgreich erstellt",
- "updated": "Notiz erfolgreich aktualisiert",
- "deleted": "Notiz erfolgreich gelöscht",
- "createError": "Notiz konnte nicht erstellt werden",
- "updateError": "Notiz konnte nicht aktualisiert werden",
- "deleteError": "Notiz konnte nicht gelöscht werden"
+ "hintDesktop": "Rechtsklick auf einen Tag öffnet Notizen. Das Notiz-Icon zeigt vorhandene Notizen an."
},
"shift": {
"title": "Schichten",
@@ -90,9 +102,6 @@
"endTime": "Endzeit",
"titlePlaceholder": "z.B. Frühschicht",
"titleLabel": "Titel",
- "color": "Farbe",
- "notesPlaceholder": "Zusätzliche Informationen...",
- "notesOptional": "Notizen (optional)",
"allDay": "GT",
"allDayShift": "Ganztägige Schicht",
"noShiftsInMonth": "Keine Schichten in diesem Monat",
@@ -102,13 +111,7 @@
"selectPreset": "Vorlage auswählen",
"none": "Keine",
"addShift": "Schicht hinzufügen",
- "saveChanges": "Änderungen speichern",
- "created": "Schicht erfolgreich erstellt",
- "updated": "Schicht erfolgreich aktualisiert",
- "deleted": "Schicht erfolgreich gelöscht",
- "createError": "Schicht konnte nicht erstellt werden",
- "updateError": "Schicht konnte nicht aktualisiert werden",
- "deleteError": "Schicht konnte nicht gelöscht werden"
+ "saveChanges": "Änderungen speichern"
},
"preset": {
"create": "Neue Vorlage",
@@ -119,7 +122,6 @@
"manageDescription": "Bearbeite oder lösche deine Schichtvorlagen",
"createDescription": "Erstelle eine neue Vorlage für eine schnelle Schichterstellung",
"editDescription": "Aktualisiere Vorlagendetails",
- "namePlaceholder": "z.B. Frühschicht",
"saveAsPreset": "Als Vorlage speichern",
"presetName": "Vorlagenname",
"presetNamePlaceholder": "z.B. Frühschicht, Spätschicht...",
@@ -129,12 +131,7 @@
"secondaryPresets": "Sekundäre Vorlagen",
"markAsSecondary": "Als sekundär markieren (standardmäßig eingeklappt)",
"hideFromStats": "Aus Statistik ausblenden",
- "hideFromStatsHint": "Schichten dieser Vorlage aus der Statistik ausschließen",
- "created": "Vorlage erfolgreich erstellt",
- "updated": "Vorlage erfolgreich aktualisiert",
- "deleted": "Vorlage erfolgreich gelöscht",
- "saveError": "Vorlage konnte nicht gespeichert werden",
- "deleteError": "Vorlage konnte nicht gelöscht werden"
+ "hideFromStatsHint": "Schichten dieser Vorlage aus der Statistik ausschließen"
},
"calendar_grid": {
"monday": "Mo",
@@ -176,7 +173,6 @@
},
"externalSync": {
"manageTitle": "Externe Kalender verwalten",
- "manage": "Verwalten",
"manageDescription": "Füge mehrere externe Kalender für diesen Kalender hinzu und verwalte sie",
"syncTypeICloud": "iCloud",
"syncTypeGoogle": "Google",
@@ -186,12 +182,8 @@
"importMethodFile": "Datei hochladen (einmaliger Import)",
"importMethodUrlHint": "Externe Kalender-URL (iCloud, Google oder andere ICS-URLs)",
"importMethodFileHint": "ICS-Datei einmalig importieren",
- "urlPlaceholder": "https://example.com/calendar.ics oder webcal://...",
"fileLabel": "ICS-Datei",
- "fileRequired": "Bitte wähle eine ICS-Datei aus",
- "fileTooLarge": "Datei ist zu groß. Maximale Größe beträgt 5 MB.",
"fileSelected": "Datei ausgewählt",
- "urlRequired": "Bitte gib eine Kalender-URL ein",
"oneTimeImport": "Einmaliger Import",
"displayMode": "Synchronisierte Schichten anzeigen",
"displayModeNormal": "Normal (alle Schichten anzeigen)",
@@ -199,15 +191,8 @@
"displayModeHint": "Wähle, wie synchronisierte Schichten im Kalender angezeigt werden sollen",
"viewSyncedShifts": "Importierte Schichten anzeigen",
"syncedShiftsTitle": "Importierte Schichten - {date}",
- "addSync": "Hinzufügen",
"addNewSync": "Neuen externen Kalender hinzufügen",
"editSync": "Externen Kalender bearbeiten",
- "nameLabel": "Name",
- "namePlaceholder": "z.B. Arbeitskalender, Privatkalender",
- "urlLabel": "Kalender URL",
- "urlAlreadyExists": "Diese URL wurde bereits hinzugefügt",
- "invalidUrlFormat": "Ungültiges Kalender URL-Format. URL muss mit webcal:// oder https:// beginnen",
- "colorLabel": "Schichten-Farbe",
"colorHint": "Wähle die Farbe für alle importierten Schichten",
"hideCalendar": "Kalender ausblenden",
"hideCalendarHint": "Schichten dieses Kalenders ausblenden",
@@ -215,12 +200,6 @@
"hideFromStatsHint": "Schichten dieses Kalenders aus der Statistik ausschließen",
"lastSynced": "Zuletzt synchronisiert",
"syncError": "Kalender konnte nicht synchronisiert werden",
- "createError": "Externer Kalender konnte nicht erstellt werden",
- "createSuccess": "Externer Kalender erfolgreich erstellt",
- "updateError": "Externer Kalender konnte nicht aktualisiert werden",
- "updateSuccess": "Externer Kalender erfolgreich aktualisiert",
- "deleteError": "Externer Kalender konnte nicht gelöscht werden",
- "deleteSuccess": "Externer Kalender erfolgreich gelöscht",
"deleteConfirm": "Diesen externen Kalender löschen? Alle importierten Schichten werden entfernt.",
"syncSuccess": "Synchronisierung erfolgreich",
"statsCreated": "erstellt",
@@ -254,13 +233,10 @@
"filterSuccess": "Nur Erfolgreiche",
"filterError": "Nur Fehler",
"deleteAll": "Alle löschen",
- "deleteConfirm": "Möchten Sie wirklich alle Sync-Logs löschen?",
- "deleteSuccess": "Sync-Logs erfolgreich gelöscht",
- "deleteError": "Fehler beim Löschen der Sync-Logs",
+ "deleteConfirm": "Möchtest du wirklich alle Sync-Logs löschen?",
"hasErrors": "Fehler vorhanden",
"markAsRead": "Als gelesen markieren",
"markedAsRead": "Fehler als gelesen markiert",
- "markAsReadError": "Fehler beim Markieren als gelesen",
"read": "Gelesen"
}
}
diff --git a/messages/en.json b/messages/en.json
index 8869953..0464929 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -8,7 +8,38 @@
"create": "Create",
"loading": "Loading...",
"required": "required",
- "unlock": "Unlock"
+ "unlock": "Unlock",
+ "manage": "Manage",
+ "add": "Add",
+ "created": "{item} created successfully",
+ "updated": "{item} updated successfully",
+ "deleted": "{item} deleted successfully",
+ "createError": "Failed to create {item}",
+ "updateError": "Failed to update {item}",
+ "deleteError": "Failed to delete {item}",
+ "deleteConfirm": "Really delete {item} \"{name}\"?",
+ "deleteConfirmWithWarning": "Really delete {item} \"{name}\"? {warning}"
+ },
+ "validation": {
+ "passwordMatch": "Passwords do not match",
+ "passwordIncorrect": "Incorrect password",
+ "passwordRequired": "Password required",
+ "fileRequired": "Please select a file",
+ "fileTooLarge": "File is too large. Maximum size is {maxSize}.",
+ "urlRequired": "Please enter a URL",
+ "urlInvalid": "Invalid URL format",
+ "urlAlreadyExists": "This URL has already been added"
+ },
+ "form": {
+ "namePlaceholder": "e.g., {example}",
+ "nameLabel": "Name",
+ "colorLabel": "Color",
+ "notesLabel": "Notes (optional)",
+ "notesPlaceholder": "Additional information...",
+ "passwordLabel": "Password",
+ "passwordPlaceholder": "Enter password",
+ "urlLabel": "URL",
+ "urlPlaceholder": "https://..."
},
"app": {
"title": "BetterShift",
@@ -20,17 +51,10 @@
"createDescription": "Create a new calendar to organize your shifts",
"selectDescription": "Choose a calendar to manage your shifts",
"name": "Calendar Name",
- "namePlaceholder": "e.g., My Shifts",
- "color": "Color",
- "managePassword": "Manage Password",
"select": "Your BetterShift Calendar",
"deleteCalendar": "Delete Calendar",
- "deleteConfirm": "Really delete calendar \"{name}\"? All shifts, presets and notes will also be deleted.",
- "deleteWarning": "This action cannot be undone. All shifts, presets, and notes will be permanently deleted.",
- "created": "Calendar created successfully",
- "deleted": "Calendar deleted successfully",
- "createError": "Failed to create calendar",
- "deleteError": "Failed to delete calendar"
+ "deleteWarning": "All shifts, presets and notes will also be deleted.",
+ "managePassword": "Manage Password"
},
"color": {
"custom": "Custom",
@@ -39,8 +63,6 @@
},
"password": {
"optional": "Password Protection (optional)",
- "password": "Password",
- "passwordPlaceholder": "Enter password",
"currentPassword": "Current Password",
"currentPasswordPlaceholder": "Enter current password",
"newPassword": "New Password",
@@ -53,14 +75,10 @@
"enterCalendarPassword": "Enter calendar password",
"currentlyProtected": "This calendar is currently password protected.",
"notProtected": "This calendar is currently not password protected.",
- "lockCalendar": "Lock calendar",
- "lockCalendarHint": "Lock calendar completely - password required for all actions",
+ "lockCalendar": "Lock calendar completely",
+ "lockCalendarHint": "Locks calendar completely - password required to view and manage",
"lockRequiresPassword": "Locking the calendar requires a password",
"currentlyLocked": "This calendar is currently locked.",
- "errorMatch": "Passwords do not match",
- "errorIncorrect": "Incorrect password",
- "errorRequired": "Password required",
- "unlock": "Unlock",
"unlockRequired": "Calendar is password protected",
"unlockRequiredDescription": "This calendar is password protected. Please unlock the calendar to manage presets and create shifts.",
"unlockCalendar": "Unlock Calendar"
@@ -71,13 +89,7 @@
"note": "Note",
"notePlaceholder": "e.g., Early shift because appointment in the afternoon...",
"hintMobile": "Long press on a day to open notes. The note icon shows existing notes.",
- "hintDesktop": "Right-click on a day to open notes. The note icon shows existing notes.",
- "created": "Note created successfully",
- "updated": "Note updated successfully",
- "deleted": "Note deleted successfully",
- "createError": "Failed to create note",
- "updateError": "Failed to update note",
- "deleteError": "Failed to delete note"
+ "hintDesktop": "Right-click on a day to open notes. The note icon shows existing notes."
},
"shift": {
"title": "Shifts",
@@ -90,9 +102,6 @@
"endTime": "End Time",
"titlePlaceholder": "e.g., Morning Shift",
"titleLabel": "Title",
- "color": "Color",
- "notesPlaceholder": "Additional information...",
- "notesOptional": "Notes (optional)",
"allDay": "All Day",
"allDayShift": "All-day shift",
"noShiftsInMonth": "No shifts this month",
@@ -102,13 +111,7 @@
"selectPreset": "Select Preset",
"none": "None",
"addShift": "Add Shift",
- "saveChanges": "Save Changes",
- "created": "Shift created successfully",
- "updated": "Shift updated successfully",
- "deleted": "Shift deleted successfully",
- "createError": "Failed to create shift",
- "updateError": "Failed to update shift",
- "deleteError": "Failed to delete shift"
+ "saveChanges": "Save Changes"
},
"preset": {
"create": "New Preset",
@@ -119,7 +122,6 @@
"manageDescription": "Edit or delete your shift presets",
"createDescription": "Create a new preset for quick shift creation",
"editDescription": "Update preset details",
- "namePlaceholder": "e.g., Morning Shift",
"saveAsPreset": "Save as preset",
"presetName": "Preset name",
"presetNamePlaceholder": "e.g., Morning Shift, Evening Shift...",
@@ -129,12 +131,7 @@
"secondaryPresets": "Secondary Presets",
"markAsSecondary": "Mark as secondary (collapsed by default)",
"hideFromStats": "Hide from statistics",
- "hideFromStatsHint": "Exclude shifts from this preset from statistics",
- "created": "Preset created successfully",
- "updated": "Preset updated successfully",
- "deleted": "Preset deleted successfully",
- "saveError": "Failed to save preset",
- "deleteError": "Failed to delete preset"
+ "hideFromStatsHint": "Exclude shifts from this preset from statistics"
},
"calendar_grid": {
"monday": "Mon",
@@ -176,7 +173,6 @@
},
"externalSync": {
"manageTitle": "Manage External Calendars",
- "manage": "Manage",
"manageDescription": "Add and manage multiple external calendars for this calendar",
"syncTypeICloud": "iCloud",
"syncTypeGoogle": "Google",
@@ -186,12 +182,8 @@
"importMethodFile": "Upload File (one-time import)",
"importMethodUrlHint": "External calendar URL (iCloud, Google, or other ICS URLs)",
"importMethodFileHint": "Import ICS file once",
- "urlPlaceholder": "https://example.com/calendar.ics or webcal://...",
"fileLabel": "ICS File",
- "fileRequired": "Please select an ICS file",
- "fileTooLarge": "File is too large. Maximum size is 5MB.",
"fileSelected": "File selected",
- "urlRequired": "Please enter a calendar URL",
"oneTimeImport": "One-time import",
"displayMode": "Display synced shifts",
"displayModeNormal": "Normal (show all shifts)",
@@ -199,15 +191,8 @@
"displayModeHint": "Choose how synced shifts should be displayed in the calendar",
"viewSyncedShifts": "View Imported Shifts",
"syncedShiftsTitle": "Imported Shifts - {date}",
- "addSync": "Add",
"addNewSync": "Add New External Calendar",
"editSync": "Edit External Calendar",
- "nameLabel": "Name",
- "namePlaceholder": "e.g., Work Calendar, Personal Calendar",
- "urlLabel": "Calendar URL",
- "urlAlreadyExists": "This URL has already been added",
- "invalidUrlFormat": "Invalid calendar URL format. URL must start with webcal:// or https://",
- "colorLabel": "Shift Color",
"colorHint": "Choose the color for all imported shifts",
"hideCalendar": "Hide calendar",
"hideCalendarHint": "Hide shifts from this calendar",
@@ -215,12 +200,6 @@
"hideFromStatsHint": "Exclude shifts from this calendar from statistics",
"lastSynced": "Last synced",
"syncError": "Failed to sync calendar",
- "createError": "Failed to create external calendar",
- "createSuccess": "External calendar created successfully",
- "updateError": "Failed to update external calendar",
- "updateSuccess": "External calendar updated successfully",
- "deleteError": "Failed to delete external calendar",
- "deleteSuccess": "External calendar deleted successfully",
"deleteConfirm": "Delete this external calendar? All imported shifts will be removed.",
"syncSuccess": "Sync successful",
"statsCreated": "created",
@@ -255,12 +234,9 @@
"filterError": "Errors only",
"deleteAll": "Delete all",
"deleteConfirm": "Are you sure you want to delete all sync logs?",
- "deleteSuccess": "Sync logs deleted successfully",
- "deleteError": "Failed to delete sync logs",
"hasErrors": "Has errors",
"markAsRead": "Mark as read",
"markedAsRead": "Errors marked as read",
- "markAsReadError": "Failed to mark as read",
"read": "Read"
}
}