Skip to content

Commit

Permalink
fixup! Handle ongoing engagement in EntryWidget
Browse files Browse the repository at this point in the history
New string keys for ongoing engagement strings

MOB-3806
  • Loading branch information
rasmustautsglia committed Dec 10, 2024
1 parent e01f846 commit 05d3f99
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
20 changes: 9 additions & 11 deletions GliaWidgets/Localization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,11 @@ internal enum Localization {
}
}
internal enum CallVisualizer {
/// Screen sharing in progress
internal static var desciption: String { Localization.tr("Localizable", "entry_widget.call_visualizer.desciption", fallback: "Screen sharing in progress") }
internal enum Button {
/// Call Visualizer
internal static var label: String { Localization.tr("Localizable", "entry_widget.call_visualizer.button.label", fallback: "Call Visualizer") }
internal enum Accessibility {
/// Starts call visualizer session
internal static var hint: String { Localization.tr("Localizable", "entry_widget.call_visualizer.button.accessibility.hint", fallback: "Starts call visualizer session") }
}
}
}
internal enum EmptyState {
Expand Down Expand Up @@ -500,13 +498,13 @@ internal enum Localization {
}
}
internal enum OngoingEngagement {
internal enum CallVisualizer {
/// Screen sharing in progress
internal static var message: String { Localization.tr("Localizable", "entry_widget.ongoing_engagement.call_visualizer.message", fallback: "Screen sharing in progress") }
}
internal enum Core {
/// Ongoing • Tap to return
internal static var message: String { Localization.tr("Localizable", "entry_widget.ongoing_engagement.core.message", fallback: "Ongoing • Tap to return") }
/// Ongoing • Tap to return
internal static var description: String { Localization.tr("Localizable", "entry_widget.ongoing_engagement.description", fallback: "Ongoing • Tap to return") }
internal enum Button {
internal enum Accessibility {
/// Returns to ongoing engagement
internal static var hint: String { Localization.tr("Localizable", "entry_widget.ongoing_engagement.button.accessibility.hint", fallback: "Returns to ongoing engagement") }
}
}
}
internal enum SecureMessaging {
Expand Down
6 changes: 3 additions & 3 deletions GliaWidgets/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@
"entry_widget.secure_messaging.button.description" = "Start a conversation, we’ll get back to you";
"entry_widget.secure_messaging.button.accessibility.hint" = "Starts messaging with us";
"entry_widget.call_visualizer.button.label" = "Call Visualizer";
"entry_widget.call_visualizer.button.accessibility.hint" = "Starts call visualizer session";
"entry_widget.empty_state.title" = "Support team is currently offline";
"entry_widget.empty_state.description" = "We are here to assist you during our business hours.";
"entry_widget.error_state.title" = "Could not load the contacts";
"entry_widget.error_state.description" = "We could not load the contacts at this time. This may be due to a temporary syncing issue or network problem.";
"entry_widget.error_state.try_again.button.label" = "Try again";
"entry_widget.loading.accessibility.label" = "Loading indicator. Waiting for available options.";
"entry_widget.ongoing_engagement.core.message" = "Ongoing • Tap to return";
"entry_widget.ongoing_engagement.call_visualizer.message" = "Screen sharing in progress";
"entry_widget.ongoing_engagement.description" = "Ongoing • Tap to return";
"entry_widget.call_visualizer.desciption" = "Screen sharing in progress";
"entry_widget.ongoing_engagement.button.accessibility.hint" = "Returns to ongoing engagement";
6 changes: 3 additions & 3 deletions GliaWidgets/Sources/Theme/Theme.EntryWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension Theme {
audioHint: Localization.EntryWidget.Audio.Button.Accessibility.hint,
videoHint: Localization.EntryWidget.Video.Button.Accessibility.hint,
secureMessagingHint: Localization.EntryWidget.SecureMessaging.Button.Accessibility.hint,
callVisualizerHint: Localization.EntryWidget.CallVisualizer.Button.Accessibility.hint
callVisualizerHint: Localization.EntryWidget.OngoingEngagement.Button.Accessibility.hint
)

let mediaTypeItem: EntryWidgetStyle.MediaTypeItemStyle = .init(
Expand All @@ -38,8 +38,8 @@ extension Theme {
backgroundColor: .fill(color: color.baseLight),
loading: loading,
accessibility: mediaTypeAccessibility,
ongoingCoreEngagementMessage: Localization.EntryWidget.OngoingEngagement.Core.message,
ongoingCallVisualizerMessage: Localization.EntryWidget.OngoingEngagement.CallVisualizer.message,
ongoingCoreEngagementMessage: Localization.EntryWidget.OngoingEngagement.description,
ongoingCallVisualizerMessage: Localization.EntryWidget.CallVisualizer.desciption,
ongoingEngagementMessageFont: font.mediumSubtitle2,
ongoingEngagementMessageColor: color.primary
)
Expand Down

0 comments on commit 05d3f99

Please sign in to comment.