diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml index 4d9c0601f58f..09cce4b6a06f 100644 --- a/browser/base/content/browser.xhtml +++ b/browser/base/content/browser.xhtml @@ -88,7 +88,6 @@ #ifdef NIGHTLY_BUILD - #endif diff --git a/browser/components/shopping/content/analysis-explainer.css b/browser/components/shopping/content/analysis-explainer.css index ce7ebf55cc38..8791d043496a 100644 --- a/browser/components/shopping/content/analysis-explainer.css +++ b/browser/components/shopping/content/analysis-explainer.css @@ -5,10 +5,16 @@ @import url("chrome://global/skin/in-content/common.css"); #analysis-explainer-wrapper p, +#analysis-explainer-grades-list > li, .analysis-explainer-grading-scale-description { line-height: 150%; } +#analysis-explainer-grades-list { + padding: 0; + margin-inline-start: 1.05em; +} + #analysis-explainer-grading-scale-wrapper { margin-inline-start: 0.54em; } diff --git a/browser/components/shopping/content/analysis-explainer.mjs b/browser/components/shopping/content/analysis-explainer.mjs index 1bebb489d10f..a5d1ab578f85 100644 --- a/browser/components/shopping/content/analysis-explainer.mjs +++ b/browser/components/shopping/content/analysis-explainer.mjs @@ -23,14 +23,18 @@ const VALID_EXPLAINER_L10N_IDS = new Map([ * Class for displaying details about letter grades, adjusted rating, and highlights. */ class AnalysisExplainer extends MozLitElement { - static properties = { - productURL: { type: String, reflect: true }, - }; - getGradesDescriptionTemplate() { return html`

+
`; } @@ -60,6 +64,10 @@ class AnalysisExplainer extends MozLitElement { getGradingScaleListTemplate() { return html`
+

