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

[iOS] Localize Sponsors #1181

Merged
merged 1 commit into from
Sep 11, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@
"session.target_audience" = "Target Audience";
"session.add_to_calendar" = "Add to your calendar";
"session.cancel" = "Cancel";

"sponsor.title" = "Sponsors";
"sponsor.platinum_sponsors" = "PLATINUM SPONSORS";
"sponsor.gold_sponsors" = "GOLD SPONSORS";
"sponsor.supporters" = "SUPPORTERS";
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@
"session.target_audience" = "対象者";
"session.add_to_calendar" = "カレンダーに追加する";
"session.cancel" = "キャンセル";

"sponsor.title" = "Sponsors";
"sponsor.platinum_sponsors" = "プラチナスポンサー";
"sponsor.gold_sponsors" = "ゴールドスポンサー";
"sponsor.supporters" = "サポーター";
18 changes: 16 additions & 2 deletions app-ios/Modules/Sources/Sponsor/SponsorView.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Assets
import shared
import SwiftUI
import Theme
Expand All @@ -22,7 +23,7 @@ public struct SponsorView: View {
$0.ordinal < $1.ordinal
}), id: \.self) { plan in
SponsorGridView(
title: plan.name,
title: plan.title,
sponsors: planGroupedSponsors[plan] ?? [],
columns: plan.column
) { _ in }
Expand All @@ -34,7 +35,7 @@ public struct SponsorView: View {
EmptyView()
}
}
.navigationTitle("Sponsors")
.navigationTitle(L10n.Sponsor.title)
.background(AssetColors.Surface.surface.swiftUIColor)
}
}
Expand All @@ -56,4 +57,17 @@ private extension Plan {
return 3
}
}

var title: String {
switch self {
case .platinum:
return L10n.Sponsor.platinumSponsors
case .gold:
return L10n.Sponsor.goldSponsors
case .supporter:
return L10n.Sponsor.supporters
default:
return ""
}
}
}
Loading