Skip to content

Commit

Permalink
Add FXIOS-7612 [v120] Strings update for Fakespot (#16940)
Browse files Browse the repository at this point in the history
* Strings update

* Update comment

* Update collapse string to reflect the opposite state

* Update keys to reflect change

* Update keys
  • Loading branch information
razvanlitianu authored Oct 23, 2023
1 parent 3c8384c commit 8c61f48
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
18 changes: 9 additions & 9 deletions BrowserKit/Sources/ComponentLibrary/CollapsibleCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public struct CollapsibleCardViewModel {
public let titleA11yId: String

public let expandButtonA11yId: String
public let expandButtonA11yLabelExpanded: String
public let expandButtonA11yLabelCollapsed: String
public let expandButtonA11yLabelExpand: String
public let expandButtonA11yLabelCollapse: String

public var expandState: ExpandState = .collapsed

public var expandButtonA11yLabel: String {
return expandState == .expanded ? expandButtonA11yLabelExpanded : expandButtonA11yLabelCollapsed
return expandState == .expanded ? expandButtonA11yLabelCollapse : expandButtonA11yLabelExpand
}

public var telemetryCallback: ((_ expandState: ExpandState) -> Void)?
Expand All @@ -34,17 +34,17 @@ public struct CollapsibleCardViewModel {
title: String,
titleA11yId: String,
expandButtonA11yId: String,
expandButtonA11yLabelExpanded: String,
expandButtonA11yLabelCollapsed: String,
expandButtonA11yLabelExpand: String,
expandButtonA11yLabelCollapse: String,
expandState: ExpandState = .collapsed,
telemetryCallback: ((_ expandState: ExpandState) -> Void)? = nil) {
self.contentView = contentView
self.cardViewA11yId = cardViewA11yId
self.title = title
self.titleA11yId = titleA11yId
self.expandButtonA11yId = expandButtonA11yId
self.expandButtonA11yLabelExpanded = expandButtonA11yLabelExpanded
self.expandButtonA11yLabelCollapsed = expandButtonA11yLabelCollapsed
self.expandButtonA11yLabelExpand = expandButtonA11yLabelExpand
self.expandButtonA11yLabelCollapse = expandButtonA11yLabelCollapse
self.expandState = expandState
self.telemetryCallback = telemetryCallback
}
Expand Down Expand Up @@ -88,8 +88,8 @@ public class CollapsibleCardView: ShadowCardView, UIGestureRecognizerDelegate {
title: "",
titleA11yId: "",
expandButtonA11yId: "",
expandButtonA11yLabelExpanded: "",
expandButtonA11yLabelCollapsed: "",
expandButtonA11yLabelExpand: "",
expandButtonA11yLabelCollapse: "",
expandState: .collapsed)

// UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ final class FakespotReviewQualityCardView: UIView, Notifiable, ThemeApplicable {
title: .Shopping.ReviewQualityCardLabelTitle,
titleA11yId: AccessibilityIdentifiers.Shopping.ReviewQualityCard.title,
expandButtonA11yId: AccessibilityIdentifiers.Shopping.ReviewQualityCard.expandButton,
expandButtonA11yLabelExpanded: .Shopping.ReviewQualityCardExpandedAccessibilityLabel,
expandButtonA11yLabelCollapsed: .Shopping.ReviewQualityCardCollapsedAccessibilityLabel)
expandButtonA11yLabelExpand: .Shopping.ReviewQualityCardExpandAccessibilityLabel,
expandButtonA11yLabelCollapse: .Shopping.ReviewQualityCardCollapseAccessibilityLabel)
collapsibleContainer.configure(viewModel)
}

