diff --git a/Core/Core/Assets.xcassets/arrowRight16.imageset/Contents.json b/Core/Core/Assets.xcassets/arrowRight16.imageset/Contents.json index 2d22dfa63..bbe56d546 100644 --- a/Core/Core/Assets.xcassets/arrowRight16.imageset/Contents.json +++ b/Core/Core/Assets.xcassets/arrowRight16.imageset/Contents.json @@ -2,7 +2,8 @@ "images" : [ { "filename" : "arrowRight16.svg", - "idiom" : "universal" + "idiom" : "universal", + "language-direction" : "left-to-right" } ], "info" : { diff --git a/Core/Core/Domain/Model/CourseDates.swift b/Core/Core/Domain/Model/CourseDates.swift index 5b1c6436c..f3fbcdd9a 100644 --- a/Core/Core/Domain/Model/CourseDates.swift +++ b/Core/Core/Domain/Model/CourseDates.swift @@ -331,6 +331,23 @@ public enum CompletionStatus: String { case thisWeek = "This Week" case nextWeek = "Next Week" case upcoming = "Upcoming" + + public var localized: String { + switch self { + case .completed: + return CoreLocalization.CourseDates.completed + case .pastDue: + return CoreLocalization.CourseDates.pastDue + case .today: + return CoreLocalization.CourseDates.today + case .thisWeek: + return CoreLocalization.CourseDates.thisWeek + case .nextWeek: + return CoreLocalization.CourseDates.nextWeek + case .upcoming: + return CoreLocalization.CourseDates.upcoming + } + } } public extension Array { diff --git a/Core/Core/SwiftGen/Strings.swift b/Core/Core/SwiftGen/Strings.swift index 8cdf97b6e..ab42f4176 100644 --- a/Core/Core/SwiftGen/Strings.swift +++ b/Core/Core/SwiftGen/Strings.swift @@ -79,6 +79,18 @@ public enum CoreLocalization { } } public enum CourseDates { + /// Completed + public static let completed = CoreLocalization.tr("Localizable", "COURSE_DATES.COMPLETED", fallback: "Completed") + /// Next week + public static let nextWeek = CoreLocalization.tr("Localizable", "COURSE_DATES.NEXT_WEEK", fallback: "Next week") + /// Past due + public static let pastDue = CoreLocalization.tr("Localizable", "COURSE_DATES.PAST_DUE", fallback: "Past due") + /// This week + public static let thisWeek = CoreLocalization.tr("Localizable", "COURSE_DATES.THIS_WEEK", fallback: "This week") + /// Today + public static let today = CoreLocalization.tr("Localizable", "COURSE_DATES.TODAY", fallback: "Today") + /// Upcoming + public static let upcoming = CoreLocalization.tr("Localizable", "COURSE_DATES.UPCOMING", fallback: "Upcoming") public enum ResetDate { /// Your dates could not be shifted. Please try again. public static let errorMessage = CoreLocalization.tr("Localizable", "COURSE_DATES.RESET_DATE.ERROR_MESSAGE", fallback: "Your dates could not be shifted. Please try again.") diff --git a/Core/Core/View/Base/CourseButton.swift b/Core/Core/View/Base/CourseButton.swift index 9ff48554a..cfc999d5b 100644 --- a/Core/Core/View/Base/CourseButton.swift +++ b/Core/Core/View/Base/CourseButton.swift @@ -40,6 +40,7 @@ public struct CourseButton: View { .foregroundColor(Theme.Colors.textPrimary) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) .padding(.vertical, 8) .foregroundColor(Theme.Colors.accentXColor) } diff --git a/Core/Core/en.lproj/Localizable.strings b/Core/Core/en.lproj/Localizable.strings index b4ca1bc64..1f8389f1f 100644 --- a/Core/Core/en.lproj/Localizable.strings +++ b/Core/Core/en.lproj/Localizable.strings @@ -139,3 +139,10 @@ "COURSE_DATES.RESET_DATE.ERROR_MESSAGE" = "Your dates could not be shifted. Please try again."; "COURSE_DATES.RESET_DATE.SUCCESS_MESSAGE" = "Your dates have been successfully shifted."; "COURSE_DATES.RESET_DATE.TITLE" = "Course Dates"; + +"COURSE_DATES.TODAY" = "Today"; +"COURSE_DATES.COMPLETED" = "Completed"; +"COURSE_DATES.PAST_DUE" = "Past due"; +"COURSE_DATES.THIS_WEEK" = "This week"; +"COURSE_DATES.NEXT_WEEK" = "Next week"; +"COURSE_DATES.UPCOMING" = "Upcoming"; diff --git a/Course/Course/Presentation/Dates/CourseDatesView.swift b/Course/Course/Presentation/Dates/CourseDatesView.swift index fba76f5fe..5ec069ea5 100644 --- a/Course/Course/Presentation/Dates/CourseDatesView.swift +++ b/Course/Course/Presentation/Dates/CourseDatesView.swift @@ -241,7 +241,7 @@ struct CompletedBlocks: View { }) { HStack { VStack(alignment: .leading) { - Text(CompletionStatus.completed.rawValue) + Text(CompletionStatus.completed.localized) .font(Theme.Fonts.titleSmall) .foregroundColor(Theme.Colors.textPrimary) @@ -289,6 +289,8 @@ struct CompletedBlocks: View { if block.canShowLink && !block.firstComponentBlockID.isEmpty { Image(systemName: "chevron.right") .resizable() + .flipsForRightToLeftLayoutDirection(true) + .scaledToFit() .frame(width: 6.55, height: 11.15) .labelStyle(.iconOnly) @@ -328,6 +330,7 @@ struct BlockStatusView: View { if block.canShowLink && !block.firstComponentBlockID.isEmpty { Image(systemName: "chevron.right") .resizable() + .flipsForRightToLeftLayoutDirection(true) .scaledToFit() .frame(width: 6.55, height: 11.15) .labelStyle(.iconOnly) diff --git a/Course/Course/Presentation/Handouts/HandoutsView.swift b/Course/Course/Presentation/Handouts/HandoutsView.swift index c9a2ed6cf..f08075fb5 100644 --- a/Course/Course/Presentation/Handouts/HandoutsView.swift +++ b/Course/Course/Presentation/Handouts/HandoutsView.swift @@ -205,7 +205,9 @@ struct HandoutsItemCell: View { .font(Theme.Fonts.labelSmall) } Spacer() - Image(systemName: "chevron.right").resizable() + Image(systemName: "chevron.right") + .resizable() + .flipsForRightToLeftLayoutDirection(true) .frame(width: 7, height: 12) .foregroundColor(Theme.Colors.accentColor) } diff --git a/Course/Course/Presentation/Outline/CourseStructure/CourseStructureView.swift b/Course/Course/Presentation/Outline/CourseStructure/CourseStructureView.swift new file mode 100644 index 000000000..e69de29bb diff --git a/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift b/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift index ccfc6f9b7..cd0c8d174 100644 --- a/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift +++ b/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift @@ -125,6 +125,7 @@ public struct CourseVerticalView: View { } } Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) .padding(.vertical, 8) } .padding(.horizontal, 36) diff --git a/Discussion/Discussion/Presentation/DiscussionTopics/DiscussionTopicsView.swift b/Discussion/Discussion/Presentation/DiscussionTopics/DiscussionTopicsView.swift index ad84d6a00..5964e41ab 100644 --- a/Discussion/Discussion/Presentation/DiscussionTopics/DiscussionTopicsView.swift +++ b/Discussion/Discussion/Presentation/DiscussionTopics/DiscussionTopicsView.swift @@ -263,6 +263,7 @@ public struct TopicCell: View { .multilineTextAlignment(.leading) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) .foregroundColor(Theme.Colors.accentColor) } }) diff --git a/Profile/Profile/Presentation/Profile/Subviews/ProfileSupportInfoView.swift b/Profile/Profile/Presentation/Profile/Subviews/ProfileSupportInfoView.swift index 5b8f74713..29ff3c17a 100644 --- a/Profile/Profile/Presentation/Profile/Subviews/ProfileSupportInfoView.swift +++ b/Profile/Profile/Presentation/Profile/Subviews/ProfileSupportInfoView.swift @@ -130,6 +130,7 @@ struct ProfileSupportInfoView: View { .foregroundColor(Theme.Colors.textPrimary) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) } } .simultaneousGesture(TapGesture().onEnded { @@ -187,6 +188,7 @@ struct ProfileSupportInfoView: View { .font(Theme.Fonts.titleMedium) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) } } .foregroundColor(.primary) diff --git a/Profile/Profile/Presentation/Settings/SettingsView.swift b/Profile/Profile/Presentation/Settings/SettingsView.swift index 590afa784..e827d005e 100644 --- a/Profile/Profile/Presentation/Settings/SettingsView.swift +++ b/Profile/Profile/Presentation/Settings/SettingsView.swift @@ -150,6 +150,7 @@ public struct SettingsView: View { .font(Theme.Fonts.titleMedium) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) } }) .accessibilityIdentifier("video_settings_button") @@ -183,6 +184,7 @@ public struct SettingsView: View { .font(Theme.Fonts.titleMedium) Spacer() Image(systemName: "chevron.right") + .flipsForRightToLeftLayoutDirection(true) } }) .accessibilityIdentifier("video_settings_button")