Fix localization issues and export strings for translation

Signed-off-by: Terry Yiu <git@tyiu.xyz>
This commit is contained in:
2026-03-09 21:08:29 -04:00
parent 963da2d4eb
commit 31e281ce73
33 changed files with 1271 additions and 137 deletions
@@ -111,7 +111,7 @@ struct LiveChatHomeView: View, KeyboardReadable {
var body: some View {
VStack(alignment: .leading, spacing: 0) {
HStack {
Text("Live Chat")
Text("Live Chat", comment: "Title for the live stream chat.")
.fontWeight(.bold)
.padding(5)
@@ -54,7 +54,7 @@ struct LiveStreamBanner: View {
titleImage(url: url, preview: preview)
}
} else {
Text(NSLocalizedString("No cover image", comment: "Text letting user know there is no cover image."))
Text("No cover image", comment: "Text letting user know there is no cover image.")
.bold()
.foregroundColor(.white)
.frame(width: UIScreen.main.bounds.width, height: 200)
@@ -19,12 +19,12 @@ struct LiveStreamStatus: View {
.foregroundColor(Color.white)
if let starts = starts {
Text("\(starts)")
Text(starts)
.foregroundColor(Color.white)
.bold()
.glow()
} else {
Text("\(status.rawValue)")
Text(status.rawValue)
.foregroundColor(Color.white)
.bold()
}
@@ -33,11 +33,11 @@ struct LiveStreamStatus: View {
.foregroundColor(Color.red)
.glow()
Text("\(status.rawValue)")
Text(status.rawValue)
.foregroundColor(DamusColors.adaptableWhite)
.bold()
case .ended:
Text("\(status.rawValue)")
Text(status.rawValue)
.foregroundColor(DamusColors.adaptableWhite)
.bold()
}
@@ -25,7 +25,7 @@ struct LiveStreamViewers: View {
Image("user")
.resizable()
.frame(width: 15, height: 15)
Text("\(Text(verbatim: viewerCount.formatted()).font(.subheadline.weight(.medium)))", comment: "number")
Text(verbatim: viewerCount.formatted()).font(.subheadline.weight(.medium))
}
}
.padding(.vertical, preview ? 2 : 0)
@@ -43,10 +43,10 @@ struct LiveStreamTimelineView<Content: View>: View {
HStack {
VStack(alignment: .leading) {
Text("Happening Now")
Text("Happening Now", comment: "Indicates that live events are happening now.")
.font(.title2)
.fontWeight(.bold)
Text("Live events going on right now")
Text("Live events going on right now", comment: "Indicates that live events are happening now.")
.font(.caption)
.foregroundColor(.gray)
}