Expand Down
4 changes: 2 additions & 2 deletions Client/Frontend/Fakespot/Views/FakespotSettingsCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ final class FakespotSettingsCardView: UIView, ThemeApplicable {
title: .Shopping.SettingsCardLabelTitle,
titleA11yId: AccessibilityIdentifiers.Shopping.SettingsCard.title,
expandButtonA11yId: AccessibilityIdentifiers.Shopping.SettingsCard.expandButton,
expandButtonA11yLabelExpanded: .Shopping.SettingsCardExpandedAccessibilityLabel,
expandButtonA11yLabelCollapsed: .Shopping.SettingsCardCollapsedAccessibilityLabel) { state in
expandButtonA11yLabelExpand: .Shopping.SettingsCardExpandAccessibilityLabel,
expandButtonA11yLabelCollapse: .Shopping.SettingsCardCollapseAccessibilityLabel) { state in
if state == .expanded {
TelemetryWrapper.recordEvent(category: .action,
method: .view,
Expand Down
36 changes: 18 additions & 18 deletions Client/Frontend/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3760,7 +3760,7 @@ extension String {
key: "Shopping.HighlightsCard.Packaging.Title.v120",
tableName: "Shopping",
value: "Packaging",
comment: "Section title of the review highlights displayed in the shopping review quality bottom sheet.")
comment: "Section title of the review highlights displayed in the shopping review quality bottom sheet, specifically focusing on the quality, design, and condition of the product's packaging. This may include details about the box, protective materials, presentation, and overall packaging experience.")
public static let SettingsCardLabelTitle = MZLocalizedString(
key: "Shopping.SettingsCard.Label.Title.v120",
tableName: "Shopping",
Expand All @@ -3772,20 +3772,20 @@ extension String {
value: "Show products recommended by %@",
comment: "Label of the switch from settings card displayed in the shopping review quality bottom sheet. The placeholder will be replaced with the app name.")
public static let SettingsCardTurnOffButton = MZLocalizedString(
key: "Shopping.SettingsCard.TurnOff.Button.v120",
key: "Shopping.SettingsCard.TurnOffButton.Title.v120",
tableName: "Shopping",
value: "Turn Off Review Checker",
comment: "Label of the button from settings card displayed in the shopping review quality bottom sheet.")
public static let SettingsCardExpandedAccessibilityLabel = MZLocalizedString(
key: "Shopping.SettingsCard.Expanded.AccessibilityLabel.v120",
public static let SettingsCardExpandAccessibilityLabel = MZLocalizedString(
key: "Shopping.SettingsCard.Expand.AccessibilityLabel.v120",
tableName: "Shopping",
value: "Settings Card Expanded",
comment: "Accessibility label for the down chevron, from Settings Card View displayed in the shopping review quality bottom sheet.")
public static let SettingsCardCollapsedAccessibilityLabel = MZLocalizedString(
key: "Shopping.SettingsCard.Collapsed.AccessibilityLabel.v120",
value: "Expand Settings Card",
comment: "Accessibility label for the down chevron icon used to expand or show the details of the Settings Card within the shopping product review bottom sheet.")
public static let SettingsCardCollapseAccessibilityLabel = MZLocalizedString(
key: "Shopping.SettingsCard.Collapse.AccessibilityLabel.v120",
tableName: "Shopping",
value: "Settings Card Collapsed",
comment: "Accessibility label for the up chevron, from Settings Card View displayed in the shopping review quality bottom sheet.")
value: "Collapse Settings Card",
comment: "Accessibility label for the up chevron icon used to collapse or minimize the Settings Card within the shopping product review bottom sheet.")
public static let SettingsCardFooterAction = MZLocalizedString(
key: "Shopping.SettingsCard.Footer.Action.v120",
tableName: "Shopping",
Expand All @@ -3800,12 +3800,12 @@ extension String {
key: "Shopping.NoAnalysisCard.BodyLabel.Title.v120",
tableName: "Shopping",
value: "To know whether this product’s reviews are reliable, check the review quality. It only takes about 60 seconds.",
comment: "Text for the body label, from No Analysis Card View displayed in the shopping review quality bottom sheet.")
comment: "Text for the body label, to check the reliability of a product.")
public static let NoAnalysisCardAnalyzerButtonTitle = MZLocalizedString(
key: "Shopping.NoAnalysisCard.AnalyzerButton.Title.v120",
tableName: "Shopping",
value: "Check Review Quality",
comment: "Text for the analyzer button, from No Analysis Card View displayed in the shopping review quality bottom sheet.")
comment: "Text for the analyzer button displayed when an analysis can be updated for a product.")
public static let NoAnalysisCardInProgressTitle = MZLocalizedString(
key: "Shopping.NoAnalysisCard.InProgress.Headline.Title.v120",
tableName: "Shopping",
Expand All @@ -3821,15 +3821,15 @@ extension String {
tableName: "Shopping",
value: "How we determine review quality",
comment: "Title of the 'How we determine review quality' card displayed in the shopping review quality bottom sheet.")
public static let ReviewQualityCardExpandedAccessibilityLabel = MZLocalizedString(
key: "Shopping.ReviewQualityCard.Expanded.AccessibilityLabel.v120",
public static let ReviewQualityCardExpandAccessibilityLabel = MZLocalizedString(
key: "Shopping.ReviewQualityCard.Expand.AccessibilityLabel.v120",
tableName: "Shopping",
value: "How we determine review quality Card Expanded",
value: "Expand How we determine review quality card",
comment: "Accessibility label for the down chevron, from 'How we determine review quality' card displayed in the shopping review quality bottom sheet.")
public static let ReviewQualityCardCollapsedAccessibilityLabel = MZLocalizedString(
key: "Shopping.ReviewQualityCard.Collapsed.AccessibilityLabel.v120",
public static let ReviewQualityCardCollapseAccessibilityLabel = MZLocalizedString(
key: "Shopping.ReviewQualityCard.Collapse.AccessibilityLabel.v120",
tableName: "Shopping",
value: "How we determine review quality Card Collapsed",
value: "Collapse How we determine review quality Card",
comment: "Accessibility label for the up chevron, from 'How we determine review quality' card displayed in the shopping review quality bottom sheet.")
public static let ReviewQualityCardHeadlineLabel = MZLocalizedString(
key: "Shopping.ReviewQualityCard.Headline.Label.v120",
Expand Down

0 comments on commit 8c61f48

Please sign in to comment.