${this.createGradingScaleEntry( ["A", "B"], @@ -78,20 +86,6 @@ class AnalysisExplainer extends MozLitElement { `; } - getRetailerDisplayName() { - if (!this.productURL) { - return ""; - } - let url = new URL(this.productURL); - let hostname = url.hostname; - let displayNames = { - "www.amazon.com": "Amazon", - "www.bestbuy.com": "Best Buy", - "www.walmart.com": "Walmart", - }; - return displayNames[hostname]; - } - render() { return html`

${this.getGradesDescriptionTemplate()} - ${this.getGradingScaleListTemplate()}

+ ${this.getGradingScaleListTemplate()} diff --git a/browser/components/shopping/content/letter-grade.mjs b/browser/components/shopping/content/letter-grade.mjs index 71badb1c4578..c171b6d3ed24 100644 --- a/browser/components/shopping/content/letter-grade.mjs +++ b/browser/components/shopping/content/letter-grade.mjs @@ -25,7 +25,7 @@ class LetterGrade extends MozLitElement { get fluentStrings() { if (!this._fluentStrings) { - this._fluentStrings = new Localization(["browser/shopping.ftl"], true); + this._fluentStrings = new Localization(["preview/shopping.ftl"], true); } return this._fluentStrings; } diff --git a/browser/components/shopping/content/recommended-ad.mjs b/browser/components/shopping/content/recommended-ad.mjs index 821acf803a71..5d8dc133ee54 100644 --- a/browser/components/shopping/content/recommended-ad.mjs +++ b/browser/components/shopping/content/recommended-ad.mjs @@ -111,7 +111,6 @@ class RecommendedAd extends MozLitElement { -

`; } } diff --git a/browser/components/shopping/content/settings.css b/browser/components/shopping/content/settings.css index 8a84470cb8d4..405d911e8c21 100644 --- a/browser/components/shopping/content/settings.css +++ b/browser/components/shopping/content/settings.css @@ -14,13 +14,3 @@ display: flex; justify-self: center; } - -#powered-by-fakespot { - font-size: 12px; - color: var(--text-color-deemphasized); -} - -#shopping-ads-learn-more { - margin-inline-end: 20px; - color: var(--text-color-deemphasized); -} diff --git a/browser/components/shopping/content/settings.mjs b/browser/components/shopping/content/settings.mjs index df5373e98875..2d55a3eea658 100644 --- a/browser/components/shopping/content/settings.mjs +++ b/browser/components/shopping/content/settings.mjs @@ -12,8 +12,6 @@ import { MozLitElement } from "chrome://global/content/lit-utils.mjs"; // eslint-disable-next-line import/no-unassigned-import import "chrome://global/content/elements/moz-toggle.mjs"; -import { FAKESPOT_BASE_URL } from "chrome://global/content/shopping/ProductConfig.mjs"; - class ShoppingSettings extends MozLitElement { static properties = { adsEnabledByUser: { type: Boolean }, @@ -52,14 +50,7 @@ class ShoppingSettings extends MozLitElement { data-l10n-id="shopping-settings-recommendations-toggle" data-l10n-attrs="label" @toggle=${this.onToggleRecommendations}> - - - - ` + ` : null; return html` @@ -81,17 +72,6 @@ class ShoppingSettings extends MozLitElement { > -

- -

`; } } diff --git a/browser/components/shopping/content/shopping-container.mjs b/browser/components/shopping/content/shopping-container.mjs index 3be0263fb040..b7ac74799790 100644 --- a/browser/components/shopping/content/shopping-container.mjs +++ b/browser/components/shopping/content/shopping-container.mjs @@ -127,9 +127,7 @@ export class ShoppingContainer extends MozLitElement { - + ${this.recommendationTemplate()} `; } diff --git a/browser/components/shopping/content/shopping.ftl b/browser/components/shopping/content/shopping.ftl index d334493433eb..c355c821f9b0 100644 --- a/browser/components/shopping/content/shopping.ftl +++ b/browser/components/shopping/content/shopping.ftl @@ -6,6 +6,143 @@ ### being translated as the feature is still in heavy development ### and strings are likely to change often. +shopping-page-title = { -brand-product-name } Shopping + +# Title for page showing where a user can check the +# review quality of online shopping product reviews +shopping-main-container-title = Review quality check +shopping-close-button = + .title = Close +# This string is for notifying screen reader users that the +# sidebar is still loading data. +shopping-a11y-loading = + .aria-label = Loading… + +more-to-consider-ad-label = + .label = More to consider + +## Strings for the letter grade component. +## For now, we only support letter grades A, B, C, D and F. +## Letter A indicates the highest grade, and F indicates the lowest grade. +## Letters are hardcoded and cannot be localized. + +shopping-letter-grade-description-ab = Reliable reviews +shopping-letter-grade-description-c = Only some reliable reviews +shopping-letter-grade-description-df = Unreliable reviews + +# This string is displayed in a tooltip that appears when the user hovers +# over the letter grade component without a visible description. +# It is also used for screen readers. +# $letter (String) - The letter grade as A, B, C, D or F (hardcoded). +# $description (String) - The localized letter grade description. See shopping-letter-grade-description-* strings above. +shopping-letter-grade-tooltip = + .title = { $letter } - { $description } + +## Strings for the shopping message-bar + +shopping-message-bar-warning-stale-analysis-title = Updates available +shopping-message-bar-warning-stale-analysis-message = Re-analyze the reviews for this product, so you have the latest info. +shopping-message-bar-warning-stale-analysis-link = Re-analyze reviews + +shopping-message-bar-generic-error-title = Something went wrong +shopping-message-bar-generic-error-message = Couldn’t load information. Please try again later. + +shopping-message-bar-warning-not-enough-reviews-title = Not enough reviews yet +shopping-message-bar-warning-not-enough-reviews-message = When this product has more reviews, we’ll be able to analyze them. + +shopping-message-bar-warning-product-not-available-title = Product is not available +shopping-message-bar-warning-product-not-available-message = If you see that this product is back in stock, report it to us and we’ll work on updating the analysis. +shopping-message-bar-warning-product-not-available-button = Report this product is back in stock + +shopping-message-bar-thanks-for-reporting-title = Thanks for reporting! +shopping-message-bar-thanks-for-reporting-message = We should have an updated analysis within 24 hours. Please check back. + +shopping-message-bar-warning-product-not-available-reported-title = Analysis coming soon +shopping-message-bar-warning-product-not-available-reported-message = An updated analysis should be ready within 24 hours. Please check back. + +shopping-message-bar-warning-offline-title = No network connection +shopping-message-bar-warning-offline-message = Check your network connection. Then, try reloading the page. + +shopping-message-bar-analysis-in-progress-title = Analysis coming soon +shopping-message-bar-analysis-in-progress-message = When it’s done, we’ll automatically show the updated info here. + +## Strings for the product review snippets card + +shopping-highlights-label = + .label = Snippets from recent reviews + +shopping-highlight-price = Price +shopping-highlight-quality = Quality +shopping-highlight-shipping = Shipping +shopping-highlight-competitiveness = Competitiveness +shopping-highlight-packaging = Packaging + +## Strings for show more card + +shopping-show-more-button = Show more +shopping-show-less-button = Show less + +## Strings for the settings card + +shopping-settings-label = + .label = Settings +shopping-settings-recommendations-toggle = + .label = Show products recommended by { -brand-product-name } +shopping-settings-opt-out-button = Turn off review quality check + +## Strings for the adjusted rating component + +shopping-adjusted-rating-label = + .label = Adjusted rating +shopping-adjusted-rating-unreliable-reviews = Unreliable reviews removed + +## Strings for the review reliability component + +shopping-review-reliability-label = + .label = How reliable are these reviews? + +## Strings for the analysis explainer component + +shopping-analysis-explainer-label = + .label = How we determine review quality + +shopping-analysis-explainer-intro = + { -brand-product-name } uses AI technology from { -fakespot-brand-name } to analyze the quality and reliability of product reviews. + This is only provided to help you assess review quality, not product quality. + +shopping-analysis-explainer-grades-intro = + We assign each product’s reviews a letter grade from A to F. +shopping-analysis-explainer-higher-grade-description = + A higher grade means we believe the reviews are likely from real customers who left honest, unbiased reviews. +shopping-analysis-explainer-lower-grade-description = + A lower grade means we believe the reviews are likely from paid or biased reviewers. + +shopping-analysis-explainer-adjusted-rating-description = + The adjusted rating is based on review quality, with unreliable reviews removed. +shopping-analysis-explainer-highlights-description = + Highlights are pulled from recent Amazon reviews (from the last 80 days), that we believe to be reliable. + +shopping-analysis-explainer-learn-more = + Learn more about how { -fakespot-brand-name } determines review quality. + +shopping-analysis-explainer-review-grading-scale = Review grading scale: +shopping-analysis-explainer-review-grading-scale-reliable = We believe the reviews to be reliable +shopping-analysis-explainer-review-grading-scale-mixed = We believe there’s a mix of reliable and unreliable reviews +shopping-analysis-explainer-review-grading-scale-unreliable = We believe the reviews are unreliable + +## Strings for UrlBar button + +shopping-sidebar-open-button = + .tooltiptext = Open shopping sidebar +shopping-sidebar-close-button = + .tooltiptext = Close shopping sidebar + +## Strings for the unanalyzed product card. + +shopping-unanalyzed-product-header = No analysis for these reviews yet +shopping-unanalyzed-product-message = You’re about 60 seconds away from knowing whether you can trust the reviews for this product. +shopping-unanalyzed-product-analyze-link = Analyze reviews + ## Onboarding message strings. shopping-onboarding-headline = Try our trusted guide to product reviews diff --git a/browser/components/shopping/content/shopping.html b/browser/components/shopping/content/shopping.html index 4978e7bf985a..af7fccff44d2 100644 --- a/browser/components/shopping/content/shopping.html +++ b/browser/components/shopping/content/shopping.html @@ -16,7 +16,6 @@ - diff --git a/browser/components/shopping/content/unanalyzed.mjs b/browser/components/shopping/content/unanalyzed.mjs index 05905009623c..9982a80e155e 100644 --- a/browser/components/shopping/content/unanalyzed.mjs +++ b/browser/components/shopping/content/unanalyzed.mjs @@ -10,8 +10,6 @@ import { MozLitElement } from "chrome://global/content/lit-utils.mjs"; // eslint-disable-next-line import/no-unassigned-import import "chrome://browser/content/shopping/shopping-card.mjs"; -import { FAKESPOT_ANALYSIS_URL } from "chrome://global/content/shopping/ProductConfig.mjs"; - class UnanalyzedProductCard extends MozLitElement { static properties = { productURL: { type: String, reflect: true }, @@ -32,6 +30,7 @@ class UnanalyzedProductCard extends MozLitElement { ); } + // TODO: add link for product analysis once finalized render() { return html` Learn more -shopping-settings-opt-out-button = Turn off review checker -powered-by-fakespot = Review checker is powered by { -fakespot-brand-full-name }. - -## Strings for the adjusted rating component - -shopping-adjusted-rating-label = - .label = Adjusted rating -shopping-adjusted-rating-unreliable-reviews = Unreliable reviews removed - -## Strings for the review reliability component - -shopping-review-reliability-label = - .label = How reliable are these reviews? - -## Strings for the analysis explainer component - -shopping-analysis-explainer-label = - .label = How we determine review quality -shopping-analysis-explainer-intro = - We use AI technology from { -fakespot-brand-full-name } to analyze the reliability of product reviews. - This analysis will only help you assess review quality, not product quality. -shopping-analysis-explainer-grades-intro = - We assign each product’s reviews a letter grade from A to F. -shopping-analysis-explainer-adjusted-rating-description = - The adjusted rating is based only on reviews we believe to be reliable. -shopping-analysis-explainer-learn-more = - Learn more about how { -fakespot-brand-full-name } determines review quality. - -# This string includes the short brand name of one of the three supported -# websites, which will be inserted without being translated. -# $retailer (String) - capitalized name of the shopping website, for example, "Amazon". -shopping-analysis-explainer-highlights-description = - Highlights are from { $retailer } reviews within the last 80 days that we believe to be reliable. - -shopping-analysis-explainer-review-grading-scale-reliable = Reliable reviews. We believe the reviews are likely from real customers who left honest, unbiased reviews. -shopping-analysis-explainer-review-grading-scale-mixed = We believe there’s a mix of reliable and unreliable reviews. -shopping-analysis-explainer-review-grading-scale-unreliable = Unreliable reviews. We believe the reviews are likely fake or from biased reviewers. - -## Strings for UrlBar button - -shopping-sidebar-open-button = - .tooltiptext = Open shopping sidebar -shopping-sidebar-close-button = - .tooltiptext = Close shopping sidebar - -## Strings for the unanalyzed product card. -## The word 'analyzer' when used here reflects what this tool is called on -## fakespot.com. If possible, a different word should be used for the Fakespot -## tool (the Fakespot by Mozilla 'analyzer') other than 'checker', which is -## used in the name of the Firefox feature ('Review checker'). If that is not -## possible - if these terms are not meaningfully different - that is OK. - -shopping-unanalyzed-product-header = No analysis for these reviews yet -shopping-unanalyzed-product-message = Launch the { -fakespot-brand-full-name } analyzer and you’ll know in about 60 seconds whether this product’s reviews are reliable. -shopping-unanalyzed-product-analyze-link = Launch analyzer on { -fakespot-website-name } - -## Strings for the advertisement - -more-to-consider-ad-label = - .label = More to consider -ad-by-fakespot = Ad by { -fakespot-brand-name } diff --git a/toolkit/components/shopping/content/ProductConfig.mjs b/toolkit/components/shopping/content/ProductConfig.mjs index e40e880f7699..57f7f5844f47 100644 --- a/toolkit/components/shopping/content/ProductConfig.mjs +++ b/toolkit/components/shopping/content/ProductConfig.mjs @@ -27,9 +27,6 @@ const REPORTING_RESPONSE_SCHEMA = const REPORTING_REQUEST_SCHEMA = "chrome://global/content/shopping/reporting_request.schema.json"; -const FAKESPOT_BASE_URL = "https://www.fakespot.com/"; -const FAKESPOT_ANALYSIS_URL = "https://www.fakespot.com/analyze?url="; - const ProductConfig = { amazon: { productIdFromURLRegex: @@ -47,10 +44,7 @@ const ProductConfig = { }, }; -// Note (bug 1849401): the fakespot URLs are loaded by about page content, -// where `Cu` is undefined--hence the check here. Would be good to find a -// better approach. -if (typeof Cu !== "undefined" && Cu.isInAutomation) { +if (Cu.isInAutomation) { // Also allow example.com to allow for testing. ProductConfig.example = ProductConfig.amazon; ANALYSIS_API = @@ -78,7 +72,5 @@ export { REPORTING_API, REPORTING_RESPONSE_SCHEMA, REPORTING_REQUEST_SCHEMA, - FAKESPOT_BASE_URL, - FAKESPOT_ANALYSIS_URL, ProductConfig, }; diff --git a/toolkit/locales/en-US/toolkit/branding/brandings.ftl b/toolkit/locales/en-US/toolkit/branding/brandings.ftl index e446a1e651d8..11b0a6042b9b 100644 --- a/toolkit/locales/en-US/toolkit/branding/brandings.ftl +++ b/toolkit/locales/en-US/toolkit/branding/brandings.ftl @@ -30,12 +30,6 @@ -relay-brand-short-name = Relay -fakespot-brand-name = Fakespot -# Note the name of the website is capitalized. --fakespot-website-name = Fakespot.com - -# The particle "by" can be localized, "Fakespot" and "Mozilla" should not be localized or transliterated. --fakespot-brand-full-name = Fakespot by Mozilla - # “Suggest” can be localized, “Firefox” must be treated as a brand # and kept in English. -firefox-suggest-brand-name = Firefox Suggest