mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Use strings from Localazy (#718)
* Adopt strings from Localazy. * Remove all old Android strings. * Disable german snapshot tests for now. * Rebase and add latest strings.
This commit is contained in:
@@ -363,7 +363,7 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
private func showLoadingIndicator() {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.loading,
|
||||
title: L10n.commonLoading,
|
||||
persistent: true))
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
ServiceLocator.shared.userIndicatorController.retractIndicatorWithId(reachabilityNotificationIdentifier)
|
||||
} else {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: reachabilityNotificationIdentifier,
|
||||
title: ElementL10n.a11yPresenceOffline,
|
||||
title: L10n.commonOffline,
|
||||
persistent: true))
|
||||
}
|
||||
}.store(in: &cancellables)
|
||||
@@ -493,8 +493,8 @@ extension AppCoordinator: NotificationManagerDelegate {
|
||||
break
|
||||
default:
|
||||
// error or no room proxy
|
||||
await service.showLocalNotification(with: "⚠️ " + ElementL10n.dialogTitleError,
|
||||
subtitle: ElementL10n.a11yErrorSomeMessageNotSent)
|
||||
await service.showLocalNotification(with: "⚠️ " + L10n.commonError,
|
||||
subtitle: L10n.errorSomeMessagesHaveNotBeenSent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,209 +9,82 @@ import Foundation
|
||||
|
||||
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
||||
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||
extension ElementL10n {
|
||||
/// User menu
|
||||
public static let a11yAllChatsUserAvatarMenu = ElementL10n.tr("Untranslated", "a11y_all_chats_user_avatar_menu")
|
||||
/// Confirm
|
||||
public static let actionConfirm = ElementL10n.tr("Untranslated", "action_confirm")
|
||||
/// Copy Link
|
||||
public static let actionCopyLink = ElementL10n.tr("Untranslated", "action_copy_link")
|
||||
/// Match
|
||||
public static let actionMatch = ElementL10n.tr("Untranslated", "action_match")
|
||||
/// Share Link
|
||||
public static let actionShareLink = ElementL10n.tr("Untranslated", "action_share_link")
|
||||
/// Attach Screenshot
|
||||
public static let bugReportScreenAttachScreenshot = ElementL10n.tr("Untranslated", "bug_report_screen_attach_screenshot")
|
||||
/// Please describe the bug. What did you do? What did you expect to happen? What actually happened. Please go into as much detail as you can.
|
||||
public static let bugReportScreenDescription = ElementL10n.tr("Untranslated", "bug_report_screen_description")
|
||||
/// Edit Screenshot
|
||||
public static let bugReportScreenEditScreenshot = ElementL10n.tr("Untranslated", "bug_report_screen_edit_screenshot")
|
||||
/// Describe the bug…
|
||||
public static let bugReportScreenEditorPlaceholder = ElementL10n.tr("Untranslated", "bug_report_screen_editor_placeholder")
|
||||
/// Send logs to help
|
||||
public static let bugReportScreenIncludeLogs = ElementL10n.tr("Untranslated", "bug_report_screen_include_logs")
|
||||
/// To check things work as intended, logs will be sent with your message. These will be private. To just send your message, turn off this setting.
|
||||
public static let bugReportScreenLogsDescription = ElementL10n.tr("Untranslated", "bug_report_screen_logs_description")
|
||||
/// Report a bug
|
||||
public static let bugReportScreenTitle = ElementL10n.tr("Untranslated", "bug_report_screen_title")
|
||||
/// %@ iOS
|
||||
public static func defaultSessionDisplayName(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "default_session_display_name", String(describing: p1))
|
||||
public enum UntranslatedL10n {
|
||||
/// Help us identify issues and improve %@ by sharing anonymous usage data. To understand how people use multiple devices, we’ll generate a random identifier, shared by your devices.
|
||||
///
|
||||
/// You can read all our terms %@.
|
||||
public static func analyticsOptInContent(_ p1: Any, _ p2: Any) -> String {
|
||||
return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_content", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// Welcome to the %@ Beta. Supercharged, for speed and simplicity.
|
||||
public static func ftueAuthCarouselWelcomeBody(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "ftue_auth_carousel_welcome_body", String(describing: p1))
|
||||
/// here
|
||||
public static var analyticsOptInContentLink: String { return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_content_link") }
|
||||
/// We <b>don't</b> record or profile any account data
|
||||
public static var analyticsOptInListItem1: String { return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_list_item_1") }
|
||||
/// We <b>don't</b> share information with third parties
|
||||
public static var analyticsOptInListItem2: String { return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_list_item_2") }
|
||||
/// You can turn this off anytime in settings
|
||||
public static var analyticsOptInListItem3: String { return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_list_item_3") }
|
||||
/// Help improve %@
|
||||
public static func analyticsOptInTitle(_ p1: Any) -> String {
|
||||
return UntranslatedL10n.tr("Untranslated", "analytics_opt_in_title", String(describing: p1))
|
||||
}
|
||||
/// Be in your Element
|
||||
public static let ftueAuthCarouselWelcomeTitle = ElementL10n.tr("Untranslated", "ftue_auth_carousel_welcome_title")
|
||||
/// Enter your details
|
||||
public static let ftueAuthSignInEnterDetails = ElementL10n.tr("Untranslated", "ftue_auth_sign_in_enter_details")
|
||||
/// No
|
||||
public static let iosNo = ElementL10n.tr("Untranslated", "ios_no")
|
||||
/// Yes
|
||||
public static let iosYes = ElementL10n.tr("Untranslated", "ios_yes")
|
||||
/// Mobile
|
||||
public static let loginMobileDevice = ElementL10n.tr("Untranslated", "login_mobile_device")
|
||||
/// Tablet
|
||||
public static let loginTabletDevice = ElementL10n.tr("Untranslated", "login_tablet_device")
|
||||
/// Message
|
||||
public static let message = ElementL10n.tr("Untranslated", "message")
|
||||
/// %1$@ accepted the invite
|
||||
public static func noticeRoomInviteAccepted(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomInviteAccepted", String(describing: p1))
|
||||
/// Clear all data currently stored on this device?
|
||||
/// Sign in again to access your account data and messages.
|
||||
public static var softLogoutClearDataDialogContent: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_dialog_content") }
|
||||
/// Clear data
|
||||
public static var softLogoutClearDataDialogTitle: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_dialog_title") }
|
||||
/// Warning: Your personal data (including encryption keys) is still stored on this device.
|
||||
///
|
||||
/// Clear it if you’re finished using this device, or want to sign in to another account.
|
||||
public static var softLogoutClearDataNotice: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_notice") }
|
||||
/// Clear all data
|
||||
public static var softLogoutClearDataSubmit: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_submit") }
|
||||
/// Clear personal data
|
||||
public static var softLogoutClearDataTitle: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_title") }
|
||||
/// Forgot password
|
||||
public static var softLogoutForgotPassword: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_forgot_password") }
|
||||
/// Sign in to recover encryption keys stored exclusively on this device. You need them to read all of your secure messages on any device.
|
||||
public static var softLogoutSigninE2eWarningNotice: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_signin_e2e_warning_notice") }
|
||||
/// Your homeserver (%1$s) admin has signed you out of your account %2$s (%3$s).
|
||||
public static func softLogoutSigninNotice(_ p1: UnsafePointer<CChar>, _ p2: UnsafePointer<CChar>, _ p3: UnsafePointer<CChar>) -> String {
|
||||
return UntranslatedL10n.tr("Untranslated", "soft_logout_signin_notice", p1, p2, p3)
|
||||
}
|
||||
/// You accepted the invite
|
||||
public static let noticeRoomInviteAcceptedByYou = ElementL10n.tr("Untranslated", "noticeRoomInviteAcceptedByYou")
|
||||
/// %1$@ requested to join
|
||||
public static func noticeRoomKnock(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnock", String(describing: p1))
|
||||
}
|
||||
/// %1$@ allowed %2$@ to join
|
||||
public static func noticeRoomKnockAccepted(_ p1: Any, _ p2: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockAccepted", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// %1$@ allowed you to join
|
||||
public static func noticeRoomKnockAcceptedByYou(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockAcceptedByYou", String(describing: p1))
|
||||
}
|
||||
/// You requested to join
|
||||
public static let noticeRoomKnockByYou = ElementL10n.tr("Untranslated", "noticeRoomKnockByYou")
|
||||
/// %1$@ rejected %2$@'s request to join
|
||||
public static func noticeRoomKnockDenied(_ p1: Any, _ p2: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockDenied", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You rejected %1$@'s request to join
|
||||
public static func noticeRoomKnockDeniedByYou(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockDeniedByYou", String(describing: p1))
|
||||
}
|
||||
/// %1$@ rejected your request to join
|
||||
public static func noticeRoomKnockDeniedYou(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockDeniedYou", String(describing: p1))
|
||||
}
|
||||
/// %1$@ is no longer interested in joining
|
||||
public static func noticeRoomKnockRetracted(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomKnockRetracted", String(describing: p1))
|
||||
}
|
||||
/// You cancelled your request to join
|
||||
public static let noticeRoomKnockRetractedByYou = ElementL10n.tr("Untranslated", "noticeRoomKnockRetractedByYou")
|
||||
/// %1$@ made an unknown change to their membership
|
||||
public static func noticeRoomUnknownMembershipChange(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "noticeRoomUnknownMembershipChange", String(describing: p1))
|
||||
}
|
||||
/// Notification
|
||||
public static let notification = ElementL10n.tr("Untranslated", "Notification")
|
||||
/// Reporting this message will send it’s unique ‘event ID’ to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.
|
||||
public static let reportContentInfo = ElementL10n.tr("Untranslated", "report_content_info")
|
||||
/// Report Submitted
|
||||
public static let reportContentSubmitted = ElementL10n.tr("Untranslated", "report_content_submitted")
|
||||
/// An error occurred when trying to start a chat
|
||||
public static let retrievingDirectRoomError = ElementL10n.tr("Untranslated", "retrieving_direct_room_error")
|
||||
/// About
|
||||
public static let roomDetailsAboutSectionTitle = ElementL10n.tr("Untranslated", "room_details_about_section_title")
|
||||
/// Are you sure that you want to leave this room? You are the only person here. If you leave, no one will be able to join in the future, including you.
|
||||
public static let roomDetailsLeaveEmptyRoomAlertSubtitle = ElementL10n.tr("Untranslated", "room_details_leave_empty_room_alert_subtitle")
|
||||
/// Are you sure that you want to leave this room? This room is not public and you will not be able to rejoin without an invite.
|
||||
public static let roomDetailsLeavePrivateRoomAlertSubtitle = ElementL10n.tr("Untranslated", "room_details_leave_private_room_alert_subtitle")
|
||||
/// Are you sure that you want to leave the room?
|
||||
public static let roomDetailsLeaveRoomAlertSubtitle = ElementL10n.tr("Untranslated", "room_details_leave_room_alert_subtitle")
|
||||
/// Room left
|
||||
public static let roomDetailsRoomLeftToast = ElementL10n.tr("Untranslated", "room_details_room_left_toast")
|
||||
/// Info
|
||||
public static let roomDetailsTitle = ElementL10n.tr("Untranslated", "room_details_title")
|
||||
/// Block
|
||||
public static let roomMemberDetailsBlockAlertAction = ElementL10n.tr("Untranslated", "room_member_details_block_alert_action")
|
||||
/// Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.
|
||||
public static let roomMemberDetailsBlockAlertDescription = ElementL10n.tr("Untranslated", "room_member_details_block_alert_description")
|
||||
/// Block user
|
||||
public static let roomMemberDetailsBlockUser = ElementL10n.tr("Untranslated", "room_member_details_block_user")
|
||||
/// Unblock
|
||||
public static let roomMemberDetailsUnblockAlertAction = ElementL10n.tr("Untranslated", "room_member_details_unblock_alert_action")
|
||||
/// On unblocking the user, you will be able to see all messages by them again.
|
||||
public static let roomMemberDetailsUnblockAlertDescription = ElementL10n.tr("Untranslated", "room_member_details_unblock_alert_description")
|
||||
/// Unblock user
|
||||
public static let roomMemberDetailsUnblockUser = ElementL10n.tr("Untranslated", "room_member_details_unblock_user")
|
||||
/// Failed loading messages
|
||||
public static let roomTimelineBackpaginationFailure = ElementL10n.tr("Untranslated", "room_timeline_backpagination_failure")
|
||||
/// Retry decryption
|
||||
public static let roomTimelineContextMenuRetryDecryption = ElementL10n.tr("Untranslated", "room_timeline_context_menu_retry_decryption")
|
||||
/// Editing
|
||||
public static let roomTimelineEditing = ElementL10n.tr("Untranslated", "room_timeline_editing")
|
||||
/// GIF
|
||||
public static let roomTimelineImageGif = ElementL10n.tr("Untranslated", "room_timeline_image_gif")
|
||||
/// Unsupported event
|
||||
public static let roomTimelineItemUnsupported = ElementL10n.tr("Untranslated", "room_timeline_item_unsupported")
|
||||
/// Failed creating the permalink
|
||||
public static let roomTimelinePermalinkCreationFailure = ElementL10n.tr("Untranslated", "room_timeline_permalink_creation_failure")
|
||||
/// New
|
||||
public static let roomTimelineReadMarkerTitle = ElementL10n.tr("Untranslated", "room_timeline_read_marker_title")
|
||||
/// Replying to %@
|
||||
public static func roomTimelineReplyingTo(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "room_timeline_replying_to", String(describing: p1))
|
||||
}
|
||||
/// %d room changes
|
||||
public static func roomTimelineStateChanges(_ p1: Int) -> String {
|
||||
return ElementL10n.tr("Untranslated", "room_timeline_state_changes", p1)
|
||||
}
|
||||
/// Bubbles
|
||||
public static let roomTimelineStyleBubbledLongDescription = ElementL10n.tr("Untranslated", "room_timeline_style_bubbled_long_description")
|
||||
/// Modern
|
||||
public static let roomTimelineStylePlainLongDescription = ElementL10n.tr("Untranslated", "room_timeline_style_plain_long_description")
|
||||
/// Syncing
|
||||
public static let roomTimelineSyncing = ElementL10n.tr("Untranslated", "room_timeline_syncing")
|
||||
/// Unable to decrypt
|
||||
public static let roomTimelineUnableToDecrypt = ElementL10n.tr("Untranslated", "room_timeline_unable_to_decrypt")
|
||||
/// Would you like to submit a bug report?
|
||||
public static let screenshotDetectedMessage = ElementL10n.tr("Untranslated", "screenshot_detected_message")
|
||||
/// You took a screenshot
|
||||
public static let screenshotDetectedTitle = ElementL10n.tr("Untranslated", "screenshot_detected_title")
|
||||
/// Sending...
|
||||
public static let sending = ElementL10n.tr("Untranslated", "sending")
|
||||
/// You can only connect to an existing server that supports sliding sync. Your homeserver admin will need to configure it. %@
|
||||
public static func serverSelectionServerFooter(_ p1: Any) -> String {
|
||||
return ElementL10n.tr("Untranslated", "server_selection_server_footer", String(describing: p1))
|
||||
}
|
||||
/// This server currently doesn’t support sliding sync.
|
||||
public static let serverSelectionSlidingSyncAlertMessage = ElementL10n.tr("Untranslated", "server_selection_sliding_sync_alert_message")
|
||||
/// Server not supported
|
||||
public static let serverSelectionSlidingSyncAlertTitle = ElementL10n.tr("Untranslated", "server_selection_sliding_sync_alert_title")
|
||||
/// Looks like you’re using a new device. Verify it’s you to access your encrypted messages.
|
||||
public static let sessionVerificationBannerMessage = ElementL10n.tr("Untranslated", "session_verification_banner_message")
|
||||
/// Access your message history
|
||||
public static let sessionVerificationBannerTitle = ElementL10n.tr("Untranslated", "session_verification_banner_title")
|
||||
/// Start
|
||||
public static let sessionVerificationStart = ElementL10n.tr("Untranslated", "session_verification_start")
|
||||
/// Appearance
|
||||
public static let settingsAppearance = ElementL10n.tr("Untranslated", "settings_appearance")
|
||||
/// Developer options
|
||||
public static let settingsDeveloperOptions = ElementL10n.tr("Untranslated", "settings_developer_options")
|
||||
/// Complete verification
|
||||
public static let settingsSessionVerification = ElementL10n.tr("Untranslated", "settings_session_verification")
|
||||
/// Message layout
|
||||
public static let settingsTimelineStyle = ElementL10n.tr("Untranslated", "settings_timeline_style")
|
||||
/// Sign in
|
||||
public static var softLogoutSigninTitle: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_signin_title") }
|
||||
/// Untranslated
|
||||
public static let untranslated = ElementL10n.tr("Untranslated", "untranslated")
|
||||
public static var untranslated: String { return UntranslatedL10n.tr("Untranslated", "untranslated") }
|
||||
/// Plural format key: "%#@VARIABLE@"
|
||||
public static func untranslatedPlural(_ p1: Int) -> String {
|
||||
return ElementL10n.tr("Untranslated", "untranslated_plural", p1)
|
||||
return UntranslatedL10n.tr("Untranslated", "untranslated_plural", p1)
|
||||
}
|
||||
/// Confirm that the emojis below match those shown on your other session.
|
||||
public static let verificationCompareEmojisDetail = ElementL10n.tr("Untranslated", "verification_compare_emojis_detail")
|
||||
/// Compare emojis
|
||||
public static let verificationCompareEmojisTitle = ElementL10n.tr("Untranslated", "verification_compare_emojis_title")
|
||||
/// Verification complete
|
||||
public static let verificationConclusionOkSelfNoticeTitle = ElementL10n.tr("Untranslated", "verification_conclusion_ok_self_notice_title")
|
||||
/// Prove it’s you in order to access your encrypted message history.
|
||||
public static let verificationOpenOtherToVerifyDetail = ElementL10n.tr("Untranslated", "verification_open_other_to_verify_detail")
|
||||
/// Open an existing session
|
||||
public static let verificationOpenOtherToVerifyTitle = ElementL10n.tr("Untranslated", "verification_open_other_to_verify_title")
|
||||
/// Something doesn’t seem right. Either the request timed out or the request was denied.
|
||||
public static let verificationRequestCancelledDetail = ElementL10n.tr("Untranslated", "verification_request_cancelled_detail")
|
||||
/// Verification cancelled
|
||||
public static let verificationRequestCancelledTitle = ElementL10n.tr("Untranslated", "verification_request_cancelled_title")
|
||||
/// Accept the request to start the verification process in your other session to continue.
|
||||
public static let verificationRequestWaitingAcceptRequestDetail = ElementL10n.tr("Untranslated", "verification_request_waiting_accept_request_detail")
|
||||
/// Waiting to accept request
|
||||
public static let verificationRequestWaitingAcceptRequestTitle = ElementL10n.tr("Untranslated", "verification_request_waiting_accept_request_title")
|
||||
}
|
||||
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
|
||||
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||
|
||||
// MARK: - Implementation Details
|
||||
|
||||
extension UntranslatedL10n {
|
||||
static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
|
||||
let languages = Bundle.preferredLanguages
|
||||
|
||||
for language in languages {
|
||||
let translation = trIn(language, table, key, args)
|
||||
if translation != key {
|
||||
return translation
|
||||
}
|
||||
}
|
||||
return key
|
||||
}
|
||||
|
||||
private static func trIn(_ language: String, _ table: String, _ key: String, _ args: CVarArg...) -> String {
|
||||
guard let bundle = Bundle(for: BundleToken.self).lprojBundle(for: language) else {
|
||||
// no translations for the desired language
|
||||
return key
|
||||
}
|
||||
let format = NSLocalizedString(key, tableName: table, bundle: bundle, comment: "")
|
||||
return String(format: format, locale: Locale(identifier: language), arguments: args)
|
||||
}
|
||||
}
|
||||
|
||||
private final class BundleToken {}
|
||||
|
||||
|
||||
@@ -10,8 +10,644 @@ import Foundation
|
||||
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
||||
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||
public enum L10n {
|
||||
/// Hide password
|
||||
public static var a11yHidePassword: String { return L10n.tr("Localizable", "a11y_hide_password") }
|
||||
/// Send files
|
||||
public static var a11ySendFiles: String { return L10n.tr("Localizable", "a11y_send_files") }
|
||||
/// Show password
|
||||
public static var a11yShowPassword: String { return L10n.tr("Localizable", "a11y_show_password") }
|
||||
/// User menu
|
||||
public static var a11yUserMenu: String { return L10n.tr("Localizable", "a11y_user_menu") }
|
||||
/// Back
|
||||
public static var actionBack: String { return L10n.tr("Localizable", "action_back") }
|
||||
/// Cancel
|
||||
public static var actionCancel: String { return L10n.tr("Localizable", "action_cancel") }
|
||||
/// Clear
|
||||
public static var actionClear: String { return L10n.tr("Localizable", "action_clear") }
|
||||
/// Close
|
||||
public static var actionClose: String { return L10n.tr("Localizable", "action_close") }
|
||||
/// Complete verification
|
||||
public static var actionCompleteVerification: String { return L10n.tr("Localizable", "action_complete_verification") }
|
||||
/// Confirm
|
||||
public static var actionConfirm: String { return L10n.tr("Localizable", "action_confirm") }
|
||||
/// Continue
|
||||
public static var actionContinue: String { return L10n.tr("Localizable", "action_continue") }
|
||||
/// Copy
|
||||
public static var actionCopy: String { return L10n.tr("Localizable", "action_copy") }
|
||||
/// Copy link
|
||||
public static var actionCopyLink: String { return L10n.tr("Localizable", "action_copy_link") }
|
||||
/// Create a room
|
||||
public static var actionCreateARoom: String { return L10n.tr("Localizable", "action_create_a_room") }
|
||||
/// Disable
|
||||
public static var actionDisable: String { return L10n.tr("Localizable", "action_disable") }
|
||||
/// Done
|
||||
public static var actionDone: String { return L10n.tr("Localizable", "action_done") }
|
||||
/// Edit
|
||||
public static var actionEdit: String { return L10n.tr("Localizable", "action_edit") }
|
||||
/// Enable
|
||||
public static var actionEnable: String { return L10n.tr("Localizable", "action_enable") }
|
||||
/// Invite
|
||||
public static var actionInvite: String { return L10n.tr("Localizable", "action_invite") }
|
||||
/// Invite friends to %1$@
|
||||
public static func actionInviteFriendsToApp(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "action_invite_friends_to_app", String(describing: p1))
|
||||
}
|
||||
/// Learn more
|
||||
public static var actionLearnMore: String { return L10n.tr("Localizable", "action_learn_more") }
|
||||
/// Leave
|
||||
public static var actionLeave: String { return L10n.tr("Localizable", "action_leave") }
|
||||
/// Leave room
|
||||
public static var actionLeaveRoom: String { return L10n.tr("Localizable", "action_leave_room") }
|
||||
/// Next
|
||||
public static var actionNext: String { return L10n.tr("Localizable", "action_next") }
|
||||
/// No
|
||||
public static var actionNo: String { return L10n.tr("Localizable", "action_no") }
|
||||
/// Not now
|
||||
public static var actionNotNow: String { return L10n.tr("Localizable", "action_not_now") }
|
||||
/// OK
|
||||
public static var actionOk: String { return L10n.tr("Localizable", "action_ok") }
|
||||
/// Quick reply
|
||||
public static var actionQuickReply: String { return L10n.tr("Localizable", "action_quick_reply") }
|
||||
/// Quote
|
||||
public static var actionQuote: String { return L10n.tr("Localizable", "action_quote") }
|
||||
/// Remove
|
||||
public static var actionRemove: String { return L10n.tr("Localizable", "action_remove") }
|
||||
/// Reply
|
||||
public static var actionReply: String { return L10n.tr("Localizable", "action_reply") }
|
||||
/// Report bug
|
||||
public static var actionReportBug: String { return L10n.tr("Localizable", "action_report_bug") }
|
||||
/// Report Content
|
||||
public static var actionReportContent: String { return L10n.tr("Localizable", "action_report_content") }
|
||||
/// Retry
|
||||
public static var actionRetry: String { return L10n.tr("Localizable", "action_retry") }
|
||||
/// Retry decryption
|
||||
public static var actionRetryDecryption: String { return L10n.tr("Localizable", "action_retry_decryption") }
|
||||
/// Save
|
||||
public static var actionSave: String { return L10n.tr("Localizable", "action_save") }
|
||||
/// Search
|
||||
public static var actionSearch: String { return L10n.tr("Localizable", "action_search") }
|
||||
/// Send
|
||||
public static var actionSend: String { return L10n.tr("Localizable", "action_send") }
|
||||
/// Share link
|
||||
public static var actionShareLink: String { return L10n.tr("Localizable", "action_share_link") }
|
||||
/// Skip
|
||||
public static var actionSkip: String { return L10n.tr("Localizable", "action_skip") }
|
||||
/// Start
|
||||
public static var actionStart: String { return L10n.tr("Localizable", "action_start") }
|
||||
/// Start chat
|
||||
public static var actionStartChat: String { return L10n.tr("Localizable", "action_start_chat") }
|
||||
/// Start verification
|
||||
public static var actionStartVerification: String { return L10n.tr("Localizable", "action_start_verification") }
|
||||
/// View Source
|
||||
public static var actionViewSource: String { return L10n.tr("Localizable", "action_view_source") }
|
||||
/// Yes
|
||||
public static var actionYes: String { return L10n.tr("Localizable", "action_yes") }
|
||||
/// About
|
||||
public static var commonAbout: String { return L10n.tr("Localizable", "common_about") }
|
||||
/// Audio
|
||||
public static var commonAudio: String { return L10n.tr("Localizable", "common_audio") }
|
||||
/// Bubbles
|
||||
public static var commonBubbles: String { return L10n.tr("Localizable", "common_bubbles") }
|
||||
/// Decryption error
|
||||
public static var commonDecryptionError: String { return L10n.tr("Localizable", "common_decryption_error") }
|
||||
/// Developer options
|
||||
public static var commonDeveloperOptions: String { return L10n.tr("Localizable", "common_developer_options") }
|
||||
/// (edited)
|
||||
public static var commonEditedSuffix: String { return L10n.tr("Localizable", "common_edited_suffix") }
|
||||
/// Editing
|
||||
public static var commonEditing: String { return L10n.tr("Localizable", "common_editing") }
|
||||
/// Encryption enabled
|
||||
public static var commonEncryptionEnabled: String { return L10n.tr("Localizable", "common_encryption_enabled") }
|
||||
/// Error
|
||||
public static var commonError: String { return L10n.tr("Localizable", "common_error") }
|
||||
/// File
|
||||
public static var commonFile: String { return L10n.tr("Localizable", "common_file") }
|
||||
/// GIF
|
||||
public static var commonGif: String { return L10n.tr("Localizable", "common_gif") }
|
||||
/// Image
|
||||
public static var commonImage: String { return L10n.tr("Localizable", "common_image") }
|
||||
/// Link copied to clipboard
|
||||
public static var commonLinkCopiedToClipboard: String { return L10n.tr("Localizable", "common_link_copied_to_clipboard") }
|
||||
/// Loading…
|
||||
public static var commonLoading: String { return L10n.tr("Localizable", "common_loading") }
|
||||
/// Plural format key: "%#@COUNT@"
|
||||
public static func commonMemberCount(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "common_member_count", p1)
|
||||
}
|
||||
/// Message
|
||||
public static var commonMessage: String { return L10n.tr("Localizable", "common_message") }
|
||||
/// Message layout
|
||||
public static var commonMessageLayout: String { return L10n.tr("Localizable", "common_message_layout") }
|
||||
/// Message removed
|
||||
public static var commonMessageRemoved: String { return L10n.tr("Localizable", "common_message_removed") }
|
||||
/// Modern
|
||||
public static var commonModern: String { return L10n.tr("Localizable", "common_modern") }
|
||||
/// Offline
|
||||
public static var commonOffline: String { return L10n.tr("Localizable", "common_offline") }
|
||||
/// Password
|
||||
public static var commonPassword: String { return L10n.tr("Localizable", "common_password") }
|
||||
/// People
|
||||
public static var commonPeople: String { return L10n.tr("Localizable", "common_people") }
|
||||
/// Permalink
|
||||
public static var commonPermalink: String { return L10n.tr("Localizable", "common_permalink") }
|
||||
/// Reactions
|
||||
public static var commonReactions: String { return L10n.tr("Localizable", "common_reactions") }
|
||||
/// Replying to %1$@
|
||||
public static func commonReplyingTo(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "common_replying_to", String(describing: p1))
|
||||
}
|
||||
/// Report a bug
|
||||
public static var commonReportABug: String { return L10n.tr("Localizable", "common_report_a_bug") }
|
||||
/// Report submitted
|
||||
public static var commonReportSubmitted: String { return L10n.tr("Localizable", "common_report_submitted") }
|
||||
/// Search for someone
|
||||
public static var commonSearchForSomeone: String { return L10n.tr("Localizable", "common_search_for_someone") }
|
||||
/// Security
|
||||
public static var commonSecurity: String { return L10n.tr("Localizable", "common_security") }
|
||||
/// Select your server
|
||||
public static var commonSelectYourServer: String { return L10n.tr("Localizable", "common_select_your_server") }
|
||||
/// Sending…
|
||||
public static var commonSending: String { return L10n.tr("Localizable", "common_sending") }
|
||||
/// Server not supported
|
||||
public static var commonServerNotSupported: String { return L10n.tr("Localizable", "common_server_not_supported") }
|
||||
/// Server URL
|
||||
public static var commonServerUrl: String { return L10n.tr("Localizable", "common_server_url") }
|
||||
/// Settings
|
||||
public static var commonSettings: String { return L10n.tr("Localizable", "common_settings") }
|
||||
/// Sticker
|
||||
public static var commonSticker: String { return L10n.tr("Localizable", "common_sticker") }
|
||||
/// Success
|
||||
public static var commonSuccess: String { return L10n.tr("Localizable", "common_success") }
|
||||
/// Suggestions
|
||||
public static var commonSuggestions: String { return L10n.tr("Localizable", "common_suggestions") }
|
||||
/// Topic
|
||||
public static var commonTopic: String { return L10n.tr("Localizable", "common_topic") }
|
||||
/// Unable to decrypt
|
||||
public static var commonUnableToDecrypt: String { return L10n.tr("Localizable", "common_unable_to_decrypt") }
|
||||
/// Unsupported event
|
||||
public static var commonUnsupportedEvent: String { return L10n.tr("Localizable", "common_unsupported_event") }
|
||||
/// Username
|
||||
public static var commonUsername: String { return L10n.tr("Localizable", "common_username") }
|
||||
/// Verification cancelled
|
||||
public static var commonVerificationCancelled: String { return L10n.tr("Localizable", "common_verification_cancelled") }
|
||||
/// Verification complete
|
||||
public static var commonVerificationComplete: String { return L10n.tr("Localizable", "common_verification_complete") }
|
||||
/// Video
|
||||
public static var commonVideo: String { return L10n.tr("Localizable", "common_video") }
|
||||
/// Waiting…
|
||||
public static var commonWaiting: String { return L10n.tr("Localizable", "common_waiting") }
|
||||
/// %1$@ crashed the last time it was used. Would you like to share a crash report with us?
|
||||
public static func crashDetectionDialogContent(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "crash_detection_dialog_content", String(describing: p1))
|
||||
}
|
||||
/// Confirmation
|
||||
public static var dialogTitleConfirmation: String { return L10n.tr("Localizable", "dialog_title_confirmation") }
|
||||
/// Error
|
||||
public static var dialogTitleError: String { return L10n.tr("Localizable", "dialog_title_error") }
|
||||
/// Success
|
||||
public static var dialogTitleSuccess: String { return L10n.tr("Localizable", "dialog_title_success") }
|
||||
/// Warning
|
||||
public static var dialogTitleWarning: String { return L10n.tr("Localizable", "dialog_title_warning") }
|
||||
/// Activities
|
||||
public static var emojiPickerCategoryActivity: String { return L10n.tr("Localizable", "emoji_picker_category_activity") }
|
||||
/// Flags
|
||||
public static var emojiPickerCategoryFlags: String { return L10n.tr("Localizable", "emoji_picker_category_flags") }
|
||||
/// Food & Drink
|
||||
public static var emojiPickerCategoryFoods: String { return L10n.tr("Localizable", "emoji_picker_category_foods") }
|
||||
/// Animals & Nature
|
||||
public static var emojiPickerCategoryNature: String { return L10n.tr("Localizable", "emoji_picker_category_nature") }
|
||||
/// Objects
|
||||
public static var emojiPickerCategoryObjects: String { return L10n.tr("Localizable", "emoji_picker_category_objects") }
|
||||
/// Smileys & People
|
||||
public static var emojiPickerCategoryPeople: String { return L10n.tr("Localizable", "emoji_picker_category_people") }
|
||||
/// Travel & Places
|
||||
public static var emojiPickerCategoryPlaces: String { return L10n.tr("Localizable", "emoji_picker_category_places") }
|
||||
/// Symbols
|
||||
public static var emojiPickerCategorySymbols: String { return L10n.tr("Localizable", "emoji_picker_category_symbols") }
|
||||
/// Failed creating the permalink
|
||||
public static var errorFailedCreatingThePermalink: String { return L10n.tr("Localizable", "error_failed_creating_the_permalink") }
|
||||
/// Failed loading messages
|
||||
public static var errorFailedLoadingMessages: String { return L10n.tr("Localizable", "error_failed_loading_messages") }
|
||||
/// Some messages have not been sent
|
||||
public static var errorSomeMessagesHaveNotBeenSent: String { return L10n.tr("Localizable", "error_some_messages_have_not_been_sent") }
|
||||
/// Sorry, an error occurred
|
||||
public static var errorUnknown: String { return L10n.tr("Localizable", "error_unknown") }
|
||||
/// Hey, talk to me on %1$@: %2$@
|
||||
public static func inviteFriendsText(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "invite_friends_text", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// Are you sure that you want to leave this room? You are the only person here. If you leave, no one will be able to join in the future, including you.
|
||||
public static var leaveRoomAlertEmptySubtitle: String { return L10n.tr("Localizable", "leave_room_alert_empty_subtitle") }
|
||||
/// Are you sure that you want to leave this room? This room is not public and you will not be able to rejoin without an invite.
|
||||
public static var leaveRoomAlertPrivateSubtitle: String { return L10n.tr("Localizable", "leave_room_alert_private_subtitle") }
|
||||
/// Are you sure that you want to leave the room?
|
||||
public static var leaveRoomAlertSubtitle: String { return L10n.tr("Localizable", "leave_room_alert_subtitle") }
|
||||
/// %1$@ iOS
|
||||
public static func loginInitialDeviceNameIos(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "login_initial_device_name_ios", String(describing: p1))
|
||||
}
|
||||
/// Notification
|
||||
public static var notification: String { return L10n.tr("Localizable", "Notification") }
|
||||
/// Rageshake to report bug
|
||||
public static var preferenceRageshake: String { return L10n.tr("Localizable", "preference_rageshake") }
|
||||
/// You seem to be shaking the phone in frustration. Would you like to open the bug report screen?
|
||||
public static var rageshakeDetectionDialogContent: String { return L10n.tr("Localizable", "rageshake_detection_dialog_content") }
|
||||
/// You seem to be shaking the phone in frustration. Would you like to open the bug report screen?
|
||||
public static var rageshakeDialogContent: String { return L10n.tr("Localizable", "rageshake_dialog_content") }
|
||||
/// Reporting this message will send it’s unique ‘event ID’ to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.
|
||||
public static var reportContentExplanation: String { return L10n.tr("Localizable", "report_content_explanation") }
|
||||
/// Reason for reporting this content
|
||||
public static var reportContentHint: String { return L10n.tr("Localizable", "report_content_hint") }
|
||||
/// Toggle bullet list
|
||||
public static var richTextEditorBulletList: String { return L10n.tr("Localizable", "rich_text_editor_bullet_list") }
|
||||
/// Toggle code block
|
||||
public static var richTextEditorCodeBlock: String { return L10n.tr("Localizable", "rich_text_editor_code_block") }
|
||||
/// Message…
|
||||
public static var richTextEditorComposerPlaceholder: String { return L10n.tr("Localizable", "rich_text_editor_composer_placeholder") }
|
||||
/// Apply bold format
|
||||
public static var richTextEditorFormatBold: String { return L10n.tr("Localizable", "rich_text_editor_format_bold") }
|
||||
/// Apply italic format
|
||||
public static var richTextEditorFormatItalic: String { return L10n.tr("Localizable", "rich_text_editor_format_italic") }
|
||||
/// Apply strikethrough format
|
||||
public static var richTextEditorFormatStrikethrough: String { return L10n.tr("Localizable", "rich_text_editor_format_strikethrough") }
|
||||
/// Apply underline format
|
||||
public static var richTextEditorFormatUnderline: String { return L10n.tr("Localizable", "rich_text_editor_format_underline") }
|
||||
/// Toggle full screen mode
|
||||
public static var richTextEditorFullScreenToggle: String { return L10n.tr("Localizable", "rich_text_editor_full_screen_toggle") }
|
||||
/// Indent
|
||||
public static var richTextEditorIndent: String { return L10n.tr("Localizable", "rich_text_editor_indent") }
|
||||
/// Apply inline code format
|
||||
public static var richTextEditorInlineCode: String { return L10n.tr("Localizable", "rich_text_editor_inline_code") }
|
||||
/// Set link
|
||||
public static var richTextEditorLink: String { return L10n.tr("Localizable", "rich_text_editor_link") }
|
||||
/// Toggle numbered list
|
||||
public static var richTextEditorNumberedList: String { return L10n.tr("Localizable", "rich_text_editor_numbered_list") }
|
||||
/// Toggle quote
|
||||
public static var richTextEditorQuote: String { return L10n.tr("Localizable", "rich_text_editor_quote") }
|
||||
/// Unindent
|
||||
public static var richTextEditorUnindent: String { return L10n.tr("Localizable", "rich_text_editor_unindent") }
|
||||
/// This is the beginning of %1$@.
|
||||
public static func roomTimelineBeginningOfRoom(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "room_timeline_beginning_of_room", String(describing: p1))
|
||||
}
|
||||
/// This is the beginning of this conversation.
|
||||
public static var roomTimelineBeginningOfRoomNoName: String { return L10n.tr("Localizable", "room_timeline_beginning_of_room_no_name") }
|
||||
/// New
|
||||
public static var roomTimelineReadMarkerTitle: String { return L10n.tr("Localizable", "room_timeline_read_marker_title") }
|
||||
/// Plural format key: "%#@COUNT@"
|
||||
public static func roomTimelineStateChanges(_ p1: Int) -> String {
|
||||
return L10n.tr("Localizable", "room_timeline_state_changes", p1)
|
||||
}
|
||||
/// Attach screenshot
|
||||
public static var screenBugReportAttachScreenshot: String { return L10n.tr("Localizable", "screen_bug_report_attach_screenshot") }
|
||||
/// You may contact me if you have any follow up questions
|
||||
public static var screenBugReportContactMe: String { return L10n.tr("Localizable", "screen_bug_report_contact_me") }
|
||||
/// Edit screenshot
|
||||
public static var screenBugReportEditScreenshot: String { return L10n.tr("Localizable", "screen_bug_report_edit_screenshot") }
|
||||
/// Please describe the bug. What did you do? What did you expect to happen? What actually happened. Please go into as much detail as you can.
|
||||
public static var screenBugReportEditorDescription: String { return L10n.tr("Localizable", "screen_bug_report_editor_description") }
|
||||
/// Describe the bug…
|
||||
public static var screenBugReportEditorPlaceholder: String { return L10n.tr("Localizable", "screen_bug_report_editor_placeholder") }
|
||||
/// If possible, please write the description in English.
|
||||
public static var screenBugReportEditorSupporting: String { return L10n.tr("Localizable", "screen_bug_report_editor_supporting") }
|
||||
/// Send crash logs
|
||||
public static var screenBugReportIncludeCrashLogs: String { return L10n.tr("Localizable", "screen_bug_report_include_crash_logs") }
|
||||
/// Send logs to help
|
||||
public static var screenBugReportIncludeLogs: String { return L10n.tr("Localizable", "screen_bug_report_include_logs") }
|
||||
/// Send screenshot
|
||||
public static var screenBugReportIncludeScreenshot: String { return L10n.tr("Localizable", "screen_bug_report_include_screenshot") }
|
||||
/// To check things work as intended, logs will be sent with your message. These will be private. To just send your message, turn off this setting.
|
||||
public static var screenBugReportLogsDescription: String { return L10n.tr("Localizable", "screen_bug_report_logs_description") }
|
||||
/// %1$@ crashed the last time it was used. Would you like to share a crash report with us?
|
||||
public static func screenBugReportRashLogsAlertTitle(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "screen_bug_report_rash_logs_alert_title", String(describing: p1))
|
||||
}
|
||||
/// We couldn't reach this homeserver. Please check that you have entered the homeserver URL correctly. If the URL is correct, contact your homeserver administrator for further help.
|
||||
public static var screenChangeServerErrorInvalidHomeserver: String { return L10n.tr("Localizable", "screen_change_server_error_invalid_homeserver") }
|
||||
/// This server currently doesn’t support sliding sync.
|
||||
public static var screenChangeServerErrorNoSlidingSyncMessage: String { return L10n.tr("Localizable", "screen_change_server_error_no_sliding_sync_message") }
|
||||
/// Homeserver URL
|
||||
public static var screenChangeServerFormHeader: String { return L10n.tr("Localizable", "screen_change_server_form_header") }
|
||||
/// You can only connect to an existing server that supports sliding sync. Your homeserver admin will need to configure it. %1$@
|
||||
public static func screenChangeServerFormNotice(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "screen_change_server_form_notice", String(describing: p1))
|
||||
}
|
||||
/// Continue
|
||||
public static var screenChangeServerSubmit: String { return L10n.tr("Localizable", "screen_change_server_submit") }
|
||||
/// What is the address of your server?
|
||||
public static var screenChangeServerSubtitle: String { return L10n.tr("Localizable", "screen_change_server_subtitle") }
|
||||
/// Select your server
|
||||
public static var screenChangeServerTitle: String { return L10n.tr("Localizable", "screen_change_server_title") }
|
||||
/// New room
|
||||
public static var screenCreateRoomActionCreateRoom: String { return L10n.tr("Localizable", "screen_create_room_action_create_room") }
|
||||
/// Invite people
|
||||
public static var screenCreateRoomActionInvitePeople: String { return L10n.tr("Localizable", "screen_create_room_action_invite_people") }
|
||||
/// Add people
|
||||
public static var screenCreateRoomAddPeopleTitle: String { return L10n.tr("Localizable", "screen_create_room_add_people_title") }
|
||||
/// This account has been deactivated.
|
||||
public static var screenLoginErrorDeactivatedAccount: String { return L10n.tr("Localizable", "screen_login_error_deactivated_account") }
|
||||
/// Incorrect username and/or password
|
||||
public static var screenLoginErrorInvalidCredentials: String { return L10n.tr("Localizable", "screen_login_error_invalid_credentials") }
|
||||
/// This is not a valid user identifier. Expected format: ‘@user:homeserver.org’
|
||||
public static var screenLoginErrorInvalidUserId: String { return L10n.tr("Localizable", "screen_login_error_invalid_user_id") }
|
||||
/// The selected homeserver doesn't support password or OIDC login. Please contact your admin or choose another homeserver.
|
||||
public static var screenLoginErrorUnsupportedAuthentication: String { return L10n.tr("Localizable", "screen_login_error_unsupported_authentication") }
|
||||
/// Enter your details
|
||||
public static var screenLoginFormHeader: String { return L10n.tr("Localizable", "screen_login_form_header") }
|
||||
/// Password
|
||||
public static var screenLoginPasswordHint: String { return L10n.tr("Localizable", "screen_login_password_hint") }
|
||||
/// Where your conversations live
|
||||
public static var screenLoginServerHeader: String { return L10n.tr("Localizable", "screen_login_server_header") }
|
||||
/// Continue
|
||||
public static var screenLoginSubmit: String { return L10n.tr("Localizable", "screen_login_submit") }
|
||||
/// Welcome back!
|
||||
public static var screenLoginTitle: String { return L10n.tr("Localizable", "screen_login_title") }
|
||||
/// Username
|
||||
public static var screenLoginUsernameHint: String { return L10n.tr("Localizable", "screen_login_username_hint") }
|
||||
/// Welcome to the %1$@ Beta. Supercharged, for speed and simplicity.
|
||||
public static func screenOnboardingWelcomeSubtitle(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "screen_onboarding_welcome_subtitle", String(describing: p1))
|
||||
}
|
||||
/// Be in your Element
|
||||
public static var screenOnboardingWelcomeTitle: String { return L10n.tr("Localizable", "screen_onboarding_welcome_title") }
|
||||
/// Messages are secured with locks. Only you and the recipients have the unique keys to unlock them.
|
||||
public static var screenRoomDetailsEncryptionEnabledSubtitle: String { return L10n.tr("Localizable", "screen_room_details_encryption_enabled_subtitle") }
|
||||
/// Message encryption enabled
|
||||
public static var screenRoomDetailsEncryptionEnabledTitle: String { return L10n.tr("Localizable", "screen_room_details_encryption_enabled_title") }
|
||||
/// Invite people
|
||||
public static var screenRoomDetailsInvitePeopleTitle: String { return L10n.tr("Localizable", "screen_room_details_invite_people_title") }
|
||||
/// Leave room
|
||||
public static var screenRoomDetailsLeaveRoomTitle: String { return L10n.tr("Localizable", "screen_room_details_leave_room_title") }
|
||||
/// People
|
||||
public static var screenRoomDetailsPeopleTitle: String { return L10n.tr("Localizable", "screen_room_details_people_title") }
|
||||
/// Security
|
||||
public static var screenRoomDetailsSecurityTitle: String { return L10n.tr("Localizable", "screen_room_details_security_title") }
|
||||
/// Topic
|
||||
public static var screenRoomDetailsTopicTitle: String { return L10n.tr("Localizable", "screen_room_details_topic_title") }
|
||||
/// Block
|
||||
public static var screenRoomMemberDetailsBlockAlertAction: String { return L10n.tr("Localizable", "screen_room_member_details_block_alert_action") }
|
||||
/// Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.
|
||||
public static var screenRoomMemberDetailsBlockAlertDescription: String { return L10n.tr("Localizable", "screen_room_member_details_block_alert_description") }
|
||||
/// Block user
|
||||
public static var screenRoomMemberDetailsBlockUser: String { return L10n.tr("Localizable", "screen_room_member_details_block_user") }
|
||||
/// Unblock
|
||||
public static var screenRoomMemberDetailsUnblockAlertAction: String { return L10n.tr("Localizable", "screen_room_member_details_unblock_alert_action") }
|
||||
/// On unblocking the user, you will be able to see all messages by them again.
|
||||
public static var screenRoomMemberDetailsUnblockAlertDescription: String { return L10n.tr("Localizable", "screen_room_member_details_unblock_alert_description") }
|
||||
/// Unblock user
|
||||
public static var screenRoomMemberDetailsUnblockUser: String { return L10n.tr("Localizable", "screen_room_member_details_unblock_user") }
|
||||
/// Create a new conversation or room
|
||||
public static var screenRoomlistA11yCreateMessage: String { return L10n.tr("Localizable", "screen_roomlist_a11y_create_message") }
|
||||
/// All Chats
|
||||
public static var screenRoomlistMainSpaceTitle: String { return L10n.tr("Localizable", "screen_roomlist_main_space_title") }
|
||||
/// Something doesn’t seem right. Either the request timed out or the request was denied.
|
||||
public static var screenSessionVerificationCancelledSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_cancelled_subtitle") }
|
||||
/// Verification cancelled
|
||||
public static var screenSessionVerificationCancelledTitle: String { return L10n.tr("Localizable", "screen_session_verification_cancelled_title") }
|
||||
/// Confirm that the emojis below match those shown on your other session.
|
||||
public static var screenSessionVerificationCompareEmojisSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_compare_emojis_subtitle") }
|
||||
/// Compare emojis
|
||||
public static var screenSessionVerificationCompareEmojisTitle: String { return L10n.tr("Localizable", "screen_session_verification_compare_emojis_title") }
|
||||
/// Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.
|
||||
public static var screenSessionVerificationCompleteSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_complete_subtitle") }
|
||||
/// Prove it’s you in order to access your encrypted message history.
|
||||
public static var screenSessionVerificationOpenExistingSessionSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_open_existing_session_subtitle") }
|
||||
/// Open an existing session
|
||||
public static var screenSessionVerificationOpenExistingSessionTitle: String { return L10n.tr("Localizable", "screen_session_verification_open_existing_session_title") }
|
||||
/// Retry verification
|
||||
public static var screenSessionVerificationPositiveButtonCanceled: String { return L10n.tr("Localizable", "screen_session_verification_positive_button_canceled") }
|
||||
/// I am ready
|
||||
public static var screenSessionVerificationPositiveButtonInitial: String { return L10n.tr("Localizable", "screen_session_verification_positive_button_initial") }
|
||||
/// Start
|
||||
public static var screenSessionVerificationPositiveButtonReady: String { return L10n.tr("Localizable", "screen_session_verification_positive_button_ready") }
|
||||
/// Waiting to match
|
||||
public static var screenSessionVerificationPositiveButtonVerifyingOngoing: String { return L10n.tr("Localizable", "screen_session_verification_positive_button_verifying_ongoing") }
|
||||
/// Compare the unique emoji, ensuring they appear in the same order.
|
||||
public static var screenSessionVerificationRequestAcceptedSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_request_accepted_subtitle") }
|
||||
/// They don’t match
|
||||
public static var screenSessionVerificationTheyDontMatch: String { return L10n.tr("Localizable", "screen_session_verification_they_dont_match") }
|
||||
/// They match
|
||||
public static var screenSessionVerificationTheyMatch: String { return L10n.tr("Localizable", "screen_session_verification_they_match") }
|
||||
/// Accept the request to start the verification process in your other session to continue.
|
||||
public static var screenSessionVerificationWaitingToAcceptSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_waiting_to_accept_subtitle") }
|
||||
/// Waiting to accept request
|
||||
public static var screenSessionVerificationWaitingToAcceptTitle: String { return L10n.tr("Localizable", "screen_session_verification_waiting_to_accept_title") }
|
||||
/// Are you sure you want to sign out?
|
||||
public static var screenSignoutConfirmationDialogContent: String { return L10n.tr("Localizable", "screen_signout_confirmation_dialog_content") }
|
||||
/// Sign out
|
||||
public static var screenSignoutConfirmationDialogSubmit: String { return L10n.tr("Localizable", "screen_signout_confirmation_dialog_submit") }
|
||||
/// Sign out
|
||||
public static var screenSignoutConfirmationDialogTitle: String { return L10n.tr("Localizable", "screen_signout_confirmation_dialog_title") }
|
||||
/// Signing out…
|
||||
public static var screenSignoutInProgressDialogContent: String { return L10n.tr("Localizable", "screen_signout_in_progress_dialog_content") }
|
||||
/// Sign out
|
||||
public static var screenSignoutPreferenceItem: String { return L10n.tr("Localizable", "screen_signout_preference_item") }
|
||||
/// An error occurred when trying to start a chat
|
||||
public static var screenStartChatErrorStartingChat: String { return L10n.tr("Localizable", "screen_start_chat_error_starting_chat") }
|
||||
/// Looks like you’re using a new device. Verify it’s you to access your encrypted messages.
|
||||
public static var sessionVerificationBannerMessage: String { return L10n.tr("Localizable", "session_verification_banner_message") }
|
||||
/// Access your message history
|
||||
public static var sessionVerificationBannerTitle: String { return L10n.tr("Localizable", "session_verification_banner_title") }
|
||||
/// Rageshake
|
||||
public static var settingsRageshake: String { return L10n.tr("Localizable", "settings_rageshake") }
|
||||
/// Detection threshold
|
||||
public static var settingsRageshakeDetectionThreshold: String { return L10n.tr("Localizable", "settings_rageshake_detection_threshold") }
|
||||
/// General
|
||||
public static var settingsTitleGeneral: String { return L10n.tr("Localizable", "settings_title_general") }
|
||||
/// Version: %1$@ (%2$@)
|
||||
public static func settingsVersionNumber(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "settings_version_number", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// (avatar was changed too)
|
||||
public static var stateEventAvatarChangedToo: String { return L10n.tr("Localizable", "state_event_avatar_changed_too") }
|
||||
/// %1$@ changed their avatar
|
||||
public static func stateEventAvatarUrlChanged(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_avatar_url_changed", String(describing: p1))
|
||||
}
|
||||
/// You changed your avatar
|
||||
public static var stateEventAvatarUrlChangedByYou: String { return L10n.tr("Localizable", "state_event_avatar_url_changed_by_you") }
|
||||
/// %1$@ changed their display name from %2$@ to %3$@
|
||||
public static func stateEventDisplayNameChangedFrom(_ p1: Any, _ p2: Any, _ p3: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_changed_from", String(describing: p1), String(describing: p2), String(describing: p3))
|
||||
}
|
||||
/// You changed your display name from %1$@ to %2$@
|
||||
public static func stateEventDisplayNameChangedFromByYou(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_changed_from_by_you", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// %1$@ removed their display name (it was %2$@)
|
||||
public static func stateEventDisplayNameRemoved(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_removed", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You removed your display name (it was %1$@)
|
||||
public static func stateEventDisplayNameRemovedByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_removed_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ set their display name to %2$@
|
||||
public static func stateEventDisplayNameSet(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_set", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You set your display name to %1$@
|
||||
public static func stateEventDisplayNameSetByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_display_name_set_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ changed the room avatar
|
||||
public static func stateEventRoomAvatarChanged(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_avatar_changed", String(describing: p1))
|
||||
}
|
||||
/// You changed the room avatar
|
||||
public static var stateEventRoomAvatarChangedByYou: String { return L10n.tr("Localizable", "state_event_room_avatar_changed_by_you") }
|
||||
/// %1$@ removed the room avatar
|
||||
public static func stateEventRoomAvatarRemoved(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_avatar_removed", String(describing: p1))
|
||||
}
|
||||
/// You removed the room avatar
|
||||
public static var stateEventRoomAvatarRemovedByYou: String { return L10n.tr("Localizable", "state_event_room_avatar_removed_by_you") }
|
||||
/// %1$@ banned %2$@
|
||||
public static func stateEventRoomBan(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_ban", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You banned %1$@
|
||||
public static func stateEventRoomBanByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_ban_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ created the room
|
||||
public static func stateEventRoomCreated(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_created", String(describing: p1))
|
||||
}
|
||||
/// You created the room
|
||||
public static var stateEventRoomCreatedByYou: String { return L10n.tr("Localizable", "state_event_room_created_by_you") }
|
||||
/// %1$@ invited %2$@
|
||||
public static func stateEventRoomInvite(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_invite", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// %1$@ accepted the invite
|
||||
public static func stateEventRoomInviteAccepted(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_invite_accepted", String(describing: p1))
|
||||
}
|
||||
/// You accepted the invite
|
||||
public static var stateEventRoomInviteAcceptedByYou: String { return L10n.tr("Localizable", "state_event_room_invite_accepted_by_you") }
|
||||
/// You invited %1$@
|
||||
public static func stateEventRoomInviteByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_invite_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ invited you
|
||||
public static func stateEventRoomInviteYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_invite_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ joined the room
|
||||
public static func stateEventRoomJoin(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_join", String(describing: p1))
|
||||
}
|
||||
/// You joined the room
|
||||
public static var stateEventRoomJoinByYou: String { return L10n.tr("Localizable", "state_event_room_join_by_you") }
|
||||
/// %1$@ requested to join
|
||||
public static func stateEventRoomKnock(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock", String(describing: p1))
|
||||
}
|
||||
/// %1$@ allowed %2$@ to join
|
||||
public static func stateEventRoomKnockAccepted(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_accepted", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// %1$@ allowed you to join
|
||||
public static func stateEventRoomKnockAcceptedByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_accepted_by_you", String(describing: p1))
|
||||
}
|
||||
/// You requested to join
|
||||
public static var stateEventRoomKnockByYou: String { return L10n.tr("Localizable", "state_event_room_knock_by_you") }
|
||||
/// %1$@ rejected %2$@'s request to join
|
||||
public static func stateEventRoomKnockDenied(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_denied", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You rejected %1$@'s request to join
|
||||
public static func stateEventRoomKnockDeniedByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_denied_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ rejected your request to join
|
||||
public static func stateEventRoomKnockDeniedYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_denied_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ is no longer interested in joining
|
||||
public static func stateEventRoomKnockRetracted(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_knock_retracted", String(describing: p1))
|
||||
}
|
||||
/// You cancelled your request to join
|
||||
public static var stateEventRoomKnockRetractedByYou: String { return L10n.tr("Localizable", "state_event_room_knock_retracted_by_you") }
|
||||
/// %1$@ left the room
|
||||
public static func stateEventRoomLeave(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_leave", String(describing: p1))
|
||||
}
|
||||
/// You left the room
|
||||
public static var stateEventRoomLeaveByYou: String { return L10n.tr("Localizable", "state_event_room_leave_by_you") }
|
||||
/// %1$@ changed the room name to: %2$@
|
||||
public static func stateEventRoomNameChanged(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_name_changed", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You changed the room name to: %1$@
|
||||
public static func stateEventRoomNameChangedByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_name_changed_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ removed the room name
|
||||
public static func stateEventRoomNameRemoved(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_name_removed", String(describing: p1))
|
||||
}
|
||||
/// You removed the room name
|
||||
public static var stateEventRoomNameRemovedByYou: String { return L10n.tr("Localizable", "state_event_room_name_removed_by_you") }
|
||||
/// %1$@ rejected the invitation
|
||||
public static func stateEventRoomReject(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_reject", String(describing: p1))
|
||||
}
|
||||
/// You rejected the invitation
|
||||
public static var stateEventRoomRejectByYou: String { return L10n.tr("Localizable", "state_event_room_reject_by_you") }
|
||||
/// %1$@ removed %2$@
|
||||
public static func stateEventRoomRemove(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_remove", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You removed %1$@
|
||||
public static func stateEventRoomRemoveByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_remove_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ sent an invitation to %2$@ to join the room
|
||||
public static func stateEventRoomThirdPartyInvite(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_third_party_invite", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You sent an invitation to %1$@ to join the room
|
||||
public static func stateEventRoomThirdPartyInviteByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_third_party_invite_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ revoked the invitation for %2$@ to join the room
|
||||
public static func stateEventRoomThirdPartyRevokedInvite(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_third_party_revoked_invite", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You revoked the invitation for %1$@ to join the room
|
||||
public static func stateEventRoomThirdPartyRevokedInviteByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_third_party_revoked_invite_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ changed the topic to: %2$@
|
||||
public static func stateEventRoomTopicChanged(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_topic_changed", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You changed the topic to: %1$@
|
||||
public static func stateEventRoomTopicChangedByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_topic_changed_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ removed the room topic
|
||||
public static func stateEventRoomTopicRemoved(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_topic_removed", String(describing: p1))
|
||||
}
|
||||
/// You removed the room topic
|
||||
public static var stateEventRoomTopicRemovedByYou: String { return L10n.tr("Localizable", "state_event_room_topic_removed_by_you") }
|
||||
/// %1$@ unbanned %2$@
|
||||
public static func stateEventRoomUnban(_ p1: Any, _ p2: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_unban", String(describing: p1), String(describing: p2))
|
||||
}
|
||||
/// You unbanned %1$@
|
||||
public static func stateEventRoomUnbanByYou(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_unban_by_you", String(describing: p1))
|
||||
}
|
||||
/// %1$@ made an unknown change to their membership
|
||||
public static func stateEventRoomUnknownMembershipChange(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "state_event_room_unknown_membership_change", String(describing: p1))
|
||||
}
|
||||
}
|
||||
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
|
||||
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||
|
||||
@@ -51,9 +51,9 @@ struct ErrorAlertItem: AlertItem {
|
||||
var action: () -> Void
|
||||
}
|
||||
|
||||
var title = ElementL10n.dialogTitleError
|
||||
var message = ElementL10n.unknownError
|
||||
var cancelAction = Action(title: ElementL10n.ok, action: { })
|
||||
var title = L10n.commonError
|
||||
var message = L10n.errorUnknown
|
||||
var cancelAction = Action(title: L10n.actionOk, action: { })
|
||||
var primaryAction: Action?
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ extension UIDevice {
|
||||
userInterfaceIdiom == .phone
|
||||
}
|
||||
|
||||
var initialDisplayName: String {
|
||||
ElementL10n.defaultSessionDisplayName(InfoPlistReader.main.bundleDisplayName)
|
||||
var initialDeviceName: String {
|
||||
L10n.loginInitialDeviceNameIos(InfoPlistReader.main.bundleDisplayName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ struct AlertInfo<T: Hashable>: Identifiable {
|
||||
/// The alert's message (optional).
|
||||
var message: String?
|
||||
/// The alert's primary button title and action. Defaults to an Ok button with no action.
|
||||
var primaryButton = AlertButton(title: ElementL10n.ok, action: nil)
|
||||
var primaryButton = AlertButton(title: L10n.actionOk, action: nil)
|
||||
/// The alert's secondary button title and action.
|
||||
var secondaryButton: AlertButton?
|
||||
}
|
||||
@@ -63,8 +63,8 @@ extension AlertInfo {
|
||||
/// - error: The Error that occurred.
|
||||
init(id: T) {
|
||||
self.id = id
|
||||
title = ElementL10n.dialogTitleError
|
||||
message = ElementL10n.unknownError
|
||||
title = L10n.commonError
|
||||
message = L10n.errorUnknown
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ struct AnalyticsPromptViewState: BindableState {
|
||||
/// A collection of strings for the UI that need to be parsed from HTML
|
||||
struct AnalyticsPromptStrings {
|
||||
let optInContent: AttributedString
|
||||
let point1 = AttributedStringBuilder().fromHTML(ElementL10n.analyticsOptInListItem1) ?? AttributedString(ElementL10n.analyticsOptInListItem1)
|
||||
let point2 = AttributedStringBuilder().fromHTML(ElementL10n.analyticsOptInListItem2) ?? AttributedString(ElementL10n.analyticsOptInListItem2)
|
||||
let point1 = AttributedStringBuilder().fromHTML(UntranslatedL10n.analyticsOptInListItem1) ?? AttributedString(UntranslatedL10n.analyticsOptInListItem1)
|
||||
let point2 = AttributedStringBuilder().fromHTML(UntranslatedL10n.analyticsOptInListItem2) ?? AttributedString(UntranslatedL10n.analyticsOptInListItem2)
|
||||
|
||||
init() {
|
||||
// Create the opt in content with a placeholder.
|
||||
let linkPlaceholder = "{link}"
|
||||
var optInContent = AttributedString(ElementL10n.analyticsOptInContent(InfoPlistReader.main.bundleDisplayName, linkPlaceholder))
|
||||
var optInContent = AttributedString(UntranslatedL10n.analyticsOptInContent(InfoPlistReader.main.bundleDisplayName, linkPlaceholder))
|
||||
optInContent.replace(linkPlaceholder,
|
||||
with: ElementL10n.analyticsOptInContentLink,
|
||||
with: UntranslatedL10n.analyticsOptInContentLink,
|
||||
asLinkTo: ServiceLocator.shared.settings.analyticsConfiguration.termsURL)
|
||||
self.optInContent = optInContent
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ struct AnalyticsPrompt: View {
|
||||
Image(uiImage: Asset.Images.analyticsLogo.image)
|
||||
.padding(.bottom, 25)
|
||||
|
||||
Text(ElementL10n.analyticsOptInTitle(InfoPlistReader.main.bundleDisplayName))
|
||||
Text(UntranslatedL10n.analyticsOptInTitle(InfoPlistReader.main.bundleDisplayName))
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -84,7 +84,7 @@ struct AnalyticsPrompt: View {
|
||||
VStack(alignment: .leading) {
|
||||
AnalyticsPromptCheckmarkItem(attributedString: context.viewState.strings.point1)
|
||||
AnalyticsPromptCheckmarkItem(attributedString: context.viewState.strings.point1)
|
||||
AnalyticsPromptCheckmarkItem(string: ElementL10n.analyticsOptInListItem3)
|
||||
AnalyticsPromptCheckmarkItem(string: UntranslatedL10n.analyticsOptInListItem3)
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.font(.element.body)
|
||||
@@ -96,13 +96,13 @@ struct AnalyticsPrompt: View {
|
||||
private var buttons: some View {
|
||||
VStack {
|
||||
Button { context.send(viewAction: .enable) } label: {
|
||||
Text(ElementL10n.actionEnable)
|
||||
Text(L10n.actionEnable)
|
||||
.font(.element.bodyBold)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
|
||||
Button { context.send(viewAction: .disable) } label: {
|
||||
Text(ElementL10n.actionNotNow)
|
||||
Text(L10n.actionNotNow)
|
||||
.font(.element.bodyBold)
|
||||
.padding(12)
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
private func startLoading() {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.loading,
|
||||
title: L10n.commonLoading,
|
||||
persistent: true))
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ final class LoginCoordinator: CoordinatorProtocol {
|
||||
if isInteractionBlocking {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.loading,
|
||||
title: L10n.commonLoading,
|
||||
persistent: true))
|
||||
} else {
|
||||
viewModel.update(isLoading: true)
|
||||
@@ -108,11 +108,11 @@ final class LoginCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func indicateSuccess() {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.dialogTitleSuccess))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonSuccess))
|
||||
}
|
||||
|
||||
private func indicateFailure() {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.dialogTitleError))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonError))
|
||||
}
|
||||
|
||||
/// Processes an error to either update the flow or display it to the user.
|
||||
@@ -121,13 +121,13 @@ final class LoginCoordinator: CoordinatorProtocol {
|
||||
|
||||
switch error {
|
||||
case .invalidCredentials:
|
||||
viewModel.displayError(.alert(ElementL10n.authInvalidLoginParam))
|
||||
viewModel.displayError(.alert(L10n.screenLoginErrorInvalidCredentials))
|
||||
case .accountDeactivated:
|
||||
viewModel.displayError(.alert(ElementL10n.authInvalidLoginDeactivatedAccount))
|
||||
viewModel.displayError(.alert(L10n.screenLoginErrorDeactivatedAccount))
|
||||
case .slidingSyncNotAvailable:
|
||||
viewModel.displayError(.slidingSyncAlert)
|
||||
default:
|
||||
viewModel.displayError(.alert(ElementL10n.unknownError))
|
||||
viewModel.displayError(.alert(L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ final class LoginCoordinator: CoordinatorProtocol {
|
||||
Task {
|
||||
switch await authenticationService.login(username: username,
|
||||
password: password,
|
||||
initialDeviceName: UIDevice.current.initialDisplayName,
|
||||
initialDeviceName: UIDevice.current.initialDeviceName,
|
||||
deviceId: nil) {
|
||||
case .success(let userSession):
|
||||
callback?(.signedIn(userSession))
|
||||
|
||||
@@ -56,19 +56,19 @@ class LoginViewModel: LoginViewModelType, LoginViewModelProtocol {
|
||||
switch type {
|
||||
case .alert(let message):
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
title: L10n.commonError,
|
||||
message: message)
|
||||
case .invalidHomeserver:
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
message: ElementL10n.loginSigninMatrixIdErrorInvalidMatrixId)
|
||||
title: L10n.commonError,
|
||||
message: L10n.screenLoginErrorInvalidUserId)
|
||||
case .slidingSyncAlert:
|
||||
let openURL = { UIApplication.shared.open(ServiceLocator.shared.settings.slidingSyncLearnMoreURL) }
|
||||
state.bindings.alertInfo = AlertInfo(id: .slidingSyncAlert,
|
||||
title: ElementL10n.serverSelectionSlidingSyncAlertTitle,
|
||||
message: ElementL10n.serverSelectionSlidingSyncAlertMessage,
|
||||
primaryButton: .init(title: ElementL10n.actionLearnMore, role: .cancel, action: openURL),
|
||||
secondaryButton: .init(title: ElementL10n.actionCancel, action: nil))
|
||||
title: L10n.commonServerNotSupported,
|
||||
message: L10n.screenChangeServerErrorNoSlidingSyncMessage,
|
||||
primaryButton: .init(title: L10n.actionLearnMore, role: .cancel, action: openURL),
|
||||
secondaryButton: .init(title: L10n.actionCancel, action: nil))
|
||||
|
||||
// Clear out the invalid username to avoid an attempted login to matrix.org
|
||||
state.bindings.username = ""
|
||||
|
||||
@@ -53,7 +53,7 @@ struct LoginScreen: View {
|
||||
|
||||
/// The header containing a Welcome Back title.
|
||||
var header: some View {
|
||||
Text(ElementL10n.ftueAuthWelcomeBackTitle)
|
||||
Text(L10n.screenLoginTitle)
|
||||
.font(.element.title1Bold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -69,16 +69,16 @@ struct LoginScreen: View {
|
||||
/// The form with text fields for username and password, along with a submit button.
|
||||
var loginForm: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(ElementL10n.ftueAuthSignInEnterDetails)
|
||||
Text(L10n.screenLoginFormHeader)
|
||||
.font(.element.footnote)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 8)
|
||||
|
||||
TextField(ElementL10n.username,
|
||||
TextField(L10n.commonUsername,
|
||||
text: $context.username,
|
||||
// Prompt colour fixes a flicker that occurs before the text field style introspects the field.
|
||||
prompt: Text(ElementL10n.username).foregroundColor(.element.tertiaryContent))
|
||||
prompt: Text(L10n.commonUsername).foregroundColor(.element.tertiaryContent))
|
||||
.focused($isUsernameFocused)
|
||||
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.emailUsername))
|
||||
.disableAutocorrection(true)
|
||||
@@ -89,10 +89,10 @@ struct LoginScreen: View {
|
||||
.onSubmit { isPasswordFocused = true }
|
||||
.padding(.bottom, 20)
|
||||
|
||||
SecureField(ElementL10n.loginSignupPasswordHint,
|
||||
SecureField(L10n.commonPassword,
|
||||
text: $context.password,
|
||||
// Prompt colour fixes a flicker that occurs before the text field style introspects the field.
|
||||
prompt: Text(ElementL10n.loginSignupPasswordHint).foregroundColor(.element.tertiaryContent))
|
||||
prompt: Text(L10n.commonPassword).foregroundColor(.element.tertiaryContent))
|
||||
.focused($isPasswordFocused)
|
||||
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.password))
|
||||
.textContentType(.password)
|
||||
@@ -102,7 +102,7 @@ struct LoginScreen: View {
|
||||
Spacer().frame(height: 32)
|
||||
|
||||
Button(action: submit) {
|
||||
Text(ElementL10n.loginContinue)
|
||||
Text(L10n.actionContinue)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.disabled(!context.viewState.canSubmit)
|
||||
@@ -113,7 +113,7 @@ struct LoginScreen: View {
|
||||
/// The OIDC button that can be used for login.
|
||||
var oidcButton: some View {
|
||||
Button { context.send(viewAction: .continueWithOIDC) } label: {
|
||||
Text(ElementL10n.loginContinue)
|
||||
Text(L10n.actionContinue)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.accessibilityIdentifier(A11yIdentifiers.loginScreen.oidc)
|
||||
@@ -121,7 +121,7 @@ struct LoginScreen: View {
|
||||
|
||||
/// Text shown if neither password or OIDC login is supported.
|
||||
var loginUnavailableText: some View {
|
||||
Text(ElementL10n.autodiscoverWellKnownError)
|
||||
Text(L10n.screenLoginErrorUnsupportedAuthentication)
|
||||
.font(.body)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -156,9 +156,13 @@ struct Login_Previews: PreviewProvider {
|
||||
|
||||
static var previews: some View {
|
||||
screen(for: LoginViewModel(homeserver: .mockMatrixDotOrg))
|
||||
.previewDisplayName("matrix.org")
|
||||
screen(for: credentialsViewModel)
|
||||
screen(for: LoginViewModel(homeserver: .mockBasicServer))
|
||||
.previewDisplayName("Credentials Entered")
|
||||
screen(for: LoginViewModel(homeserver: .mockOIDC))
|
||||
.previewDisplayName("OIDC")
|
||||
screen(for: LoginViewModel(homeserver: .mockUnsupported))
|
||||
.previewDisplayName("Unsupported")
|
||||
}
|
||||
|
||||
static func screen(for viewModel: LoginViewModel) -> some View {
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ struct LoginServerInfoSection: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(ElementL10n.ftueAuthSignInChooseServerHeader)
|
||||
Text(L10n.screenLoginServerHeader)
|
||||
.font(.element.footnote)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.padding(.horizontal, 16)
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ enum MockServerSelectionScreenState: CaseIterable {
|
||||
case .invalidAddress:
|
||||
let viewModel = ServerSelectionViewModel(homeserverAddress: "thisisbad",
|
||||
isModallyPresented: true)
|
||||
viewModel.displayError(.footerMessage(ElementL10n.unknownError))
|
||||
viewModel.displayError(.footerMessage(L10n.errorUnknown))
|
||||
return viewModel
|
||||
case .nonModal:
|
||||
return ServerSelectionViewModel(homeserverAddress: "https://matrix.org",
|
||||
|
||||
+3
-3
@@ -69,7 +69,7 @@ final class ServerSelectionCoordinator: CoordinatorProtocol {
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func startLoading(label: String = ElementL10n.loading) {
|
||||
private func startLoading(label: String = L10n.commonLoading) {
|
||||
userIndicatorController.submitIndicator(UserIndicator(type: .modal,
|
||||
title: label,
|
||||
persistent: true))
|
||||
@@ -101,11 +101,11 @@ final class ServerSelectionCoordinator: CoordinatorProtocol {
|
||||
private func handleError(_ error: AuthenticationServiceError) {
|
||||
switch error {
|
||||
case .invalidServer, .invalidHomeserverAddress:
|
||||
viewModel.displayError(.footerMessage(ElementL10n.loginErrorHomeserverNotFound))
|
||||
viewModel.displayError(.footerMessage(L10n.screenChangeServerErrorInvalidHomeserver))
|
||||
case .slidingSyncNotAvailable:
|
||||
viewModel.displayError(.slidingSyncAlert)
|
||||
default:
|
||||
viewModel.displayError(.footerMessage(ElementL10n.unknownError))
|
||||
viewModel.displayError(.footerMessage(L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ struct ServerSelectionViewState: BindableState {
|
||||
/// The message to be shown in the text field footer when no error has occurred.
|
||||
private let regularFooterMessage = {
|
||||
let linkPlaceholder = "{link}"
|
||||
var message = AttributedString(ElementL10n.serverSelectionServerFooter(linkPlaceholder))
|
||||
var message = AttributedString(L10n.screenChangeServerFormNotice(linkPlaceholder))
|
||||
message.replace(linkPlaceholder,
|
||||
with: ElementL10n.actionLearnMore,
|
||||
with: L10n.actionLearnMore,
|
||||
asLinkTo: ServiceLocator.shared.settings.slidingSyncLearnMoreURL)
|
||||
return message
|
||||
}()
|
||||
@@ -48,7 +48,7 @@ struct ServerSelectionViewState: BindableState {
|
||||
|
||||
/// The title shown on the confirm button.
|
||||
var buttonTitle: String {
|
||||
isModallyPresented ? ElementL10n.continue : ElementL10n.actionNext
|
||||
isModallyPresented ? L10n.actionContinue : L10n.actionNext
|
||||
}
|
||||
|
||||
/// The text field is showing an error.
|
||||
|
||||
+4
-4
@@ -48,10 +48,10 @@ class ServerSelectionViewModel: ServerSelectionViewModelType, ServerSelectionVie
|
||||
case .slidingSyncAlert:
|
||||
let openURL = { UIApplication.shared.open(ServiceLocator.shared.settings.slidingSyncLearnMoreURL) }
|
||||
state.bindings.alertInfo = AlertInfo(id: .slidingSyncAlert,
|
||||
title: ElementL10n.serverSelectionSlidingSyncAlertTitle,
|
||||
message: ElementL10n.serverSelectionSlidingSyncAlertMessage,
|
||||
primaryButton: .init(title: ElementL10n.actionLearnMore, role: .cancel, action: openURL),
|
||||
secondaryButton: .init(title: ElementL10n.actionCancel, action: nil))
|
||||
title: L10n.commonServerNotSupported,
|
||||
message: L10n.screenChangeServerErrorNoSlidingSyncMessage,
|
||||
primaryButton: .init(title: L10n.actionLearnMore, role: .cancel, action: openURL),
|
||||
secondaryButton: .init(title: L10n.actionCancel, action: nil))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -43,12 +43,12 @@ struct ServerSelectionScreen: View {
|
||||
AuthenticationIconImage(image: Image(asset: Asset.Images.serverSelectionIcon), insets: 19)
|
||||
.padding(.bottom, 8)
|
||||
|
||||
Text(ElementL10n.ftueAuthChooseServerTitle)
|
||||
Text(L10n.commonSelectYourServer)
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
|
||||
Text(ElementL10n.ftueAuthChooseServerSignInSubtitle)
|
||||
Text(L10n.screenChangeServerSubtitle)
|
||||
.font(.element.subheadline)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
@@ -59,8 +59,8 @@ struct ServerSelectionScreen: View {
|
||||
/// The text field and confirm button where the user enters a server URL.
|
||||
var serverForm: some View {
|
||||
VStack(alignment: .leading, spacing: 24) {
|
||||
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress)
|
||||
.textFieldStyle(.elementInput(labelText: Text(ElementL10n.hsUrl),
|
||||
TextField(L10n.commonServerUrl, text: $context.homeserverAddress)
|
||||
.textFieldStyle(.elementInput(labelText: Text(L10n.screenChangeServerFormHeader),
|
||||
footerText: Text(context.viewState.footerMessage),
|
||||
isError: context.viewState.isShowingFooterError,
|
||||
accessibilityIdentifier: A11yIdentifiers.changeServerScreen.server))
|
||||
@@ -85,7 +85,7 @@ struct ServerSelectionScreen: View {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
if context.viewState.isModallyPresented {
|
||||
Button { context.send(viewAction: .dismiss) } label: {
|
||||
Text(ElementL10n.actionCancel)
|
||||
Text(L10n.actionCancel)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.changeServerScreen.dismiss)
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ final class SoftLogoutCoordinator: CoordinatorProtocol {
|
||||
@MainActor private func startLoading() {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.loading,
|
||||
title: L10n.commonLoading,
|
||||
persistent: true))
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ final class SoftLogoutCoordinator: CoordinatorProtocol {
|
||||
Task {
|
||||
switch await authenticationService.login(username: username,
|
||||
password: password,
|
||||
initialDeviceName: UIDevice.current.initialDisplayName,
|
||||
initialDeviceName: UIDevice.current.initialDeviceName,
|
||||
deviceId: parameters.credentials.deviceId) {
|
||||
case .success(let userSession):
|
||||
callback?(.signedIn(userSession))
|
||||
@@ -160,11 +160,11 @@ final class SoftLogoutCoordinator: CoordinatorProtocol {
|
||||
private func handleError(_ error: AuthenticationServiceError) {
|
||||
switch error {
|
||||
case .invalidCredentials:
|
||||
viewModel.displayError(.alert(ElementL10n.authInvalidLoginParam))
|
||||
viewModel.displayError(.alert(L10n.screenLoginErrorInvalidCredentials))
|
||||
case .accountDeactivated:
|
||||
viewModel.displayError(.alert(ElementL10n.authInvalidLoginDeactivatedAccount))
|
||||
viewModel.displayError(.alert(L10n.screenLoginErrorDeactivatedAccount))
|
||||
default:
|
||||
viewModel.displayError(.alert(ElementL10n.unknownError))
|
||||
viewModel.displayError(.alert(L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class SoftLogoutViewModel: SoftLogoutViewModelType, SoftLogoutViewModelProtocol
|
||||
switch type {
|
||||
case .alert(let message):
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
title: L10n.commonError,
|
||||
message: message)
|
||||
case .unknown:
|
||||
state.bindings.alertInfo = AlertInfo(id: type)
|
||||
|
||||
@@ -54,20 +54,20 @@ struct SoftLogoutScreen: View {
|
||||
/// The title, message and icon at the top of the screen.
|
||||
var header: some View {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text(ElementL10n.softLogoutSigninTitle)
|
||||
Text(UntranslatedL10n.softLogoutSigninTitle)
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.title)
|
||||
|
||||
Text(ElementL10n.softLogoutSigninNotice(context.viewState.credentials.homeserverName, context.viewState.credentials.userDisplayName, context.viewState.credentials.userId))
|
||||
Text(UntranslatedL10n.softLogoutSigninNotice(context.viewState.credentials.homeserverName, context.viewState.credentials.userDisplayName, context.viewState.credentials.userId))
|
||||
.font(.element.body)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.message)
|
||||
|
||||
if context.viewState.showRecoverEncryptionKeysMessage {
|
||||
Text(ElementL10n.softLogoutSigninE2eWarningNotice)
|
||||
Text(UntranslatedL10n.softLogoutSigninE2eWarningNotice)
|
||||
.font(.element.body)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -78,7 +78,7 @@ struct SoftLogoutScreen: View {
|
||||
/// The form with text fields for username and password, along with a submit button.
|
||||
var loginForm: some View {
|
||||
VStack(spacing: 14) {
|
||||
SecureField(ElementL10n.loginSignupPasswordHint, text: $context.password)
|
||||
SecureField(L10n.commonPassword, text: $context.password)
|
||||
.focused($isPasswordFocused)
|
||||
.textFieldStyle(.elementInput())
|
||||
.textContentType(.password)
|
||||
@@ -87,7 +87,7 @@ struct SoftLogoutScreen: View {
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.password)
|
||||
|
||||
Button { context.send(viewAction: .forgotPassword) } label: {
|
||||
Text(ElementL10n.ftueAuthForgotPassword)
|
||||
Text(UntranslatedL10n.softLogoutForgotPassword)
|
||||
.font(.element.body)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
@@ -95,7 +95,7 @@ struct SoftLogoutScreen: View {
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.forgotPassword)
|
||||
|
||||
Button(action: submit) {
|
||||
Text(ElementL10n.loginSignupSubmit)
|
||||
Text(L10n.actionNext)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.disabled(!context.viewState.canSubmit)
|
||||
@@ -106,14 +106,14 @@ struct SoftLogoutScreen: View {
|
||||
/// The OIDC button that can be used for login.
|
||||
var oidcButton: some View {
|
||||
Button { context.send(viewAction: .continueWithOIDC) } label: {
|
||||
Text(ElementL10n.loginContinue)
|
||||
Text(L10n.actionContinue)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
}
|
||||
|
||||
/// Text shown if neither password or OIDC login is supported.
|
||||
var loginUnavailableText: some View {
|
||||
Text(ElementL10n.autodiscoverWellKnownError)
|
||||
Text(L10n.screenLoginErrorUnsupportedAuthentication)
|
||||
.font(.body)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -123,13 +123,13 @@ struct SoftLogoutScreen: View {
|
||||
/// The text field and submit button where the user enters an email address.
|
||||
var clearDataForm: some View {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Text(ElementL10n.softLogoutClearDataTitle)
|
||||
Text(UntranslatedL10n.softLogoutClearDataTitle)
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearDataTitle)
|
||||
|
||||
Text(ElementL10n.softLogoutClearDataNotice)
|
||||
Text(UntranslatedL10n.softLogoutClearDataNotice)
|
||||
.font(.element.body)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -137,17 +137,17 @@ struct SoftLogoutScreen: View {
|
||||
.padding(.bottom, 12)
|
||||
|
||||
Button(action: clearData) {
|
||||
Text(ElementL10n.softLogoutClearDataSubmit)
|
||||
Text(UntranslatedL10n.softLogoutClearDataSubmit)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge, color: .element.alert))
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearData)
|
||||
.alert(ElementL10n.softLogoutClearDataDialogTitle,
|
||||
.alert(UntranslatedL10n.softLogoutClearDataDialogTitle,
|
||||
isPresented: $showingClearDataConfirmation) {
|
||||
Button(ElementL10n.actionSignOut,
|
||||
Button(L10n.screenSignoutConfirmationDialogSubmit,
|
||||
role: .destructive,
|
||||
action: clearData)
|
||||
} message: {
|
||||
Text(ElementL10n.softLogoutClearDataDialogContent)
|
||||
Text(UntranslatedL10n.softLogoutClearDataDialogContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ final class BugReportCoordinator: CoordinatorProtocol {
|
||||
case .cancel:
|
||||
self.completion?(.cancel)
|
||||
case let .submitStarted(progressTracker):
|
||||
self.startLoading(label: ElementL10n.sending, progressPublisher: progressTracker)
|
||||
self.startLoading(label: L10n.commonSending, progressPublisher: progressTracker)
|
||||
case .submitFinished:
|
||||
self.stopLoading()
|
||||
self.completion?(.finish)
|
||||
@@ -80,7 +80,7 @@ final class BugReportCoordinator: CoordinatorProtocol {
|
||||
|
||||
static let loadingIndicatorIdentifier = "BugReportLoading"
|
||||
|
||||
private func startLoading(label: String = ElementL10n.loading, progressPublisher: ProgressPublisher) {
|
||||
private func startLoading(label: String = L10n.commonLoading, progressPublisher: ProgressPublisher) {
|
||||
parameters.userIndicatorController?.submitIndicator(
|
||||
UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
|
||||
@@ -33,7 +33,7 @@ struct BugReportScreen: View {
|
||||
}
|
||||
.scrollDismissesKeyboard(.immediately)
|
||||
.compoundForm()
|
||||
.navigationTitle(ElementL10n.bugReportScreenTitle)
|
||||
.navigationTitle(L10n.commonReportABug)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
.interactiveDismissDisabled()
|
||||
@@ -51,15 +51,15 @@ struct BugReportScreen: View {
|
||||
|
||||
private var textFieldSection: some View {
|
||||
Section {
|
||||
TextField(ElementL10n.bugReportScreenEditorPlaceholder,
|
||||
TextField(L10n.screenBugReportEditorPlaceholder,
|
||||
text: $context.reportText,
|
||||
prompt: Text(ElementL10n.bugReportScreenEditorPlaceholder).compoundFormTextFieldPlaceholder(),
|
||||
prompt: Text(L10n.screenBugReportEditorPlaceholder).compoundFormTextFieldPlaceholder(),
|
||||
axis: .vertical)
|
||||
.lineLimit(4, reservesSpace: true)
|
||||
.textFieldStyle(.compoundForm)
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.report)
|
||||
} footer: {
|
||||
Text(ElementL10n.bugReportScreenDescription)
|
||||
Text(L10n.screenBugReportEditorDescription)
|
||||
.compoundFormSectionFooter()
|
||||
}
|
||||
.compoundFormSection()
|
||||
@@ -67,11 +67,11 @@ struct BugReportScreen: View {
|
||||
|
||||
private var sendLogsSection: some View {
|
||||
Section {
|
||||
Toggle(ElementL10n.bugReportScreenIncludeLogs, isOn: $context.sendingLogsEnabled)
|
||||
Toggle(L10n.screenBugReportIncludeLogs, isOn: $context.sendingLogsEnabled)
|
||||
.toggleStyle(.compoundForm)
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.sendLogs)
|
||||
} footer: {
|
||||
Text(ElementL10n.bugReportScreenLogsDescription)
|
||||
Text(L10n.screenBugReportLogsDescription)
|
||||
.compoundFormSectionFooter()
|
||||
}
|
||||
.compoundFormSection()
|
||||
@@ -83,7 +83,7 @@ struct BugReportScreen: View {
|
||||
PhotosPicker(selection: $selectedScreenshot,
|
||||
matching: .screenshots,
|
||||
photoLibrary: .shared()) {
|
||||
Label(context.viewState.screenshot == nil ? ElementL10n.bugReportScreenAttachScreenshot : ElementL10n.bugReportScreenEditScreenshot, systemImage: "camera")
|
||||
Label(context.viewState.screenshot == nil ? L10n.screenBugReportAttachScreenshot : L10n.screenBugReportEditScreenshot, systemImage: "camera")
|
||||
}
|
||||
.buttonStyle(.compoundForm())
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.attachScreenshot)
|
||||
@@ -113,14 +113,14 @@ struct BugReportScreen: View {
|
||||
private var toolbar: some ToolbarContent {
|
||||
if context.viewState.isModallyPresented {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button(ElementL10n.actionCancel) {
|
||||
Button(L10n.actionCancel) {
|
||||
context.send(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button(ElementL10n.actionSend) {
|
||||
Button(L10n.actionSend) {
|
||||
context.send(viewAction: .submit)
|
||||
}
|
||||
.disabled(context.reportText.count < 5)
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ struct DeveloperOptionsScreenScreen: View {
|
||||
.overlay(effectsView)
|
||||
.scrollContentBackground(.hidden)
|
||||
.background(Color.element.formBackground.ignoresSafeArea())
|
||||
.navigationTitle(ElementL10n.settingsDeveloperOptions)
|
||||
.navigationTitle(L10n.commonDeveloperOptions)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
||||
|
||||
@@ -38,21 +38,21 @@ struct EmojiPickerEmojiCategoryViewData: Identifiable {
|
||||
var name: String {
|
||||
switch id {
|
||||
case "people":
|
||||
return ElementL10n.emojiPickerPeopleCategory
|
||||
return L10n.emojiPickerCategoryPeople
|
||||
case "nature":
|
||||
return ElementL10n.emojiPickerNatureCategory
|
||||
return L10n.emojiPickerCategoryNature
|
||||
case "foods":
|
||||
return ElementL10n.emojiPickerFoodsCategory
|
||||
return L10n.emojiPickerCategoryFoods
|
||||
case "activity":
|
||||
return ElementL10n.emojiPickerActivityCategory
|
||||
return L10n.emojiPickerCategoryActivity
|
||||
case "places":
|
||||
return ElementL10n.emojiPickerPlacesCategory
|
||||
return L10n.emojiPickerCategoryPlaces
|
||||
case "objects":
|
||||
return ElementL10n.emojiPickerObjectsCategory
|
||||
return L10n.emojiPickerCategoryObjects
|
||||
case "symbols":
|
||||
return ElementL10n.emojiPickerSymbolsCategory
|
||||
return L10n.emojiPickerCategorySymbols
|
||||
case "flags":
|
||||
return ElementL10n.emojiPickerFlagsCategory
|
||||
return L10n.emojiPickerCategoryFlags
|
||||
default:
|
||||
MXLog.failure("Missing translation for emoji category with id \(id)")
|
||||
return ""
|
||||
|
||||
@@ -41,7 +41,7 @@ struct EmojiPickerScreen: View {
|
||||
}
|
||||
.padding(.horizontal, 6)
|
||||
}
|
||||
.navigationTitle(ElementL10n.reactions)
|
||||
.navigationTitle(L10n.commonReactions)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
.searchable(text: $searchString)
|
||||
@@ -55,7 +55,7 @@ struct EmojiPickerScreen: View {
|
||||
var toolbar: some ToolbarContent {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button { context.send(viewAction: .dismiss) } label: {
|
||||
Text(ElementL10n.actionCancel)
|
||||
Text(L10n.actionCancel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,9 +161,9 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
|
||||
func presentCrashedLastRunAlert() {
|
||||
state.bindings.alertInfo = AlertInfo(id: UUID(),
|
||||
title: ElementL10n.sendBugReportAppCrashed,
|
||||
primaryButton: .init(title: ElementL10n.iosNo, action: nil),
|
||||
secondaryButton: .init(title: ElementL10n.iosYes) { [weak self] in
|
||||
title: L10n.crashDetectionDialogContent(InfoPlistReader.main.bundleDisplayName),
|
||||
primaryButton: .init(title: L10n.actionNo, action: nil),
|
||||
secondaryButton: .init(title: L10n.actionYes) { [weak self] in
|
||||
self?.callback?(.presentFeedbackScreen)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ struct HomeScreen: View {
|
||||
.animation(.elementDefault, value: context.viewState.showSessionVerificationBanner)
|
||||
.animation(.elementDefault, value: context.viewState.roomListMode)
|
||||
.alert(item: $context.alertInfo) { $0.alert }
|
||||
.navigationTitle(ElementL10n.allChats)
|
||||
.navigationTitle(L10n.screenRoomlistMainSpaceTitle)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
userMenuButton
|
||||
@@ -118,22 +118,22 @@ struct HomeScreen: View {
|
||||
Menu {
|
||||
Section {
|
||||
Button(action: settings) {
|
||||
Label(ElementL10n.settings, systemImage: "gearshape")
|
||||
Label(L10n.commonSettings, systemImage: "gearshape")
|
||||
}
|
||||
}
|
||||
Section {
|
||||
Button(action: inviteFriends) {
|
||||
Label(ElementL10n.actionInvite, systemImage: "square.and.arrow.up")
|
||||
Label(L10n.actionInvite, systemImage: "square.and.arrow.up")
|
||||
}
|
||||
Button(action: feedback) {
|
||||
Label(ElementL10n.bugReportScreenTitle, systemImage: "questionmark.circle")
|
||||
Label(L10n.actionReportBug, systemImage: "questionmark.circle")
|
||||
}
|
||||
}
|
||||
Section {
|
||||
Button(role: .destructive) {
|
||||
showingLogoutConfirmation = true
|
||||
} label: {
|
||||
Label(ElementL10n.actionSignOut, systemImage: "rectangle.portrait.and.arrow.right")
|
||||
Label(L10n.screenSignoutPreferenceItem, systemImage: "rectangle.portrait.and.arrow.right")
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
@@ -144,15 +144,15 @@ struct HomeScreen: View {
|
||||
imageProvider: context.imageProvider)
|
||||
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
|
||||
}
|
||||
.alert(ElementL10n.actionSignOut,
|
||||
.alert(L10n.screenSignoutConfirmationDialogTitle,
|
||||
isPresented: $showingLogoutConfirmation) {
|
||||
Button(ElementL10n.actionSignOut,
|
||||
Button(L10n.screenSignoutConfirmationDialogSubmit,
|
||||
role: .destructive,
|
||||
action: signOut)
|
||||
} message: {
|
||||
Text(ElementL10n.actionSignOutConfirmationSimple)
|
||||
Text(L10n.screenSignoutConfirmationDialogContent)
|
||||
}
|
||||
.accessibilityLabel(ElementL10n.a11yAllChatsUserAvatarMenu)
|
||||
.accessibilityLabel(L10n.a11yUserMenu)
|
||||
}
|
||||
|
||||
private var newRoomButton: some View {
|
||||
@@ -165,7 +165,7 @@ struct HomeScreen: View {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
HStack(spacing: 16) {
|
||||
Text(ElementL10n.sessionVerificationBannerTitle)
|
||||
Text(L10n.sessionVerificationBannerTitle)
|
||||
.font(.element.headline)
|
||||
.foregroundColor(.element.systemPrimaryLabel)
|
||||
|
||||
@@ -179,12 +179,12 @@ struct HomeScreen: View {
|
||||
.frame(width: 12, height: 12)
|
||||
}
|
||||
}
|
||||
Text(ElementL10n.sessionVerificationBannerMessage)
|
||||
Text(L10n.sessionVerificationBannerMessage)
|
||||
.font(.element.subheadline)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
}
|
||||
|
||||
Button(ElementL10n.continue) {
|
||||
Button(L10n.actionContinue) {
|
||||
context.send(viewAction: .verifySession)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
@@ -138,7 +138,7 @@ struct HomeScreenRoomCell: View {
|
||||
.lastMessageFormatting()
|
||||
.redacted(reason: .placeholder)
|
||||
case .unknown:
|
||||
Text(ElementL10n.message)
|
||||
Text(L10n.commonMessage)
|
||||
.lastMessageFormatting()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ struct OnboardingViewState: BindableState {
|
||||
|
||||
init() {
|
||||
content = [
|
||||
OnboardingPageContent(title: ElementL10n.ftueAuthCarouselWelcomeTitle.tinting(".", color: .element.accent),
|
||||
message: ElementL10n.ftueAuthCarouselWelcomeBody(InfoPlistReader.main.bundleDisplayName),
|
||||
OnboardingPageContent(title: L10n.screenOnboardingWelcomeTitle.tinting(".", color: .element.accent),
|
||||
message: L10n.screenOnboardingWelcomeSubtitle(InfoPlistReader.main.bundleDisplayName),
|
||||
image: Asset.Images.onboardingAppLogo)
|
||||
]
|
||||
bindings = OnboardingBindings()
|
||||
|
||||
@@ -91,7 +91,7 @@ struct OnboardingScreen: View {
|
||||
var buttons: some View {
|
||||
VStack(spacing: 12) {
|
||||
Button { context.send(viewAction: .login) } label: {
|
||||
Text(ElementL10n.loginContinue)
|
||||
Text(L10n.actionContinue)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.accessibilityIdentifier(A11yIdentifiers.onboardingScreen.signIn)
|
||||
|
||||
@@ -27,7 +27,7 @@ class InviteFriendsCoordinator: CoordinatorProtocol {
|
||||
guard let permalink = try? PermalinkBuilder.permalinkTo(userIdentifier: userId).absoluteString else {
|
||||
return AnyView(EmptyView())
|
||||
}
|
||||
let shareText = ElementL10n.inviteFriendsText(InfoPlistReader.main.bundleDisplayName, permalink)
|
||||
let shareText = L10n.inviteFriendsText(InfoPlistReader.main.bundleDisplayName, permalink)
|
||||
|
||||
return AnyView(UIActivityViewControllerWrapper(activityItems: [shareText])
|
||||
.presentationDetents([.medium])
|
||||
|
||||
@@ -75,7 +75,7 @@ final class ReportContentCoordinator: CoordinatorProtocol {
|
||||
parameters.userIndicatorController?.submitIndicator(
|
||||
UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.sending,
|
||||
title: L10n.commonSending,
|
||||
persistent: true)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ReportContentScreen: View {
|
||||
}
|
||||
.scrollDismissesKeyboard(.immediately)
|
||||
.background(Color.element.formBackground.ignoresSafeArea())
|
||||
.navigationTitle(ElementL10n.reportContent)
|
||||
.navigationTitle(L10n.actionReportContent)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
.interactiveDismissDisabled()
|
||||
@@ -48,25 +48,25 @@ struct ReportContentScreen: View {
|
||||
}
|
||||
|
||||
private var infoText: some View {
|
||||
Text(ElementL10n.reportContentInfo)
|
||||
Text(L10n.reportContentExplanation)
|
||||
.font(.element.body)
|
||||
.foregroundColor(Color.element.primaryContent)
|
||||
}
|
||||
|
||||
private var reasonTextEditor: some View {
|
||||
FormTextEditor(text: $context.reasonText, placeholder: ElementL10n.reportContentCustomHint)
|
||||
FormTextEditor(text: $context.reasonText, placeholder: L10n.reportContentHint)
|
||||
}
|
||||
|
||||
@ToolbarContentBuilder
|
||||
private var toolbar: some ToolbarContent {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button(ElementL10n.actionCancel) {
|
||||
Button(L10n.actionCancel) {
|
||||
context.send(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button(ElementL10n.actionSend) {
|
||||
Button(L10n.actionSend) {
|
||||
context.send(viewAction: .submit)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,15 +61,15 @@ struct LeaveRoomAlertItem: AlertItem {
|
||||
}
|
||||
|
||||
let state: RoomState
|
||||
let title = ElementL10n.roomProfileSectionMoreLeave
|
||||
let confirmationTitle = ElementL10n.actionLeave
|
||||
let cancelTitle = ElementL10n.actionCancel
|
||||
let title = L10n.actionLeaveRoom
|
||||
let confirmationTitle = L10n.actionLeave
|
||||
let cancelTitle = L10n.actionCancel
|
||||
|
||||
var subtitle: String {
|
||||
switch state {
|
||||
case .empty: return ElementL10n.roomDetailsLeaveEmptyRoomAlertSubtitle
|
||||
case .private: return ElementL10n.roomDetailsLeavePrivateRoomAlertSubtitle
|
||||
case .public: return ElementL10n.roomDetailsLeaveRoomAlertSubtitle
|
||||
case .empty: return L10n.leaveRoomAlertEmptySubtitle
|
||||
case .private: return L10n.leaveRoomAlertPrivateSubtitle
|
||||
case .public: return L10n.leaveRoomAlertSubtitle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class RoomDetailsViewModel: RoomDetailsViewModelType, RoomDetailsViewModelProtoc
|
||||
self.members = members
|
||||
case .failure(let error):
|
||||
MXLog.error("Failed retrieving room members: \(error)")
|
||||
state.bindings.alertInfo = AlertInfo(id: .alert(ElementL10n.unknownError))
|
||||
state.bindings.alertInfo = AlertInfo(id: .alert(L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,14 +80,14 @@ class RoomDetailsViewModel: RoomDetailsViewModelType, RoomDetailsViewModelProtoc
|
||||
private func copyRoomLink() {
|
||||
if let roomLink = state.permalink {
|
||||
UIPasteboard.general.url = roomLink
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.linkCopiedToClipboard))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonLinkCopiedToClipboard))
|
||||
} else {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.unknownError))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
|
||||
private func leaveRoom() async {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.leaveRoomLoadingID, type: .modal, title: ElementL10n.loading, persistent: true))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Self.leaveRoomLoadingID, type: .modal, title: L10n.commonLoading, persistent: true))
|
||||
let result = await roomProxy.leaveRoom()
|
||||
ServiceLocator.shared.userIndicatorController.retractIndicatorWithId(Self.leaveRoomLoadingID)
|
||||
switch result {
|
||||
|
||||
@@ -69,12 +69,12 @@ struct RoomDetailsScreen: View {
|
||||
Button { context.send(viewAction: .copyRoomLink) } label: {
|
||||
Image(systemName: "link")
|
||||
}
|
||||
.buttonStyle(FormActionButtonStyle(title: ElementL10n.actionCopyLink))
|
||||
.buttonStyle(FormActionButtonStyle(title: L10n.actionCopyLink))
|
||||
|
||||
ShareLink(item: permalink) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
}
|
||||
.buttonStyle(FormActionButtonStyle(title: ElementL10n.inviteUsersToRoomActionInvite.capitalized))
|
||||
.buttonStyle(FormActionButtonStyle(title: L10n.actionInvite))
|
||||
}
|
||||
.padding(.top, 32)
|
||||
}
|
||||
@@ -91,7 +91,7 @@ struct RoomDetailsScreen: View {
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.footnote)
|
||||
} header: {
|
||||
Text(ElementL10n.roomSettingsTopic)
|
||||
Text(L10n.commonTopic)
|
||||
.formSectionHeader()
|
||||
}
|
||||
.formSectionStyle()
|
||||
@@ -112,7 +112,7 @@ struct RoomDetailsScreen: View {
|
||||
.font(.element.body)
|
||||
}
|
||||
} label: {
|
||||
Label(ElementL10n.bottomActionPeople, systemImage: "person")
|
||||
Label(L10n.commonPeople, systemImage: "person")
|
||||
}
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: context.viewState.isLoadingMembers ? nil : .navigationLink))
|
||||
@@ -120,7 +120,7 @@ struct RoomDetailsScreen: View {
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
|
||||
.disabled(context.viewState.isLoadingMembers)
|
||||
} header: {
|
||||
Text(ElementL10n.roomDetailsAboutSectionTitle)
|
||||
Text(L10n.commonAbout)
|
||||
.formSectionHeader()
|
||||
}
|
||||
.formSectionStyle()
|
||||
@@ -131,8 +131,8 @@ struct RoomDetailsScreen: View {
|
||||
HStack(alignment: .top) {
|
||||
Label {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(ElementL10n.encryptionEnabled)
|
||||
Text(ElementL10n.encryptionEnabledTileDescription)
|
||||
Text(L10n.screenRoomDetailsEncryptionEnabledTitle)
|
||||
Text(L10n.screenRoomDetailsEncryptionEnabledSubtitle)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.footnote)
|
||||
}
|
||||
@@ -147,7 +147,7 @@ struct RoomDetailsScreen: View {
|
||||
.foregroundColor(.element.quaternaryContent)
|
||||
}
|
||||
} header: {
|
||||
Text(ElementL10n.roomProfileSectionSecurity)
|
||||
Text(L10n.commonSecurity)
|
||||
.formSectionHeader()
|
||||
}
|
||||
.formSectionStyle()
|
||||
@@ -158,7 +158,7 @@ struct RoomDetailsScreen: View {
|
||||
Button(role: .destructive) {
|
||||
context.send(viewAction: .processTapLeave)
|
||||
} label: {
|
||||
Label(ElementL10n.roomProfileSectionMoreLeave, systemImage: "door.right.hand.open")
|
||||
Label(L10n.actionLeaveRoom, systemImage: "door.right.hand.open")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: nil))
|
||||
}
|
||||
|
||||
@@ -41,26 +41,26 @@ struct IgnoreUserAlertItem: AlertItem {
|
||||
}
|
||||
|
||||
let action: Action
|
||||
let cancelTitle = ElementL10n.actionCancel
|
||||
let cancelTitle = L10n.actionCancel
|
||||
|
||||
var title: String {
|
||||
switch action {
|
||||
case .ignore: return ElementL10n.roomMemberDetailsBlockUser
|
||||
case .unignore: return ElementL10n.roomMemberDetailsUnblockUser
|
||||
case .ignore: return L10n.screenRoomMemberDetailsBlockUser
|
||||
case .unignore: return L10n.screenRoomMemberDetailsUnblockUser
|
||||
}
|
||||
}
|
||||
|
||||
var confirmationTitle: String {
|
||||
switch action {
|
||||
case .ignore: return ElementL10n.roomMemberDetailsBlockAlertAction
|
||||
case .unignore: return ElementL10n.roomMemberDetailsUnblockAlertAction
|
||||
case .ignore: return L10n.screenRoomMemberDetailsBlockAlertAction
|
||||
case .unignore: return L10n.screenRoomMemberDetailsUnblockAlertAction
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
switch action {
|
||||
case .ignore: return ElementL10n.roomMemberDetailsBlockAlertDescription
|
||||
case .unignore: return ElementL10n.roomMemberDetailsUnblockAlertDescription
|
||||
case .ignore: return L10n.screenRoomMemberDetailsBlockAlertDescription
|
||||
case .unignore: return L10n.screenRoomMemberDetailsUnblockAlertDescription
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ class RoomMemberDetailsViewModel: RoomMemberDetailsViewModelType, RoomMemberDeta
|
||||
private func copyUserLink() {
|
||||
if let userLink = state.permalink {
|
||||
UIPasteboard.general.url = userLink
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.linkCopiedToClipboard))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonLinkCopiedToClipboard))
|
||||
} else {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: ElementL10n.unknownError))
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(title: L10n.errorUnknown))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,12 +59,12 @@ struct RoomMemberDetailsScreen: View {
|
||||
Button { context.send(viewAction: .copyUserLink) } label: {
|
||||
Image(systemName: "link")
|
||||
}
|
||||
.buttonStyle(FormActionButtonStyle(title: ElementL10n.actionCopyLink))
|
||||
.buttonStyle(FormActionButtonStyle(title: L10n.actionCopyLink))
|
||||
|
||||
ShareLink(item: permalink) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
}
|
||||
.buttonStyle(FormActionButtonStyle(title: ElementL10n.actionShareLink))
|
||||
.buttonStyle(FormActionButtonStyle(title: L10n.actionShareLink))
|
||||
}
|
||||
.padding(.top, 32)
|
||||
}
|
||||
@@ -79,14 +79,14 @@ struct RoomMemberDetailsScreen: View {
|
||||
Button {
|
||||
context.send(viewAction: .showUnblockAlert)
|
||||
} label: {
|
||||
Label(ElementL10n.roomMemberDetailsUnblockUser, systemImage: "slash.circle")
|
||||
Label(L10n.screenRoomMemberDetailsUnblockUser, systemImage: "slash.circle")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: nil))
|
||||
} else {
|
||||
Button(role: .destructive) {
|
||||
context.send(viewAction: .showBlockAlert)
|
||||
} label: {
|
||||
Label(ElementL10n.roomMemberDetailsBlockUser, systemImage: "slash.circle")
|
||||
Label(L10n.screenRoomMemberDetailsBlockUser, systemImage: "slash.circle")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: nil))
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ struct RoomMembersListScreen: View {
|
||||
.id(member.id)
|
||||
}
|
||||
} header: {
|
||||
Text(ElementL10n.roomTitleMembers(context.viewState.members.count))
|
||||
Text(L10n.commonMemberCount(context.viewState.members.count))
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.body)
|
||||
.padding(.vertical, 12)
|
||||
@@ -41,7 +41,7 @@ struct RoomMembersListScreen: View {
|
||||
.searchable(text: $context.searchQuery, placement: .navigationBarDrawer(displayMode: .always))
|
||||
.searchableStyle(.list)
|
||||
.background(Color.element.background.ignoresSafeArea())
|
||||
.navigationTitle(ElementL10n.bottomActionPeople)
|
||||
.navigationTitle(L10n.commonPeople)
|
||||
.alert(item: $context.alertInfo) { $0.alert }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ final class RoomScreenCoordinator: CoordinatorProtocol {
|
||||
switch completion {
|
||||
case .cancel: break
|
||||
case .finish:
|
||||
self?.showSuccess(label: ElementL10n.reportContentSubmitted)
|
||||
self?.showSuccess(label: L10n.commonReportSubmitted)
|
||||
}
|
||||
}
|
||||
navigationCoordinator.setRootCoordinator(coordinator)
|
||||
|
||||
@@ -119,7 +119,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
private func paginateBackwards() async {
|
||||
switch await timelineController.paginateBackwards(requestSize: Constants.backPaginationEventLimit, untilNumberOfItems: Constants.backPaginationPageSize) {
|
||||
case .failure:
|
||||
displayError(.toast(ElementL10n.roomTimelineBackpaginationFailure))
|
||||
displayError(.toast(L10n.errorFailedLoadingMessages))
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -224,7 +224,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
switch type {
|
||||
case .alert(let message):
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
title: L10n.commonError,
|
||||
message: message)
|
||||
case .toast(let message):
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(UserIndicator(id: Constants.toastErrorID,
|
||||
@@ -298,7 +298,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
let permalink = try PermalinkBuilder.permalinkTo(eventIdentifier: item.id, roomIdentifier: timelineController.roomID)
|
||||
UIPasteboard.general.url = permalink
|
||||
} catch {
|
||||
displayError(.alert(ElementL10n.roomTimelinePermalinkCreationFailure))
|
||||
displayError(.alert(L10n.errorFailedCreatingThePermalink))
|
||||
}
|
||||
case .redact:
|
||||
Task {
|
||||
|
||||
@@ -34,7 +34,7 @@ struct MessageComposer: View {
|
||||
VStack(alignment: .leading, spacing: -6) {
|
||||
header
|
||||
HStack(alignment: .bottom) {
|
||||
MessageComposerTextField(placeholder: ElementL10n.roomMessagePlaceholder,
|
||||
MessageComposerTextField(placeholder: L10n.richTextEditorComposerPlaceholder,
|
||||
text: $text,
|
||||
focused: $focused,
|
||||
isMultiline: $isMultiline,
|
||||
@@ -94,14 +94,14 @@ struct MessageComposer: View {
|
||||
Image(systemName: "checkmark")
|
||||
.opacity(type.isEdit ? 1 : 0)
|
||||
.fontWeight(.medium)
|
||||
.accessibilityLabel(ElementL10n.actionConfirm)
|
||||
.accessibilityLabel(L10n.actionConfirm)
|
||||
.accessibilityHidden(!type.isEdit)
|
||||
Image(asset: Asset.Images.timelineComposerSendMessage)
|
||||
.resizable()
|
||||
.frame(width: sendButtonIconSize, height: sendButtonIconSize)
|
||||
.padding(EdgeInsets(top: 7, leading: 8, bottom: 7, trailing: 6))
|
||||
.opacity(type.isEdit ? 0 : 1)
|
||||
.accessibilityLabel(ElementL10n.actionSend)
|
||||
.accessibilityLabel(L10n.actionSend)
|
||||
.accessibilityHidden(type.isEdit)
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ private struct MessageComposerReplyHeader: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
Label(ElementL10n.roomTimelineReplyingTo(displayName), systemImage: "arrowshape.turn.up.left")
|
||||
Label(L10n.commonReplyingTo(displayName), systemImage: "arrowshape.turn.up.left")
|
||||
.labelStyle(MessageComposerHeaderLabelStyle())
|
||||
Spacer()
|
||||
Button(action: action) {
|
||||
@@ -140,7 +140,7 @@ private struct MessageComposerEditHeader: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
Label(ElementL10n.roomTimelineEditing, systemImage: "pencil.line")
|
||||
Label(L10n.commonEditing, systemImage: "pencil.line")
|
||||
.labelStyle(MessageComposerHeaderLabelStyle())
|
||||
Spacer()
|
||||
Button(action: action) {
|
||||
|
||||
@@ -111,7 +111,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
content()
|
||||
|
||||
if timelineItem.properties.isEdited {
|
||||
Text(ElementL10n.editedSuffix)
|
||||
Text(L10n.commonEditedSuffix)
|
||||
.font(.element.caption2)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ struct TimelineItemPlainStylerView<Content: View>: View {
|
||||
private var supplementaryViews: some View {
|
||||
VStack {
|
||||
if timelineItem.properties.isEdited {
|
||||
Text(ElementL10n.editedSuffix)
|
||||
Text(L10n.commonEditedSuffix)
|
||||
.font(.element.footnote)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ struct CollapsibleRoomTimelineView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
DisclosureGroup(ElementL10n.roomTimelineStateChanges(timelineItem.items.count),
|
||||
isExpanded: $isExpanded) {
|
||||
DisclosureGroup(L10n.roomTimelineStateChanges(timelineItem.items.count), isExpanded: $isExpanded) {
|
||||
Group {
|
||||
ForEach(timelineViews) { timelineView in
|
||||
timelineView.body
|
||||
|
||||
@@ -41,7 +41,7 @@ struct ImageRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ struct ImageRoomTimelineView: View {
|
||||
@ViewBuilder
|
||||
var overlay: some View {
|
||||
if timelineItem.contentType == .gif {
|
||||
Text(ElementL10n.roomTimelineImageGif)
|
||||
Text(L10n.commonGif)
|
||||
.font(.element.bodyBold)
|
||||
.foregroundStyle(.primary)
|
||||
.padding(.horizontal, 10)
|
||||
|
||||
@@ -22,7 +22,7 @@ struct ReadMarkerRoomTimelineView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .trailing, spacing: 2) {
|
||||
Text(ElementL10n.roomTimelineReadMarkerTitle)
|
||||
Text(L10n.roomTimelineReadMarkerTitle)
|
||||
.textCase(.uppercase)
|
||||
.font(.element.caption2Bold)
|
||||
.foregroundColor(.element.quaternaryContent)
|
||||
|
||||
@@ -34,7 +34,7 @@ struct RedactedRoomTimelineView_Previews: PreviewProvider {
|
||||
|
||||
static var previews: some View {
|
||||
VStack(alignment: .leading, spacing: 20.0) {
|
||||
RedactedRoomTimelineView(timelineItem: itemWith(text: ElementL10n.eventRedacted,
|
||||
RedactedRoomTimelineView(timelineItem: itemWith(text: L10n.commonMessageRemoved,
|
||||
timestamp: "Later",
|
||||
senderId: "Anne"))
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ struct StickerRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ struct TimelineStartRoomTimelineView: View {
|
||||
}
|
||||
|
||||
var title: String {
|
||||
var text = ElementL10n.thisIsTheBeginningOfRoomNoName
|
||||
var text = L10n.roomTimelineBeginningOfRoomNoName
|
||||
if let name = timelineItem.name {
|
||||
text = ElementL10n.thisIsTheBeginningOfRoom(name)
|
||||
text = L10n.roomTimelineBeginningOfRoom(name)
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ struct VideoRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,43 +74,43 @@ public struct TimelineItemContextMenu: View {
|
||||
switch action {
|
||||
case .react:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.reactions, systemImage: "face.smiling")
|
||||
Label(L10n.commonReactions, systemImage: "face.smiling")
|
||||
}
|
||||
case .copy:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.actionCopy, systemImage: "doc.on.doc")
|
||||
Label(L10n.actionCopy, systemImage: "doc.on.doc")
|
||||
}
|
||||
case .edit:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.edit, systemImage: "pencil.line")
|
||||
Label(L10n.actionEdit, systemImage: "pencil.line")
|
||||
}
|
||||
case .quote:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.actionQuote, systemImage: "quote.bubble")
|
||||
Label(L10n.actionQuote, systemImage: "quote.bubble")
|
||||
}
|
||||
case .copyPermalink:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.permalink, systemImage: "link")
|
||||
Label(L10n.commonPermalink, systemImage: "link")
|
||||
}
|
||||
case .reply:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.reply, systemImage: "arrowshape.turn.up.left")
|
||||
Label(L10n.actionReply, systemImage: "arrowshape.turn.up.left")
|
||||
}
|
||||
case .redact:
|
||||
Button(role: .destructive) { send(action) } label: {
|
||||
Label(ElementL10n.actionRemove, systemImage: "trash")
|
||||
Label(L10n.actionRemove, systemImage: "trash")
|
||||
}
|
||||
case .viewSource:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.viewSource, systemImage: "doc.text.below.ecg")
|
||||
Label(L10n.actionViewSource, systemImage: "doc.text.below.ecg")
|
||||
}
|
||||
case .retryDecryption:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.roomTimelineContextMenuRetryDecryption, systemImage: "arrow.down.message")
|
||||
Label(L10n.actionRetryDecryption, systemImage: "arrow.down.message")
|
||||
}
|
||||
case .report:
|
||||
Button(role: .destructive) { send(action) } label: {
|
||||
Label(ElementL10n.reportContent, systemImage: "exclamationmark.bubble")
|
||||
Label(L10n.actionReportContent, systemImage: "exclamationmark.bubble")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,12 +40,12 @@ struct TimelineItemDebugView: View {
|
||||
.navigationTitle(info.title)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button(ElementL10n.actionCancel) {
|
||||
Button(L10n.actionCancel) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
ToolbarItem(placement: .secondaryAction) {
|
||||
Button(ElementL10n.actionCopy) {
|
||||
Button(L10n.actionCopy) {
|
||||
UIPasteboard.general.string = info.content
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,54 +26,54 @@ struct SessionVerificationViewState: BindableState {
|
||||
var title: String? {
|
||||
switch verificationState {
|
||||
case .initial:
|
||||
return ElementL10n.verificationOpenOtherToVerifyTitle
|
||||
return L10n.screenSessionVerificationOpenExistingSessionTitle
|
||||
case .requestingVerification:
|
||||
return ElementL10n.verificationRequestWaitingAcceptRequestTitle
|
||||
return L10n.screenSessionVerificationWaitingToAcceptTitle
|
||||
case .verificationRequestAccepted:
|
||||
return ElementL10n.verificationCompareEmojisTitle
|
||||
return L10n.screenSessionVerificationCompareEmojisTitle
|
||||
case .startingSasVerification:
|
||||
return nil
|
||||
case .sasVerificationStarted:
|
||||
return nil
|
||||
case .showingChallenge:
|
||||
return ElementL10n.verificationCompareEmojisTitle
|
||||
return L10n.screenSessionVerificationCompareEmojisTitle
|
||||
case .acceptingChallenge:
|
||||
return ElementL10n.verificationCompareEmojisTitle
|
||||
return L10n.screenSessionVerificationCompareEmojisTitle
|
||||
case .decliningChallenge:
|
||||
return nil
|
||||
case .verified:
|
||||
return ElementL10n.verificationConclusionOkSelfNoticeTitle
|
||||
return L10n.commonVerificationComplete
|
||||
case .cancelling:
|
||||
return nil
|
||||
case .cancelled:
|
||||
return ElementL10n.verificationCancelled
|
||||
return L10n.commonVerificationCancelled
|
||||
}
|
||||
}
|
||||
|
||||
var message: String {
|
||||
switch verificationState {
|
||||
case .initial:
|
||||
return ElementL10n.verificationOpenOtherToVerifyDetail
|
||||
return L10n.screenSessionVerificationOpenExistingSessionSubtitle
|
||||
case .requestingVerification:
|
||||
return ElementL10n.verificationRequestWaitingAcceptRequestDetail
|
||||
return L10n.screenSessionVerificationWaitingToAcceptSubtitle
|
||||
case .verificationRequestAccepted:
|
||||
return ElementL10n.verificationEmojiNotice
|
||||
return L10n.screenSessionVerificationRequestAcceptedSubtitle
|
||||
case .startingSasVerification:
|
||||
return ElementL10n.verificationRequestWaiting
|
||||
return L10n.commonWaiting
|
||||
case .sasVerificationStarted:
|
||||
return ElementL10n.verificationRequestWaiting
|
||||
return L10n.commonWaiting
|
||||
case .acceptingChallenge:
|
||||
return ElementL10n.verificationCompareEmojisDetail
|
||||
return L10n.screenSessionVerificationCompareEmojisSubtitle
|
||||
case .decliningChallenge:
|
||||
return ElementL10n.verificationRequestWaiting
|
||||
return L10n.commonWaiting
|
||||
case .cancelling:
|
||||
return ElementL10n.verificationRequestWaiting
|
||||
return L10n.commonWaiting
|
||||
case .showingChallenge:
|
||||
return ElementL10n.verificationCompareEmojisDetail
|
||||
return L10n.screenSessionVerificationCompareEmojisSubtitle
|
||||
case .verified:
|
||||
return ElementL10n.verificationConclusionOkSelfNotice
|
||||
return L10n.screenSessionVerificationCompleteSubtitle
|
||||
case .cancelled:
|
||||
return ElementL10n.verificationRequestCancelledDetail
|
||||
return L10n.screenSessionVerificationCancelledSubtitle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,14 +106,16 @@ struct SessionVerificationScreen: View {
|
||||
|
||||
@ViewBuilder
|
||||
private func emojisPanel(with emojis: [SessionVerificationEmoji]) -> some View {
|
||||
HStack(spacing: 16) {
|
||||
ForEach(emojis.prefix(4), id: \.self) { emoji in
|
||||
EmojiView(emoji: emoji)
|
||||
VStack(spacing: 32) {
|
||||
HStack(spacing: 16) {
|
||||
ForEach(emojis.prefix(4), id: \.self) { emoji in
|
||||
EmojiView(emoji: emoji)
|
||||
}
|
||||
}
|
||||
}
|
||||
HStack(spacing: 16) {
|
||||
ForEach(emojis.suffix(from: 4), id: \.self) { emoji in
|
||||
EmojiView(emoji: emoji)
|
||||
HStack(spacing: 16) {
|
||||
ForEach(emojis.suffix(from: 4), id: \.self) { emoji in
|
||||
EmojiView(emoji: emoji)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,20 +124,20 @@ struct SessionVerificationScreen: View {
|
||||
private var actionButtons: some View {
|
||||
switch context.viewState.verificationState {
|
||||
case .initial:
|
||||
Button(ElementL10n.startVerification) {
|
||||
Button(L10n.actionStartVerification) {
|
||||
context.send(viewAction: .requestVerification)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.accessibilityIdentifier(A11yIdentifiers.sessionVerificationScreen.requestVerification)
|
||||
|
||||
case .cancelled:
|
||||
Button(ElementL10n.globalRetry) {
|
||||
Button(L10n.actionRetry) {
|
||||
context.send(viewAction: .restart)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
|
||||
case .verificationRequestAccepted:
|
||||
Button(ElementL10n.sessionVerificationStart) {
|
||||
Button(L10n.actionStart) {
|
||||
context.send(viewAction: .startSasVerification)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
@@ -144,12 +146,12 @@ struct SessionVerificationScreen: View {
|
||||
case .showingChallenge:
|
||||
VStack(spacing: 30) {
|
||||
Button { context.send(viewAction: .accept) } label: {
|
||||
Label(ElementL10n.verificationSasMatch, systemImage: "checkmark")
|
||||
Label(L10n.screenSessionVerificationTheyMatch, systemImage: "checkmark")
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.accessibilityIdentifier(A11yIdentifiers.sessionVerificationScreen.acceptChallenge)
|
||||
|
||||
Button(ElementL10n.verificationSasDoNotMatch) {
|
||||
Button(L10n.screenSessionVerificationTheyDontMatch) {
|
||||
context.send(viewAction: .decline)
|
||||
}
|
||||
.font(.element.bodyBold)
|
||||
@@ -162,14 +164,14 @@ struct SessionVerificationScreen: View {
|
||||
HStack(spacing: 16) {
|
||||
ProgressView()
|
||||
.tint(.element.background)
|
||||
Label(ElementL10n.verificationSasMatch, systemImage: "checkmark")
|
||||
Label(L10n.screenSessionVerificationTheyMatch, systemImage: "checkmark")
|
||||
}
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.accessibilityIdentifier(A11yIdentifiers.sessionVerificationScreen.acceptChallenge)
|
||||
.disabled(true)
|
||||
|
||||
Button(ElementL10n.verificationSasDoNotMatch) {
|
||||
Button(L10n.screenSessionVerificationTheyDontMatch) {
|
||||
context.send(viewAction: .decline)
|
||||
}
|
||||
.font(.element.bodyBold)
|
||||
@@ -185,7 +187,7 @@ struct SessionVerificationScreen: View {
|
||||
@ToolbarContentBuilder
|
||||
private var toolbarContent: some ToolbarContent {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button(ElementL10n.actionCancel) {
|
||||
Button(L10n.actionCancel) {
|
||||
context.send(viewAction: .close)
|
||||
}
|
||||
.foregroundColor(.element.accent)
|
||||
@@ -227,11 +229,18 @@ struct SessionVerificationScreen: View {
|
||||
struct SessionVerification_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
sessionVerificationScreen(state: .initial)
|
||||
.previewDisplayName("Initial")
|
||||
sessionVerificationScreen(state: .requestingVerification)
|
||||
.previewDisplayName("Requesting Verification")
|
||||
sessionVerificationScreen(state: .verificationRequestAccepted)
|
||||
.previewDisplayName("Request Accepted")
|
||||
sessionVerificationScreen(state: .cancelled)
|
||||
.previewDisplayName("Cancelled")
|
||||
|
||||
sessionVerificationScreen(state: .showingChallenge(emojis: SessionVerificationControllerProxyMock.emojis))
|
||||
.previewDisplayName("Showing Challenge")
|
||||
sessionVerificationScreen(state: .verified)
|
||||
.previewDisplayName("Verified")
|
||||
}
|
||||
|
||||
static func sessionVerificationScreen(state: SessionVerificationStateMachine.State) -> some View {
|
||||
|
||||
@@ -87,7 +87,7 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
|
||||
coordinator.completion = { [weak self] result in
|
||||
switch result {
|
||||
case .finish:
|
||||
self?.showSuccess(label: ElementL10n.done)
|
||||
self?.showSuccess(label: L10n.actionDone)
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ struct SettingsScreen: View {
|
||||
signOutSection
|
||||
}
|
||||
.compoundForm()
|
||||
.navigationTitle(ElementL10n.settings)
|
||||
.navigationTitle(L10n.commonSettings)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
@@ -49,7 +49,7 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
private var versionText: some View {
|
||||
Text(ElementL10n.settingsVersion + ": " + InfoPlistReader.main.bundleShortVersionString + " (" + InfoPlistReader.main.bundleVersion + ")")
|
||||
Text(L10n.settingsVersionNumber(InfoPlistReader.main.bundleShortVersionString, InfoPlistReader.main.bundleVersion))
|
||||
}
|
||||
|
||||
private var userSection: some View {
|
||||
@@ -79,7 +79,7 @@ struct SettingsScreen: View {
|
||||
private var sessionVerificationSection: some View {
|
||||
Section {
|
||||
Button { context.send(viewAction: .sessionVerification) } label: {
|
||||
Label(ElementL10n.settingsSessionVerification, systemImage: "checkmark.shield")
|
||||
Label(L10n.actionCompleteVerification, systemImage: "checkmark.shield")
|
||||
}
|
||||
.buttonStyle(.compoundForm())
|
||||
}
|
||||
@@ -89,7 +89,7 @@ struct SettingsScreen: View {
|
||||
private var developerOptionsSection: some View {
|
||||
Section {
|
||||
Button { context.send(viewAction: .developerOptions) } label: {
|
||||
Label(ElementL10n.settingsDeveloperOptions, systemImage: "hammer.circle")
|
||||
Label(L10n.commonDeveloperOptions, systemImage: "hammer.circle")
|
||||
}
|
||||
.buttonStyle(.compoundForm(accessory: .navigationLink))
|
||||
.accessibilityIdentifier("sessionVerificationButton")
|
||||
@@ -105,7 +105,7 @@ struct SettingsScreen: View {
|
||||
.tag(style)
|
||||
}
|
||||
} label: {
|
||||
Label(ElementL10n.settingsTimelineStyle, systemImage: "rectangle.grid.1x2")
|
||||
Label(L10n.commonMessageLayout, systemImage: "rectangle.grid.1x2")
|
||||
}
|
||||
.labelStyle(.compoundFormRow())
|
||||
.accessibilityIdentifier("timelineStylePicker")
|
||||
@@ -114,7 +114,7 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
Button { context.send(viewAction: .reportBug) } label: {
|
||||
Label(ElementL10n.sendBugReport, systemImage: "questionmark.circle")
|
||||
Label(L10n.actionReportBug, systemImage: "questionmark.circle")
|
||||
}
|
||||
.buttonStyle(.compoundForm(accessory: .navigationLink))
|
||||
.accessibilityIdentifier("reportBugButton")
|
||||
@@ -125,16 +125,16 @@ struct SettingsScreen: View {
|
||||
private var signOutSection: some View {
|
||||
Section {
|
||||
Button { showingLogoutConfirmation = true } label: {
|
||||
Label(ElementL10n.actionSignOut, systemImage: "rectangle.portrait.and.arrow.right")
|
||||
Label(L10n.screenSignoutPreferenceItem, systemImage: "rectangle.portrait.and.arrow.right")
|
||||
}
|
||||
.buttonStyle(.compoundForm())
|
||||
.accessibilityIdentifier("logoutButton")
|
||||
.alert(ElementL10n.actionSignOut, isPresented: $showingLogoutConfirmation) {
|
||||
Button(ElementL10n.actionSignOut,
|
||||
.alert(L10n.screenSignoutConfirmationDialogTitle, isPresented: $showingLogoutConfirmation) {
|
||||
Button(L10n.screenSignoutConfirmationDialogSubmit,
|
||||
role: .destructive,
|
||||
action: logout)
|
||||
} message: {
|
||||
Text(ElementL10n.actionSignOutConfirmationSimple)
|
||||
Text(L10n.screenSignoutConfirmationDialogContent)
|
||||
}
|
||||
} footer: {
|
||||
VStack {
|
||||
@@ -150,7 +150,7 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
private var doneButton: some View {
|
||||
Button(ElementL10n.done, action: close)
|
||||
Button(L10n.actionDone, action: close)
|
||||
}
|
||||
|
||||
private func close() {
|
||||
@@ -166,9 +166,9 @@ private extension TimelineStyle {
|
||||
var name: String {
|
||||
switch self {
|
||||
case .plain:
|
||||
return ElementL10n.roomTimelineStylePlainLongDescription
|
||||
return L10n.commonModern
|
||||
case .bubbles:
|
||||
return ElementL10n.roomTimelineStyleBubbledLongDescription
|
||||
return L10n.commonBubbles
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ enum StartChatUserSectionType {
|
||||
case .searchResult:
|
||||
return nil
|
||||
case .suggestions:
|
||||
return ElementL10n.directRoomUserListSuggestionsTitle
|
||||
return L10n.commonSuggestions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +66,12 @@ class StartChatViewModel: StartChatViewModelType, StartChatViewModelProtocol {
|
||||
switch type {
|
||||
case .failedRetrievingDirectRoom:
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
message: ElementL10n.retrievingDirectRoomError)
|
||||
title: L10n.commonError,
|
||||
message: L10n.screenStartChatErrorStartingChat)
|
||||
case .failedCreatingRoom:
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: ElementL10n.dialogTitleError,
|
||||
message: ElementL10n.retrievingDirectRoomError)
|
||||
title: L10n.commonError,
|
||||
message: L10n.screenStartChatErrorStartingChat)
|
||||
default:
|
||||
state.bindings.alertInfo = AlertInfo(id: type)
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class StartChatViewModel: StartChatViewModelType, StartChatViewModelProtocol {
|
||||
private func showLoadingIndicator() {
|
||||
userIndicatorController?.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: ElementL10n.loading,
|
||||
title: L10n.commonLoading,
|
||||
persistent: true))
|
||||
}
|
||||
|
||||
|
||||
@@ -29,21 +29,21 @@ struct StartChatScreen: View {
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
.background(Color.element.formBackground.ignoresSafeArea())
|
||||
.navigationTitle(ElementL10n.startChat)
|
||||
.navigationTitle(L10n.actionStartChat)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
closeButton
|
||||
}
|
||||
}
|
||||
.searchable(text: $context.searchQuery, placement: .navigationBarDrawer(displayMode: .always), prompt: ElementL10n.searchForSomeone)
|
||||
.searchable(text: $context.searchQuery, placement: .navigationBarDrawer(displayMode: .always), prompt: L10n.commonSearchForSomeone)
|
||||
.alert(item: $context.alertInfo) { $0.alert }
|
||||
}
|
||||
|
||||
private var createRoomSection: some View {
|
||||
Section {
|
||||
Button(action: createRoom) {
|
||||
Label(ElementL10n.createARoom, systemImage: "person.3")
|
||||
Label(L10n.actionCreateARoom, systemImage: "person.3")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: .navigationLink))
|
||||
}
|
||||
@@ -53,7 +53,7 @@ struct StartChatScreen: View {
|
||||
private var inviteFriendsSection: some View {
|
||||
Section {
|
||||
Button(action: inviteFriends) {
|
||||
Label(ElementL10n.inviteFriendsToElement, systemImage: "square.and.arrow.up")
|
||||
Label(L10n.actionInviteFriendsToApp(InfoPlistReader.main.bundleDisplayName), systemImage: "square.and.arrow.up")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle())
|
||||
.accessibilityIdentifier(A11yIdentifiers.startChatScreen.inviteFriends)
|
||||
@@ -78,7 +78,7 @@ struct StartChatScreen: View {
|
||||
}
|
||||
|
||||
private var closeButton: some View {
|
||||
Button(ElementL10n.actionCancel, action: close)
|
||||
Button(L10n.actionCancel, action: close)
|
||||
.accessibilityIdentifier(A11yIdentifiers.startChatScreen.closeStartChat)
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class NotificationManager: NSObject, NotificationManagerProtocol {
|
||||
|
||||
func start() {
|
||||
let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
|
||||
title: ElementL10n.actionQuickReply,
|
||||
title: L10n.actionQuickReply,
|
||||
options: [])
|
||||
let replyCategory = UNNotificationCategory(identifier: NotificationConstants.Category.reply,
|
||||
actions: [replyAction],
|
||||
|
||||
@@ -30,13 +30,13 @@ struct RoomEventStringBuilder {
|
||||
|
||||
switch eventItemProxy.content.kind() {
|
||||
case .unableToDecrypt:
|
||||
return prefix(ElementL10n.encryptionInformationDecryptionError, with: sender)
|
||||
return prefix(L10n.commonDecryptionError, with: sender)
|
||||
case .redactedMessage:
|
||||
return prefix(ElementL10n.eventRedacted, with: sender)
|
||||
return prefix(L10n.commonMessageRemoved, with: sender)
|
||||
case .sticker:
|
||||
return prefix(ElementL10n.sendASticker, with: sender)
|
||||
return prefix(L10n.commonSticker, with: sender)
|
||||
case .failedToParseMessageLike, .failedToParseState:
|
||||
return prefix(ElementL10n.roomTimelineItemUnsupported, with: sender)
|
||||
return prefix(L10n.commonUnsupportedEvent, with: sender)
|
||||
case .message:
|
||||
guard let messageContent = eventItemProxy.content.asMessage() else { fatalError("Invalid message timeline item: \(eventItemProxy)") }
|
||||
|
||||
@@ -48,11 +48,11 @@ struct RoomEventStringBuilder {
|
||||
return AttributedString("* \(senderDisplayName) \(content.body)")
|
||||
// Message types that should be prefixed with the sender's name.
|
||||
case .image:
|
||||
message = ElementL10n.sentAnImage
|
||||
message = L10n.commonImage
|
||||
case .video:
|
||||
message = ElementL10n.sentAVideo
|
||||
message = L10n.commonVideo
|
||||
case .file:
|
||||
message = ElementL10n.sentAFile
|
||||
message = L10n.commonFile
|
||||
default:
|
||||
message = messageContent.body()
|
||||
}
|
||||
|
||||
+42
-42
@@ -33,42 +33,42 @@ struct RoomStateEventStringBuilder {
|
||||
|
||||
switch change {
|
||||
case .joined:
|
||||
return memberIsYou ? ElementL10n.noticeRoomJoinByYou : ElementL10n.noticeRoomJoin(member)
|
||||
return memberIsYou ? L10n.stateEventRoomJoinByYou : L10n.stateEventRoomJoin(member)
|
||||
case .left:
|
||||
return memberIsYou ? ElementL10n.noticeRoomLeaveByYou : ElementL10n.noticeRoomLeave(member)
|
||||
return memberIsYou ? L10n.stateEventRoomLeaveByYou : L10n.stateEventRoomLeave(member)
|
||||
case .banned, .kickedAndBanned:
|
||||
return senderIsYou ? ElementL10n.noticeRoomBanByYou(member) : ElementL10n.noticeRoomBan(senderName, member)
|
||||
return senderIsYou ? L10n.stateEventRoomBanByYou(member) : L10n.stateEventRoomBan(senderName, member)
|
||||
case .unbanned:
|
||||
return senderIsYou ? ElementL10n.noticeRoomUnbanByYou(member) : ElementL10n.noticeRoomUnban(senderName, member)
|
||||
return senderIsYou ? L10n.stateEventRoomUnbanByYou(member) : L10n.stateEventRoomUnban(senderName, member)
|
||||
case .kicked:
|
||||
return senderIsYou ? ElementL10n.noticeRoomRemoveByYou(member) : ElementL10n.noticeRoomRemove(senderName, member)
|
||||
return senderIsYou ? L10n.stateEventRoomRemoveByYou(member) : L10n.stateEventRoomRemove(senderName, member)
|
||||
case .invited:
|
||||
if senderIsYou {
|
||||
return ElementL10n.noticeRoomInviteByYou(member)
|
||||
return L10n.stateEventRoomInviteByYou(member)
|
||||
} else if memberIsYou {
|
||||
return ElementL10n.noticeRoomInviteYou(senderName)
|
||||
return L10n.stateEventRoomInviteYou(senderName)
|
||||
} else {
|
||||
return ElementL10n.noticeRoomInvite(senderName, member)
|
||||
return L10n.stateEventRoomInvite(senderName, member)
|
||||
}
|
||||
case .invitationAccepted:
|
||||
return memberIsYou ? ElementL10n.noticeRoomInviteAcceptedByYou : ElementL10n.noticeRoomInviteAccepted(member)
|
||||
return memberIsYou ? L10n.stateEventRoomInviteAcceptedByYou : L10n.stateEventRoomInviteAccepted(member)
|
||||
case .invitationRejected:
|
||||
return memberIsYou ? ElementL10n.noticeRoomRejectByYou : ElementL10n.noticeRoomReject(member)
|
||||
return memberIsYou ? L10n.stateEventRoomRejectByYou : L10n.stateEventRoomReject(member)
|
||||
case .invitationRevoked:
|
||||
return senderIsYou ? ElementL10n.noticeRoomThirdPartyRevokedInviteByYou(member) : ElementL10n.noticeRoomThirdPartyRevokedInvite(sender, member)
|
||||
return senderIsYou ? L10n.stateEventRoomThirdPartyRevokedInviteByYou(member) : L10n.stateEventRoomThirdPartyRevokedInvite(sender, member)
|
||||
case .knocked:
|
||||
return memberIsYou ? ElementL10n.noticeRoomKnockByYou : ElementL10n.noticeRoomKnock(member)
|
||||
return memberIsYou ? L10n.stateEventRoomKnockByYou : L10n.stateEventRoomKnock(member)
|
||||
case .knockAccepted:
|
||||
return senderIsYou ? ElementL10n.noticeRoomKnockAcceptedByYou(senderName) : ElementL10n.noticeRoomKnockAccepted(senderName, member)
|
||||
return senderIsYou ? L10n.stateEventRoomKnockAcceptedByYou(senderName) : L10n.stateEventRoomKnockAccepted(senderName, member)
|
||||
case .knockRetracted:
|
||||
return memberIsYou ? ElementL10n.noticeRoomKnockRetractedByYou : ElementL10n.noticeRoomKnockRetracted(member)
|
||||
return memberIsYou ? L10n.stateEventRoomKnockRetractedByYou : L10n.stateEventRoomKnockRetracted(member)
|
||||
case .knockDenied:
|
||||
if senderIsYou {
|
||||
return ElementL10n.noticeRoomKnockDeniedByYou(member)
|
||||
return L10n.stateEventRoomKnockDeniedByYou(member)
|
||||
} else if memberIsYou {
|
||||
return ElementL10n.noticeRoomKnockDeniedYou(senderName)
|
||||
return L10n.stateEventRoomKnockDeniedYou(senderName)
|
||||
} else {
|
||||
return ElementL10n.noticeRoomKnockDenied(senderName, member)
|
||||
return L10n.stateEventRoomKnockDenied(senderName, member)
|
||||
}
|
||||
case .none, .error, .notImplemented: // Not useful information for the user.
|
||||
MXLog.verbose("Filtering timeline item for membership change: \(change)")
|
||||
@@ -86,36 +86,36 @@ struct RoomStateEventStringBuilder {
|
||||
switch (displayNameChanged, avatarChanged, memberIsYou) {
|
||||
case (true, false, false):
|
||||
if let displayName, let previousDisplayName {
|
||||
return ElementL10n.noticeDisplayNameChangedFrom(member, previousDisplayName, displayName)
|
||||
return L10n.stateEventDisplayNameChangedFrom(member, previousDisplayName, displayName)
|
||||
} else if let displayName {
|
||||
return ElementL10n.noticeDisplayNameSet(member, displayName)
|
||||
return L10n.stateEventDisplayNameSet(member, displayName)
|
||||
} else if let previousDisplayName {
|
||||
return ElementL10n.noticeDisplayNameRemoved(member, previousDisplayName)
|
||||
return L10n.stateEventDisplayNameRemoved(member, previousDisplayName)
|
||||
} else {
|
||||
MXLog.error("The display name changed from nil to nil, filtering the item.")
|
||||
return nil
|
||||
}
|
||||
case (false, true, false):
|
||||
return ElementL10n.noticeAvatarUrlChanged(displayName ?? member)
|
||||
return L10n.stateEventAvatarUrlChanged(displayName ?? member)
|
||||
case (true, false, true):
|
||||
if let displayName, let previousDisplayName {
|
||||
return ElementL10n.noticeDisplayNameChangedFromByYou(previousDisplayName, displayName)
|
||||
return L10n.stateEventDisplayNameChangedFromByYou(previousDisplayName, displayName)
|
||||
} else if let displayName {
|
||||
return ElementL10n.noticeDisplayNameSetByYou(displayName)
|
||||
return L10n.stateEventDisplayNameSetByYou(displayName)
|
||||
} else if let previousDisplayName {
|
||||
return ElementL10n.noticeDisplayNameRemovedByYou(previousDisplayName)
|
||||
return L10n.stateEventDisplayNameRemovedByYou(previousDisplayName)
|
||||
} else {
|
||||
MXLog.error("The display name changed from nil to nil, filtering the item.")
|
||||
return nil
|
||||
}
|
||||
case (false, true, true):
|
||||
return ElementL10n.noticeAvatarUrlChangedByYou
|
||||
return L10n.stateEventAvatarUrlChangedByYou
|
||||
case (true, true, _):
|
||||
// When both have changed, get the string for the display name and tack on that the avatar changed too.
|
||||
guard let string = buildProfileChangeString(displayName: displayName, previousDisplayName: previousDisplayName,
|
||||
avatarURLString: nil, previousAvatarURLString: nil,
|
||||
member: member, memberIsYou: memberIsYou) else { return nil }
|
||||
return string + "\n" + ElementL10n.noticeAvatarChangedToo
|
||||
return string + "\n" + L10n.stateEventAvatarChangedToo
|
||||
case (false, false, _):
|
||||
MXLog.error("Nothing changed, shouldn't be possible. Filtering the item.")
|
||||
return nil
|
||||
@@ -130,28 +130,28 @@ struct RoomStateEventStringBuilder {
|
||||
case .roomAvatar(let url):
|
||||
switch (url, isOutgoing) {
|
||||
case (.some, false):
|
||||
return ElementL10n.noticeRoomAvatarChanged(senderName)
|
||||
return L10n.stateEventRoomAvatarChanged(senderName)
|
||||
case (nil, false):
|
||||
return ElementL10n.noticeRoomAvatarRemoved(senderName)
|
||||
return L10n.stateEventRoomAvatarRemoved(senderName)
|
||||
case (.some, true):
|
||||
return ElementL10n.noticeRoomAvatarChangedByYou
|
||||
return L10n.stateEventRoomAvatarChangedByYou
|
||||
case (nil, true):
|
||||
return ElementL10n.noticeRoomAvatarRemovedByYou
|
||||
return L10n.stateEventRoomAvatarRemovedByYou
|
||||
}
|
||||
case .roomCreate:
|
||||
return isOutgoing ? ElementL10n.noticeRoomCreatedByYou : ElementL10n.noticeRoomCreated(senderName)
|
||||
return isOutgoing ? L10n.stateEventRoomCreatedByYou : L10n.stateEventRoomCreated(senderName)
|
||||
case .roomEncryption:
|
||||
return ElementL10n.encryptionEnabled
|
||||
return L10n.commonEncryptionEnabled
|
||||
case .roomName(let name):
|
||||
switch (name, isOutgoing) {
|
||||
case (.some(let name), false):
|
||||
return ElementL10n.noticeRoomNameChanged(senderName, name)
|
||||
return L10n.stateEventRoomNameChanged(senderName, name)
|
||||
case (nil, false):
|
||||
return ElementL10n.noticeRoomNameRemoved(senderName)
|
||||
return L10n.stateEventRoomNameRemoved(senderName)
|
||||
case (.some(let name), true):
|
||||
return ElementL10n.noticeRoomNameChangedByYou(name)
|
||||
return L10n.stateEventRoomNameChangedByYou(name)
|
||||
case (nil, true):
|
||||
return ElementL10n.noticeRoomNameRemovedByYou
|
||||
return L10n.stateEventRoomNameRemovedByYou
|
||||
}
|
||||
case .roomThirdPartyInvite(let displayName):
|
||||
guard let displayName else {
|
||||
@@ -160,20 +160,20 @@ struct RoomStateEventStringBuilder {
|
||||
}
|
||||
|
||||
if isOutgoing {
|
||||
return ElementL10n.noticeRoomThirdPartyInviteByYou(displayName)
|
||||
return L10n.stateEventRoomThirdPartyInviteByYou(displayName)
|
||||
} else {
|
||||
return ElementL10n.noticeRoomThirdPartyInvite(senderName, displayName)
|
||||
return L10n.stateEventRoomThirdPartyInvite(senderName, displayName)
|
||||
}
|
||||
case .roomTopic(let topic):
|
||||
switch (topic, isOutgoing) {
|
||||
case (.some(let topic), false):
|
||||
return ElementL10n.noticeRoomTopicChanged(senderName, topic)
|
||||
return L10n.stateEventRoomTopicChanged(senderName, topic)
|
||||
case (nil, false):
|
||||
return ElementL10n.noticeRoomTopicRemoved(senderName)
|
||||
return L10n.stateEventRoomTopicRemoved(senderName)
|
||||
case (.some(let name), true):
|
||||
return ElementL10n.noticeRoomTopicChangedByYou(name)
|
||||
return L10n.stateEventRoomTopicChangedByYou(name)
|
||||
case (nil, true):
|
||||
return ElementL10n.noticeRoomTopicRemovedByYou
|
||||
return L10n.stateEventRoomTopicRemovedByYou
|
||||
}
|
||||
case .policyRuleRoom, .policyRuleServer, .policyRuleUser: // No strings available.
|
||||
break
|
||||
|
||||
@@ -99,7 +99,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
_ error: String,
|
||||
_ isOutgoing: Bool) -> RoomTimelineItemProtocol {
|
||||
UnsupportedRoomTimelineItem(id: eventItemProxy.id,
|
||||
body: ElementL10n.roomTimelineItemUnsupported,
|
||||
body: L10n.commonUnsupportedEvent,
|
||||
eventType: eventType,
|
||||
error: error,
|
||||
timestamp: eventItemProxy.timestamp.formatted(date: .omitted, time: .shortened),
|
||||
@@ -150,7 +150,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
}
|
||||
|
||||
return EncryptedRoomTimelineItem(id: eventItemProxy.id,
|
||||
body: ElementL10n.roomTimelineUnableToDecrypt,
|
||||
body: L10n.commonUnableToDecrypt,
|
||||
encryptionType: encryptionType,
|
||||
timestamp: eventItemProxy.timestamp.formatted(date: .omitted, time: .shortened),
|
||||
isOutgoing: isOutgoing,
|
||||
@@ -162,7 +162,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
private func buildRedactedTimelineItem(_ eventItemProxy: EventTimelineItemProxy,
|
||||
_ isOutgoing: Bool) -> RoomTimelineItemProtocol {
|
||||
RedactedRoomTimelineItem(id: eventItemProxy.id,
|
||||
body: ElementL10n.eventRedacted,
|
||||
body: L10n.commonMessageRemoved,
|
||||
timestamp: eventItemProxy.timestamp.formatted(date: .omitted, time: .shortened),
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: eventItemProxy.isEditable,
|
||||
|
||||
Reference in New Issue
Block a user