Skip to content

Commit

Permalink
updated bottom sheet string
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Feb 5, 2025
1 parent 3839025 commit 698e4a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"common_message_removed" = "Message removed";
"common_modern" = "Modern";
"common_mute" = "Mute";
"common_name_and_id" = "%1$@ (%2$@)";
"common_no_results" = "No results";
"common_no_room_name" = "No room name";
"common_offline" = "Offline";
Expand Down Expand Up @@ -371,8 +372,7 @@
"screen_advanced_settings_element_call_base_url_description" = "Set a custom base URL for Element Call.";
"screen_advanced_settings_element_call_base_url_validation_error" = "Invalid URL, please make sure you include the protocol (http/https) and the correct address.";
"screen_bottom_sheet_create_dm_confirmation_button_title" = "Send invite";
"screen_bottom_sheet_create_dm_message" = "Would you like to start a chat with %1$@ (%2$@)?";
"screen_bottom_sheet_create_dm_message_no_displayname" = "Would you like to start a chat with %1$@?";
"screen_bottom_sheet_create_dm_message" = "Would you like to start a chat with %1$@?";
"screen_bottom_sheet_create_dm_title" = "Send invite?";
"screen_create_room_room_access_section_anyone_option_description" = "Anyone can join this room";
"screen_create_room_room_access_section_anyone_option_title" = "Anyone";
Expand Down
4 changes: 2 additions & 2 deletions ElementX/Resources/Localizations/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"common_message_removed" = "Message removed";
"common_modern" = "Modern";
"common_mute" = "Mute";
"common_name_and_id" = "%1$@ (%2$@)";
"common_no_results" = "No results";
"common_no_room_name" = "No room name";
"common_offline" = "Offline";
Expand Down Expand Up @@ -371,8 +372,7 @@
"screen_advanced_settings_element_call_base_url_description" = "Set a custom base URL for Element Call.";
"screen_advanced_settings_element_call_base_url_validation_error" = "Invalid URL, please make sure you include the protocol (http/https) and the correct address.";
"screen_bottom_sheet_create_dm_confirmation_button_title" = "Send invite";
"screen_bottom_sheet_create_dm_message" = "Would you like to start a chat with %1$@ (%2$@)?";
"screen_bottom_sheet_create_dm_message_no_displayname" = "Would you like to start a chat with %1$@?";
"screen_bottom_sheet_create_dm_message" = "Would you like to start a chat with %1$@?";
"screen_bottom_sheet_create_dm_title" = "Send invite?";
"screen_create_room_room_access_section_anyone_option_description" = "Anyone can join this room";
"screen_create_room_room_access_section_anyone_option_title" = "Anyone";
Expand Down
12 changes: 6 additions & 6 deletions ElementX/Sources/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ 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") }
/// %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))
}
/// No results
internal static var commonNoResults: String { return L10n.tr("Localizable", "common_no_results") }
/// No room name
Expand Down Expand Up @@ -1016,13 +1020,9 @@ internal enum L10n {
internal static var screenBlockedUsersUnblocking: String { return L10n.tr("Localizable", "screen_blocked_users_unblocking") }
/// Send invite
internal static var screenBottomSheetCreateDmConfirmationButtonTitle: String { return L10n.tr("Localizable", "screen_bottom_sheet_create_dm_confirmation_button_title") }
/// Would you like to start a chat with %1$@ (%2$@)?
internal static func screenBottomSheetCreateDmMessage(_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "screen_bottom_sheet_create_dm_message", String(describing: p1), String(describing: p2))
}
/// Would you like to start a chat with %1$@?
internal static func screenBottomSheetCreateDmMessageNoDisplayname(_ p1: Any) -> String {
return L10n.tr("Localizable", "screen_bottom_sheet_create_dm_message_no_displayname", String(describing: p1))
internal static func screenBottomSheetCreateDmMessage(_ p1: Any) -> String {
return L10n.tr("Localizable", "screen_bottom_sheet_create_dm_message", String(describing: p1))
}
/// Send invite?
internal static var screenBottomSheetCreateDmTitle: String { return L10n.tr("Localizable", "screen_bottom_sheet_create_dm_title") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ struct SendInviteConfirmationView: View {
private let topPadding: CGFloat = 24

private var subtitle: String {
let string: String
if let displayName = userToInvite.displayName {
L10n.screenBottomSheetCreateDmMessage(displayName, userToInvite.userID)
string = L10n.commonNameAndId(displayName, userToInvite.userID)
} else {
L10n.screenBottomSheetCreateDmMessageNoDisplayname(userToInvite.userID)
string = userToInvite.userID
}
return L10n.screenBottomSheetCreateDmMessage(string)
}

var body: some View {
Expand Down

0 comments on commit 698e4a3

Please sign in to comment.