mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Localise content
This commit is contained in:
+35
@@ -98,3 +98,38 @@ class UserSessionOverviewViewModel: UserSessionOverviewViewModelType, UserSessio
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension UserSessionOverviewViewState {
|
||||
var bottomSheetTitle: String {
|
||||
cardViewData.verificationState.bottomSheetTitle
|
||||
}
|
||||
|
||||
var bottomSheetDescription: String {
|
||||
cardViewData.verificationState.bottomSheetDescription
|
||||
}
|
||||
}
|
||||
|
||||
#warning("AG: add missing localisations")
|
||||
private extension UserSessionInfo.VerificationState {
|
||||
var bottomSheetTitle: String {
|
||||
switch self {
|
||||
case .unknown:
|
||||
return "TODO_TITLE"
|
||||
case .unverified:
|
||||
return VectorL10n.userSessionUnverifiedSessionTitle
|
||||
case .verified:
|
||||
return VectorL10n.userSessionVerifiedSessionTitle
|
||||
}
|
||||
}
|
||||
|
||||
var bottomSheetDescription: String {
|
||||
switch self {
|
||||
case .unknown:
|
||||
return "TODO_DESCRIPTION"
|
||||
case .unverified:
|
||||
return VectorL10n.userSessionUnverifiedSessionDescription
|
||||
case .verified:
|
||||
return VectorL10n.userSessionVerifiedSessionDescription
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@ struct UserSessionOverview: View {
|
||||
}
|
||||
.accentColor(theme.colors.accent)
|
||||
.bottomSheet(isPresented: $viewModel.showBottomSheet) {
|
||||
InfoView(title: "Verified sessions",
|
||||
descripion: "Further context on verified sessions. What do those mean, and how do they differ from unverified ones.\n\nWe could provide a link to an external reference resource for even more context.",
|
||||
action: .init(text: "GOT IT", action: { $viewModel.showBottomSheet.wrappedValue = false }))
|
||||
InfoView(title: viewModel.viewState.bottomSheetTitle,
|
||||
descripion: viewModel.viewState.bottomSheetDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { $viewModel.showBottomSheet.wrappedValue = false }))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user