From 8c61f48a553de905af9d5364cbdb1b92a1a053f3 Mon Sep 17 00:00:00 2001 From: Litianu Razvan Date: Mon, 23 Oct 2023 16:54:19 +0300 Subject: [PATCH] Add FXIOS-7612 [v120] Strings update for Fakespot (#16940) * Strings update * Update comment * Update collapse string to reflect the opposite state * Update keys to reflect change * Update keys --- .../CollapsibleCardView.swift | 18 +++++----- .../Views/FakespotReviewQualityCardView.swift | 4 +-- .../Views/FakespotSettingsCardView.swift | 4 +-- Client/Frontend/Strings.swift | 36 +++++++++---------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/BrowserKit/Sources/ComponentLibrary/CollapsibleCardView.swift b/BrowserKit/Sources/ComponentLibrary/CollapsibleCardView.swift index 75314cdd3727..fac42ef20493 100644 --- a/BrowserKit/Sources/ComponentLibrary/CollapsibleCardView.swift +++ b/BrowserKit/Sources/ComponentLibrary/CollapsibleCardView.swift @@ -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)? @@ -34,8 +34,8 @@ 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 @@ -43,8 +43,8 @@ public struct CollapsibleCardViewModel { 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 } @@ -88,8 +88,8 @@ public class CollapsibleCardView: ShadowCardView, UIGestureRecognizerDelegate { title: "", titleA11yId: "", expandButtonA11yId: "", - expandButtonA11yLabelExpanded: "", - expandButtonA11yLabelCollapsed: "", + expandButtonA11yLabelExpand: "", + expandButtonA11yLabelCollapse: "", expandState: .collapsed) // UI diff --git a/Client/Frontend/Fakespot/Views/FakespotReviewQualityCardView.swift b/Client/Frontend/Fakespot/Views/FakespotReviewQualityCardView.swift index 930ea880996b..ff12265162cf 100644 --- a/Client/Frontend/Fakespot/Views/FakespotReviewQualityCardView.swift +++ b/Client/Frontend/Fakespot/Views/FakespotReviewQualityCardView.swift @@ -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) } diff --git a/Client/Frontend/Fakespot/Views/FakespotSettingsCardView.swift b/Client/Frontend/Fakespot/Views/FakespotSettingsCardView.swift index 9bac25770755..88a2370b31cb 100644 --- a/Client/Frontend/Fakespot/Views/FakespotSettingsCardView.swift +++ b/Client/Frontend/Fakespot/Views/FakespotSettingsCardView.swift @@ -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, diff --git a/Client/Frontend/Strings.swift b/Client/Frontend/Strings.swift index 666fee129445..a731b293997c 100644 --- a/Client/Frontend/Strings.swift +++ b/Client/Frontend/Strings.swift @@ -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", @@ -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", @@ -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", @@ -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",