Updated Bottom Sheet message string (#3743)

* updated bottom sheet string

* updated pseudo language tests
This commit is contained in:
Mauro 2025-02-07 10:08:10 +01:00 committed by GitHub
parent d374fb63e0
commit b9e6a3328f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 18 additions and 16 deletions

View File

@ -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";
@ -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";

View File

@ -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";
@ -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";

View File

@ -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
@ -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") }

View File

@ -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 {