change: specific report copy for DMs

This commit is contained in:
Mauro Romito
2025-04-14 14:45:49 +02:00
committed by Mauro
parent 542dbd82b9
commit a6dadc1cf3
6 changed files with 7 additions and 3 deletions
@@ -99,6 +99,7 @@
"action_report" = "Report"; "action_report" = "Report";
"action_report_bug" = "Report bug"; "action_report_bug" = "Report bug";
"action_report_content" = "Report content"; "action_report_content" = "Report content";
"action_report_dm" = "Report conversation";
"action_report_room" = "Report room"; "action_report_room" = "Report room";
"action_reset" = "Reset"; "action_reset" = "Reset";
"action_reset_identity" = "Reset identity"; "action_reset_identity" = "Reset identity";
@@ -99,6 +99,7 @@
"action_report" = "Report"; "action_report" = "Report";
"action_report_bug" = "Report bug"; "action_report_bug" = "Report bug";
"action_report_content" = "Report content"; "action_report_content" = "Report content";
"action_report_dm" = "Report conversation";
"action_report_room" = "Report room"; "action_report_room" = "Report room";
"action_reset" = "Reset"; "action_reset" = "Reset";
"action_reset_identity" = "Reset identity"; "action_reset_identity" = "Reset identity";
+2
View File
@@ -236,6 +236,8 @@ internal enum L10n {
internal static var actionReportBug: String { return L10n.tr("Localizable", "action_report_bug") } internal static var actionReportBug: String { return L10n.tr("Localizable", "action_report_bug") }
/// Report content /// Report content
internal static var actionReportContent: String { return L10n.tr("Localizable", "action_report_content") } internal static var actionReportContent: String { return L10n.tr("Localizable", "action_report_content") }
/// Report conversation
internal static var actionReportDm: String { return L10n.tr("Localizable", "action_report_dm") }
/// Report room /// Report room
internal static var actionReportRoom: String { return L10n.tr("Localizable", "action_report_room") } internal static var actionReportRoom: String { return L10n.tr("Localizable", "action_report_room") }
/// Reset /// Reset
@@ -73,7 +73,7 @@ struct HomeScreenRoomList: View {
Button(role: .destructive) { Button(role: .destructive) {
context.send(viewAction: .reportRoom(roomIdentifier: room.id)) context.send(viewAction: .reportRoom(roomIdentifier: room.id))
} label: { } label: {
Label(L10n.actionReportRoom, icon: \.chatProblem) Label(room.isDirect ? L10n.actionReportDm : L10n.actionReportRoom, icon: \.chatProblem)
} }
} }
@@ -277,7 +277,7 @@ struct RoomDetailsScreen: View {
} }
private var reportRoomTitle: String { private var reportRoomTitle: String {
context.viewState.dmRecipientInfo == nil ? L10n.actionReportRoom : L10n.actionReport context.viewState.dmRecipientInfo == nil ? L10n.actionReportRoom : L10n.actionReportDm
} }
private var leaveRoomSection: some View { private var leaveRoomSection: some View {