From 858d9dc6f0acf6ba3178e15d4dafc1956701323b Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 14 Jul 2024 21:56:15 -0700 Subject: [PATCH] restore localization for custom tabs Signed-off-by: William Casarin --- damus/ContentView.swift | 6 +++--- damus/Views/DirectMessagesView.swift | 4 ++-- damus/Views/FollowingView.swift | 4 ++-- damus/Views/Notifications/NotificationsView.swift | 6 +++--- damus/Views/Profile/ProfileView.swift | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index 4371c217..7bf8dac0 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -127,9 +127,9 @@ struct ContentView: View { } .safeAreaInset(edge: .top, spacing: 0) { VStack(spacing: 0) { - CustomPicker(tabs: - [("Notes", FilterState.posts), - ("Notes & Replies", FilterState.posts_and_replies) + CustomPicker(tabs: [ + (NSLocalizedString("Notes", comment: "Label for filter for seeing only notes (instead of notes and replies)."), FilterState.posts), + (NSLocalizedString("Notes & Replies", comment: "Label for filter for seeing notes and replies (instead of only notes)."), FilterState.posts_and_replies) ], selection: $filter_state) diff --git a/damus/Views/DirectMessagesView.swift b/damus/Views/DirectMessagesView.swift index 26983a33..0adf2cf9 100644 --- a/damus/Views/DirectMessagesView.swift +++ b/damus/Views/DirectMessagesView.swift @@ -73,8 +73,8 @@ struct DirectMessagesView: View { var body: some View { VStack(spacing: 0) { CustomPicker(tabs: [ - ("DMs", DMType.friend), - ("Requests", DMType.rando), + (NSLocalizedString("DMs", comment: "Picker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message."), DMType.friend), + (NSLocalizedString("Requests", comment: "Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet"), DMType.rando), ], selection: $dm_type) Divider() diff --git a/damus/Views/FollowingView.swift b/damus/Views/FollowingView.swift index 7235f129..d6aef101 100644 --- a/damus/Views/FollowingView.swift +++ b/damus/Views/FollowingView.swift @@ -161,8 +161,8 @@ struct FollowingView: View { .safeAreaInset(edge: .top, spacing: 0) { VStack(spacing: 0) { CustomPicker(tabs: [ - ("People", FollowingViewTabSelection.people), - ("Hashtags",FollowingViewTabSelection.hashtags) + (NSLocalizedString("People", comment: "Label for filter for seeing only people follows."), FollowingViewTabSelection.people), + (NSLocalizedString("Hashtags", comment: "Label for filter for seeing only hashtag follows."), FollowingViewTabSelection.hashtags) ], selection: $tab_selection) Divider() .frame(height: 1) diff --git a/damus/Views/Notifications/NotificationsView.swift b/damus/Views/Notifications/NotificationsView.swift index 482a006f..2f824d18 100644 --- a/damus/Views/Notifications/NotificationsView.swift +++ b/damus/Views/Notifications/NotificationsView.swift @@ -118,9 +118,9 @@ struct NotificationsView: View { .safeAreaInset(edge: .top, spacing: 0) { VStack(spacing: 0) { CustomPicker(tabs: [ - ("All", NotificationFilterState.all), - ("Zaps", NotificationFilterState.zaps), - ("Mentions", NotificationFilterState.replies), + (NSLocalizedString("All", comment: "Label for filter for all notifications."), NotificationFilterState.all), + (NSLocalizedString("Zaps", comment: "Label for filter for zap notifications."), NotificationFilterState.zaps), + (NSLocalizedString("Mentions", comment: "Label for filter for seeing mention notifications (replies, etc)."), NotificationFilterState.replies), ], selection: $filter_state) Divider() .frame(height: 1) diff --git a/damus/Views/Profile/ProfileView.swift b/damus/Views/Profile/ProfileView.swift index e861289d..235720e0 100644 --- a/damus/Views/Profile/ProfileView.swift +++ b/damus/Views/Profile/ProfileView.swift @@ -435,8 +435,8 @@ struct ProfileView: View { VStack(spacing: 0) { CustomPicker(tabs: [ - ("Notes", FilterState.posts), - ("Notes & Replies", FilterState.posts_and_replies) + (NSLocalizedString("Notes", comment: "Label for filter for seeing only notes (instead of notes and replies)."), FilterState.posts), + (NSLocalizedString("Notes & Replies", comment: "Label for filter for seeing notes and replies (instead of only notes)."), FilterState.posts_and_replies) ], selection: $filter_state) Divider() .frame(height: 1)