ReadKeep/readeck/UI/Menu/SidebarTab.swift
Ilyas Hallak d6ea56cfa9 feat: Add comprehensive i18n support and Legal & Privacy section
- Create String+Localization extension with .localized property
- Add LabelUtils for consistent label splitting and deduplication logic
- Implement Legal & Privacy settings section with Privacy Policy and Legal Notice views
- Add German/English localization for all navigation states and settings sections
- Fix navigationDestination placement warning in PadSidebarView
- Unify label input handling across main app and share extension
- Support for space-separated label input in share extension

Navigation & Settings now fully localized:
- All/Unread/Favorites/Archive → Alle/Ungelesen/Favoriten/Archiv
- Font/Appearance/Cache/General/Server Settings → German equivalents
- Legal section with GitHub issue reporting and email support contact
2025-09-20 22:14:17 +02:00

45 lines
1.5 KiB
Swift

//
// SidebarTab.swift
// readeck
//
// Created by Ilyas Hallak on 01.07.25.
//
import Foundation
enum SidebarTab: Hashable, CaseIterable, Identifiable {
case search, all, unread, favorite, archived, article, videos, pictures, tags, settings
var id: Self { self }
var label: String {
switch self {
case .all: return NSLocalizedString("All", comment: "")
case .unread: return NSLocalizedString("Unread", comment: "")
case .favorite: return NSLocalizedString("Favorites", comment: "")
case .archived: return NSLocalizedString("Archive", comment: "")
case .search: return NSLocalizedString("Search", comment: "")
case .settings: return NSLocalizedString("Settings", comment: "")
case .article: return NSLocalizedString("Articles", comment: "")
case .videos: return NSLocalizedString("Videos", comment: "")
case .pictures: return NSLocalizedString("Pictures", comment: "")
case .tags: return NSLocalizedString("Tags", comment: "")
}
}
var systemImage: String {
switch self {
case .unread: return "house"
case .favorite: return "heart"
case .archived: return "archivebox"
case .search: return "magnifyingglass"
case .settings: return "gear"
case .all: return "list.bullet"
case .article: return "doc.plaintext"
case .videos: return "film"
case .pictures: return "photo"
case .tags: return "tag"
}
}
}