Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore localization on custom tabs #2337

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions damus/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions damus/Views/DirectMessagesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions damus/Views/FollowingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions damus/Views/Notifications/NotificationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions damus/Views/Profile/ProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down