diff --git a/.github/workflows/translations-pr.yml b/.github/workflows/translations-pr.yml
index 3a34e3452..f4e02d5e6 100644
--- a/.github/workflows/translations-pr.yml
+++ b/.github/workflows/translations-pr.yml
@@ -14,8 +14,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- - name: Setup Localazy and Mint
- run: brew install mint localazy/tools/localazy
+ - name: Setup Project
+ run: swift run tools setup-project --ci
- name: Download All Translations
run: swift run tools download-strings --all-languages
@@ -34,4 +34,5 @@ jobs:
base: develop
add-paths: |
*.strings
- *.stringsdict
\ No newline at end of file
+ *.stringsdict
+ Strings.swift
\ No newline at end of file
diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings
index cb46efeec..10889479d 100644
--- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings
+++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings
@@ -3,8 +3,10 @@
"a11y_send_files" = "Send files";
"a11y_show_password" = "Show password";
"a11y_user_menu" = "User menu";
+"action_accept" = "Accept";
"action_back" = "Back";
"action_cancel" = "Cancel";
+"action_choose_photo" = "Choose photo";
"action_clear" = "Clear";
"action_close" = "Close";
"action_complete_verification" = "Complete verification";
@@ -12,13 +14,16 @@
"action_continue" = "Continue";
"action_copy" = "Copy";
"action_copy_link" = "Copy link";
+"action_create" = "Create";
"action_create_a_room" = "Create a room";
+"action_decline" = "Decline";
"action_disable" = "Disable";
"action_done" = "Done";
"action_edit" = "Edit";
"action_enable" = "Enable";
"action_invite" = "Invite";
"action_invite_friends_to_app" = "Invite friends to %1$@";
+"action_invites_list" = "Invites";
"action_learn_more" = "Learn more";
"action_leave" = "Leave";
"action_leave_room" = "Leave room";
@@ -37,12 +42,14 @@
"action_save" = "Save";
"action_search" = "Search";
"action_send" = "Send";
+"action_send_message" = "Send message";
"action_share" = "Share";
"action_share_link" = "Share link";
"action_skip" = "Skip";
"action_start" = "Start";
"action_start_chat" = "Start chat";
"action_start_verification" = "Start verification";
+"action_take_photo" = "Take photo";
"action_view_source" = "View Source";
"action_yes" = "Yes";
"common_about" = "About";
@@ -115,6 +122,23 @@
"leave_room_alert_private_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.";
"leave_room_alert_subtitle" = "Are you sure that you want to leave the room?";
"login_initial_device_name_ios" = "%1$@ iOS";
+"notification_channel_call" = "Call";
+"notification_channel_listening_for_events" = "Listening for events";
+"notification_channel_noisy" = "Noisy notifications";
+"notification_channel_silent" = "Silent notifications";
+"notification_inline_reply_failed" = "** Failed to send - please open room";
+"notification_invitation_action_join" = "Join";
+"notification_invitation_action_reject" = "Reject";
+"notification_new_messages" = "New Messages";
+"notification_room_action_mark_as_read" = "Mark as read";
+"notification_room_action_quick_reply" = "Quick reply";
+"notification_sender_me" = "Me";
+"notification_test_push_notification_content" = "You are viewing the notification! Click me!";
+"notification_ticker_text_dm" = "%1$@: %2$@";
+"notification_ticker_text_group" = "%1$@: %2$@ %3$@";
+"notification_unread_notified_messages_and_invitation" = "%1$@ and %2$@";
+"notification_unread_notified_messages_in_room" = "%1$@ in %2$@";
+"notification_unread_notified_messages_in_room_and_invitation" = "%1$@ in %2$@ and %3$@";
"preference_rageshake" = "Rageshake to report bug";
"rageshake_detection_dialog_content" = "You seem to be shaking the phone in frustration. Would you like to open the bug report screen?";
"rageshake_dialog_content" = "You seem to be shaking the phone in frustration. Would you like to open the bug report screen?";
@@ -158,12 +182,22 @@
"screen_create_room_action_create_room" = "New room";
"screen_create_room_action_invite_people" = "Invite people";
"screen_create_room_add_people_title" = "Add people";
+"screen_create_room_private_option_description" = "Messages in this room are encrypted. Encryption can’t be disabled afterwards.";
+"screen_create_room_private_option_title" = "Private room (invite only)";
+"screen_create_room_public_option_description" = "Messages are not encrypted and anyone can read them. You can enable encryption at a later date.";
+"screen_create_room_public_option_title" = "Public room (anyone)";
+"screen_create_room_room_name_label" = "Room name";
+"screen_create_room_room_name_placeholder" = "e.g. Product Sprint";
+"screen_create_room_title" = "Create a room";
+"screen_create_room_topic_label" = "Topic (optional)";
+"screen_create_room_topic_placeholder" = "What is this room about?";
"screen_dm_details_block_alert_action" = "Block";
"screen_dm_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
"screen_dm_details_block_user" = "Block user";
"screen_dm_details_unblock_alert_action" = "Unblock";
"screen_dm_details_unblock_alert_description" = "On unblocking the user, you will be able to see all messages by them again.";
"screen_dm_details_unblock_user" = "Unblock user";
+"screen_invites_invited_you" = "%1$@ invited you";
"screen_login_error_deactivated_account" = "This account has been deactivated.";
"screen_login_error_invalid_credentials" = "Incorrect username and/or password";
"screen_login_error_invalid_user_id" = "This is not a valid user identifier. Expected format: ‘@user:homeserver.org’";
diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict
index 411fbaa12..e6cefe155 100644
--- a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict
+++ b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict
@@ -18,6 +18,102 @@
%1$d members
+ notification_compat_summary_line_for_room
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %1$@: %2$d message
+ other
+ %1$@: %2$d messages
+
+
+ notification_compat_summary_title
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %d notification
+ other
+ %d notifications
+
+
+ notification_invitations
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %d invitation
+ other
+ %d invitations
+
+
+ notification_new_messages_for_room
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %d new message
+ other
+ %d new messages
+
+
+ notification_unread_notified_messages
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %d unread notified message
+ other
+ %d unread notified messages
+
+
+ notification_unread_notified_messages_in_room_rooms
+
+ NSStringLocalizedFormatKey
+ %#@COUNT@
+ COUNT
+
+ NSStringFormatSpecTypeKey
+ NSStringPluralRuleType
+ NSStringFormatValueTypeKey
+ d
+ one
+ %d room
+ other
+ %d rooms
+
+
room_timeline_state_changes
NSStringLocalizedFormatKey
diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift
index 87e957281..10c92308d 100644
--- a/ElementX/Sources/Generated/Strings.swift
+++ b/ElementX/Sources/Generated/Strings.swift
@@ -18,10 +18,14 @@ public enum L10n {
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") }
+ /// Accept
+ public static var actionAccept: String { return L10n.tr("Localizable", "action_accept") }
/// Back
public static var actionBack: String { return L10n.tr("Localizable", "action_back") }
/// Cancel
public static var actionCancel: String { return L10n.tr("Localizable", "action_cancel") }
+ /// Choose photo
+ public static var actionChoosePhoto: String { return L10n.tr("Localizable", "action_choose_photo") }
/// Clear
public static var actionClear: String { return L10n.tr("Localizable", "action_clear") }
/// Close
@@ -36,8 +40,12 @@ public enum L10n {
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
+ public static var actionCreate: String { return L10n.tr("Localizable", "action_create") }
/// Create a room
public static var actionCreateARoom: String { return L10n.tr("Localizable", "action_create_a_room") }
+ /// Decline
+ public static var actionDecline: String { return L10n.tr("Localizable", "action_decline") }
/// Disable
public static var actionDisable: String { return L10n.tr("Localizable", "action_disable") }
/// Done
@@ -52,6 +60,8 @@ public enum L10n {
public static func actionInviteFriendsToApp(_ p1: Any) -> String {
return L10n.tr("Localizable", "action_invite_friends_to_app", String(describing: p1))
}
+ /// Invites
+ public static var actionInvitesList: String { return L10n.tr("Localizable", "action_invites_list") }
/// Learn more
public static var actionLearnMore: String { return L10n.tr("Localizable", "action_learn_more") }
/// Leave
@@ -88,6 +98,8 @@ public enum L10n {
public static var actionSearch: String { return L10n.tr("Localizable", "action_search") }
/// Send
public static var actionSend: String { return L10n.tr("Localizable", "action_send") }
+ /// Send message
+ public static var actionSendMessage: String { return L10n.tr("Localizable", "action_send_message") }
/// Share
public static var actionShare: String { return L10n.tr("Localizable", "action_share") }
/// Share link
@@ -100,6 +112,8 @@ public enum L10n {
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") }
+ /// Take photo
+ public static var actionTakePhoto: String { return L10n.tr("Localizable", "action_take_photo") }
/// View Source
public static var actionViewSource: String { return L10n.tr("Localizable", "action_view_source") }
/// Yes
@@ -258,6 +272,74 @@ public enum L10n {
}
/// Notification
public static var notification: String { return L10n.tr("Localizable", "Notification") }
+ /// Call
+ public static var notificationChannelCall: String { return L10n.tr("Localizable", "notification_channel_call") }
+ /// Listening for events
+ public static var notificationChannelListeningForEvents: String { return L10n.tr("Localizable", "notification_channel_listening_for_events") }
+ /// Noisy notifications
+ public static var notificationChannelNoisy: String { return L10n.tr("Localizable", "notification_channel_noisy") }
+ /// Silent notifications
+ public static var notificationChannelSilent: String { return L10n.tr("Localizable", "notification_channel_silent") }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationCompatSummaryLineForRoom(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_compat_summary_line_for_room", p1)
+ }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationCompatSummaryTitle(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_compat_summary_title", p1)
+ }
+ /// ** Failed to send - please open room
+ public static var notificationInlineReplyFailed: String { return L10n.tr("Localizable", "notification_inline_reply_failed") }
+ /// Join
+ public static var notificationInvitationActionJoin: String { return L10n.tr("Localizable", "notification_invitation_action_join") }
+ /// Reject
+ public static var notificationInvitationActionReject: String { return L10n.tr("Localizable", "notification_invitation_action_reject") }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationInvitations(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_invitations", p1)
+ }
+ /// New Messages
+ public static var notificationNewMessages: String { return L10n.tr("Localizable", "notification_new_messages") }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationNewMessagesForRoom(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_new_messages_for_room", p1)
+ }
+ /// Mark as read
+ public static var notificationRoomActionMarkAsRead: String { return L10n.tr("Localizable", "notification_room_action_mark_as_read") }
+ /// Quick reply
+ public static var notificationRoomActionQuickReply: String { return L10n.tr("Localizable", "notification_room_action_quick_reply") }
+ /// Me
+ public static var notificationSenderMe: String { return L10n.tr("Localizable", "notification_sender_me") }
+ /// You are viewing the notification! Click me!
+ public static var notificationTestPushNotificationContent: String { return L10n.tr("Localizable", "notification_test_push_notification_content") }
+ /// %1$@: %2$@
+ public static func notificationTickerTextDm(_ p1: Any, _ p2: Any) -> String {
+ return L10n.tr("Localizable", "notification_ticker_text_dm", String(describing: p1), String(describing: p2))
+ }
+ /// %1$@: %2$@ %3$@
+ public static func notificationTickerTextGroup(_ p1: Any, _ p2: Any, _ p3: Any) -> String {
+ return L10n.tr("Localizable", "notification_ticker_text_group", String(describing: p1), String(describing: p2), String(describing: p3))
+ }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationUnreadNotifiedMessages(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_unread_notified_messages", p1)
+ }
+ /// %1$@ and %2$@
+ public static func notificationUnreadNotifiedMessagesAndInvitation(_ p1: Any, _ p2: Any) -> String {
+ return L10n.tr("Localizable", "notification_unread_notified_messages_and_invitation", String(describing: p1), String(describing: p2))
+ }
+ /// %1$@ in %2$@
+ public static func notificationUnreadNotifiedMessagesInRoom(_ p1: Any, _ p2: Any) -> String {
+ return L10n.tr("Localizable", "notification_unread_notified_messages_in_room", String(describing: p1), String(describing: p2))
+ }
+ /// %1$@ in %2$@ and %3$@
+ public static func notificationUnreadNotifiedMessagesInRoomAndInvitation(_ p1: Any, _ p2: Any, _ p3: Any) -> String {
+ return L10n.tr("Localizable", "notification_unread_notified_messages_in_room_and_invitation", String(describing: p1), String(describing: p2), String(describing: p3))
+ }
+ /// Plural format key: "%#@COUNT@"
+ public static func notificationUnreadNotifiedMessagesInRoomRooms(_ p1: Int) -> String {
+ return L10n.tr("Localizable", "notification_unread_notified_messages_in_room_rooms", p1)
+ }
/// 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?
@@ -354,6 +436,24 @@ public enum L10n {
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") }
+ /// Messages in this room are encrypted. Encryption can’t be disabled afterwards.
+ public static var screenCreateRoomPrivateOptionDescription: String { return L10n.tr("Localizable", "screen_create_room_private_option_description") }
+ /// Private room (invite only)
+ public static var screenCreateRoomPrivateOptionTitle: String { return L10n.tr("Localizable", "screen_create_room_private_option_title") }
+ /// Messages are not encrypted and anyone can read them. You can enable encryption at a later date.
+ public static var screenCreateRoomPublicOptionDescription: String { return L10n.tr("Localizable", "screen_create_room_public_option_description") }
+ /// Public room (anyone)
+ public static var screenCreateRoomPublicOptionTitle: String { return L10n.tr("Localizable", "screen_create_room_public_option_title") }
+ /// Room name
+ public static var screenCreateRoomRoomNameLabel: String { return L10n.tr("Localizable", "screen_create_room_room_name_label") }
+ /// e.g. Product Sprint
+ public static var screenCreateRoomRoomNamePlaceholder: String { return L10n.tr("Localizable", "screen_create_room_room_name_placeholder") }
+ /// Create a room
+ public static var screenCreateRoomTitle: String { return L10n.tr("Localizable", "screen_create_room_title") }
+ /// Topic (optional)
+ public static var screenCreateRoomTopicLabel: String { return L10n.tr("Localizable", "screen_create_room_topic_label") }
+ /// What is this room about?
+ public static var screenCreateRoomTopicPlaceholder: String { return L10n.tr("Localizable", "screen_create_room_topic_placeholder") }
/// Block
public static var screenDmDetailsBlockAlertAction: String { return L10n.tr("Localizable", "screen_dm_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.
@@ -366,6 +466,10 @@ public enum L10n {
public static var screenDmDetailsUnblockAlertDescription: String { return L10n.tr("Localizable", "screen_dm_details_unblock_alert_description") }
/// Unblock user
public static var screenDmDetailsUnblockUser: String { return L10n.tr("Localizable", "screen_dm_details_unblock_user") }
+ /// %1$@ invited you
+ public static func screenInvitesInvitedYou(_ p1: Any) -> String {
+ return L10n.tr("Localizable", "screen_invites_invited_you", String(describing: p1))
+ }
/// This account has been deactivated.
public static var screenLoginErrorDeactivatedAccount: String { return L10n.tr("Localizable", "screen_login_error_deactivated_account") }
/// Incorrect username and/or password
diff --git a/Tools/Sources/DownloadStrings.swift b/Tools/Sources/DownloadStrings.swift
index 2029d8760..faa8bb98a 100644
--- a/Tools/Sources/DownloadStrings.swift
+++ b/Tools/Sources/DownloadStrings.swift
@@ -9,10 +9,15 @@ struct DownloadStrings: ParsableCommand {
func run() throws {
try localazyDownload()
+ try swiftgen()
}
private func localazyDownload() throws {
let json = allLanguages ? "localazy-all.json" : "localazy-en.json"
try Utilities.zsh("localazy download --config \(json)")
}
+
+ private func swiftgen() throws {
+ try Utilities.zsh("swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml")
+ }
}
diff --git a/Tools/Sources/SetupProject.swift b/Tools/Sources/SetupProject.swift
index 1f5113d25..728078e08 100644
--- a/Tools/Sources/SetupProject.swift
+++ b/Tools/Sources/SetupProject.swift
@@ -4,9 +4,13 @@ import Foundation
struct SetupProject: ParsableCommand {
static var configuration = CommandConfiguration(abstract: "A tool to setup the required components to efficiently run and contribute to Element X iOS")
+ @Flag(help: "Use this only on ci to avoid installing failing packages")
+ var ci = false
+
func run() throws {
try setupGitHooks()
try brewBundleInstall()
+ try mintPackagesInstall()
try xcodegen()
}
@@ -15,7 +19,14 @@ struct SetupProject: ParsableCommand {
}
func brewBundleInstall() throws {
- try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs sourcery mint kiliankoe/formulae/swift-outdated localazy/tools/localazy")
+ try Utilities.zsh("brew install xcodegen swiftgen swiftformat git-lfs sourcery mint kiliankoe/formulae/swift-outdated localazy/tools/localazy")
+ if !ci {
+ try Utilities.zsh("brew install swiftlint")
+ }
+ }
+
+ func mintPackagesInstall() throws {
+ try Utilities.zsh("mint install Asana/locheck")
}
func xcodegen() throws {