diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 53a7d2ef1..ffb2289d5 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -239,6 +239,7 @@ "common_message_removed" = "Message removed"; "common_modern" = "Modern"; "common_mute" = "Mute"; +"common_name" = "Name"; "common_name_and_id" = "%1$@ (%2$@)"; "common_no_results" = "No results"; "common_no_room_name" = "No room name"; @@ -300,6 +301,7 @@ "common_something_went_wrong" = "Something went wrong"; "common_something_went_wrong_message" = "We encountered an issue. Please try again."; "common_space" = "Space"; +"common_space_topic_placeholder" = "What is this space about?"; "common_starting_chat" = "Starting chat…"; "common_sticker" = "Sticker"; "common_success" = "Success"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index b5f58db0d..de5a9aa53 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -239,6 +239,7 @@ "common_message_removed" = "Message removed"; "common_modern" = "Modern"; "common_mute" = "Mute"; +"common_name" = "Name"; "common_name_and_id" = "%1$@ (%2$@)"; "common_no_results" = "No results"; "common_no_room_name" = "No room name"; @@ -300,6 +301,7 @@ "common_something_went_wrong" = "Something went wrong"; "common_something_went_wrong_message" = "We encountered an issue. Please try again."; "common_space" = "Space"; +"common_space_topic_placeholder" = "What is this space about?"; "common_starting_chat" = "Starting chat…"; "common_sticker" = "Sticker"; "common_success" = "Success"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index c8c9466b0..c5f0cc2c6 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -534,6 +534,8 @@ internal enum L10n { internal static var commonModern: String { return L10n.tr("Localizable", "common_modern") } /// Mute internal static var commonMute: String { return L10n.tr("Localizable", "common_mute") } + /// Name + internal static var commonName: String { return L10n.tr("Localizable", "common_name") } /// %1$@ (%2$@) internal static func commonNameAndId(_ p1: Any, _ p2: Any) -> String { return L10n.tr("Localizable", "common_name_and_id", String(describing: p1), String(describing: p2)) @@ -676,6 +678,8 @@ internal enum L10n { internal static var commonSomethingWentWrongMessage: String { return L10n.tr("Localizable", "common_something_went_wrong_message") } /// Space internal static var commonSpace: String { return L10n.tr("Localizable", "common_space") } + /// What is this space about? + internal static var commonSpaceTopicPlaceholder: String { return L10n.tr("Localizable", "common_space_topic_placeholder") } /// Plural format key: "%#@COUNT@" internal static func commonSpaces(_ p1: Int) -> String { return L10n.tr("Localizable", "common_spaces", p1) diff --git a/ElementX/Sources/Screens/RoomDetailsEditScreen/RoomDetailsEditScreenModels.swift b/ElementX/Sources/Screens/RoomDetailsEditScreen/RoomDetailsEditScreenModels.swift index a56623d63..fd24d6bf2 100644 --- a/ElementX/Sources/Screens/RoomDetailsEditScreen/RoomDetailsEditScreenModels.swift +++ b/ElementX/Sources/Screens/RoomDetailsEditScreen/RoomDetailsEditScreenModels.swift @@ -35,7 +35,7 @@ struct RoomDetailsEditScreenViewState: BindableState { /// The string shown for the room's name when it can't be edited. var nameRowTitle: String { - bindings.name.isEmpty ? L10n.commonRoomName : bindings.name + bindings.name.isEmpty ? L10n.commonName : bindings.name } /// The string shown for the room's topic when it can't be edited. diff --git a/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift b/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift index 59581acb0..c8fab4056 100644 --- a/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift +++ b/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift @@ -92,7 +92,7 @@ struct RoomDetailsEditScreen: View { }) } } header: { - Text(L10n.commonRoomName) + Text(L10n.commonName) .compoundListSectionHeader() } } @@ -100,7 +100,7 @@ struct RoomDetailsEditScreen: View { private var topicSection: some View { Section { if context.viewState.canEditTopic { - ListRow(label: .plain(title: L10n.commonTopicPlaceholder), + ListRow(label: .plain(title: context.viewState.isSpace ? L10n.commonSpaceTopicPlaceholder : L10n.commonTopicPlaceholder), kind: .textField(text: $context.topic, axis: .vertical)) .focused($focus, equals: .topic) .lineLimit(3...) diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-en-GB.png index be2d9d208..43dac1325 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14da2428ecad3ecd0550a4f75558740c16d7730362aa770fe926085399311890 -size 106620 +oid sha256:4201a7a80ed279f368082f0d03059dec93663257fcd5d2c8791f2d0651067737 +size 105823 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-pseudo.png index 446cf2c8f..9b9c8597d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62cb9f02840cfe73025858c06e369b413e6fbdc3da9b4b21a41128dfae7e959c -size 115666 +oid sha256:1946729866f8949172d28c2b3c801b9e4106dc299468ef74cdff1dd280c9b700 +size 114409 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-en-GB.png index e50b8e77f..3b3ad65b3 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b76df0282064548e9321f6c93358fd20abbdd4cbd40506e338e698c89e7fd9d8 -size 59545 +oid sha256:3a421b394016878058172e45945d25c3b3fd08c0b45c51684b87eb00a672c83d +size 58909 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-pseudo.png index 58d2fb902..6f00918ce 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Editable-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3dadc2ec5f8a5dfac47304e965a50802c16cb494e4df77e124280da7e8e1026 -size 66211 +oid sha256:a562b6d2d16a71cc6197b4fab193a3b2a9d33de07c1c6f21f78a8cfe6feb4fbd +size 65035 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-en-GB.png index 76c7f1b4d..c83dd8f61 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c177fc4eb7151c0d372d8e28bdb68794c09cf2a982a33bedb949685705df0e1 -size 96576 +oid sha256:2c1ed4865c5c2c8a141316d8928dd12de84419ddea189d10d5f2b7356bd84174 +size 95828 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-pseudo.png index 1262faac1..4f4b7775c 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d80cd465aa07f39fbaa1ae4bbce599eb451025345fb7d9782196ac41c3131c7 -size 101794 +oid sha256:b8815fe7ecd55df0ba9904a83bd776f041e30889b05fb3de7d57804c798d167f +size 100567 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-en-GB.png index 53490d478..b39de4dd5 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f40a4e8581f61f5d6be6d49170b5caf0d5f3dd6a29d0698d38d43ca152fe3aa5 -size 45486 +oid sha256:4bb42ab4623f0d1e83893ca47791bb627d87cab5c6b67ea5304ac71b39b411bf +size 44844 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-pseudo.png index d26741877..eeac9f0da 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomDetailsEditScreen.Read-only-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6af6318325a8e4e7d204b644db5687dca5a24f8d10697a49998e0ca79c1dfa6 -size 46633 +oid sha256:728016ded5fd2e5a54d308b97cec64c87e20b4635cabe85d2301ba31302d2aad +size 45531