Skip to content

Commit

Permalink
Merge pull request #1181 from woxtu/localize-sponsors
Browse files Browse the repository at this point in the history
[iOS] Localize Sponsors
  • Loading branch information
ry-itto authored Sep 11, 2023
2 parents ab6feae + a11ba43 commit 6f805f3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
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 ""
}
}
}

0 comments on commit 6f805f3

Please sign in to comment.