commit 15ea4165414ad220e12c4f7297dba82b12092ed0
parent db0a1bb9944c78cf37b8953a9158f2367c601e31
Author: Reem H <42309026+reemhamz@users.noreply.github.com>
Date: Fri, 9 Jan 2026 04:41:09 +0000
Bug 2009090 - Add l10n strings for Weather Forecast widget. r=home-newtab-reviewers,fluent-reviewers,nina-py,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D278228
Diffstat:
3 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/browser/extensions/newtab/content-src/components/Widgets/WeatherForecast/WeatherForecast.jsx b/browser/extensions/newtab/content-src/components/Widgets/WeatherForecast/WeatherForecast.jsx
@@ -60,7 +60,10 @@ function WeatherForecast() {
</div>
<hr />
<div className="forecast-row">
- <p className="today-forecast">Today's forecast</p>
+ <p
+ className="today-forecast"
+ data-l10n-id="newtab-weather-todays-forecast"
+ ></p>
<ul className="forecast-row-items">
<li>
<span>80°</span>
@@ -101,10 +104,16 @@ function WeatherForecast() {
</div>
<div className="weather-forecast-footer">
- <a href="#" className="full-forecast">
- See full forecast
- </a>
- <span className="sponsored-text">Accuweather Sponsored</span>
+ <a
+ href="#"
+ className="full-forecast"
+ data-l10n-id="newtab-weather-see-full-forecast"
+ ></a>
+ <span
+ className="sponsored-text"
+ data-l10n-id="newtab-weather-sponsored"
+ data-l10n-args='{"provider": "AccuWeather®"}'
+ ></span>
</div>
</article>
);
diff --git a/browser/extensions/newtab/data/content/activity-stream.bundle.js b/browser/extensions/newtab/data/content/activity-stream.bundle.js
@@ -13108,8 +13108,9 @@ function WeatherForecast() {
}), WEATHER_SUGGESTION.forecast.low[prefs["weather.temperatureUnits"]], "\xB0"))), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement("div", {
className: "forecast-row"
}, /*#__PURE__*/React.createElement("p", {
- className: "today-forecast"
- }, "Today's forecast"), /*#__PURE__*/React.createElement("ul", {
+ className: "today-forecast",
+ "data-l10n-id": "newtab-weather-todays-forecast"
+ }), /*#__PURE__*/React.createElement("ul", {
className: "forecast-row-items"
}, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("span", null, "80\xB0"), /*#__PURE__*/React.createElement("span", {
className: `weather-icon iconId${WEATHER_SUGGESTION.current_conditions.icon_id}`
@@ -13125,10 +13126,13 @@ function WeatherForecast() {
className: "weather-forecast-footer"
}, /*#__PURE__*/React.createElement("a", {
href: "#",
- className: "full-forecast"
- }, "See full forecast"), /*#__PURE__*/React.createElement("span", {
- className: "sponsored-text"
- }, "Accuweather Sponsored")));
+ className: "full-forecast",
+ "data-l10n-id": "newtab-weather-see-full-forecast"
+ }), /*#__PURE__*/React.createElement("span", {
+ className: "sponsored-text",
+ "data-l10n-id": "newtab-weather-sponsored",
+ "data-l10n-args": "{\"provider\": \"AccuWeather\xAE\"}"
+ })));
}
;// CONCATENATED MODULE: ./content-src/components/DiscoveryStreamComponents/FeatureHighlight/WidgetsFeatureHighlight.jsx
diff --git a/browser/locales/en-US/browser/newtab/newtab.ftl b/browser/locales/en-US/browser/newtab/newtab.ftl
@@ -379,6 +379,8 @@ newtab-weather-change-location-search-input-placeholder =
.placeholder = Search location
.aria-label = Search location
newtab-weather-menu-weather-display = Weather display
+newtab-weather-todays-forecast = Today’s forecast
+newtab-weather-see-full-forecast = See full forecast
# Display options are:
# - Simple: Displays a current weather condition icon and the current temperature
# - Detailed: Include simple information plus a short text summary: e.g. "Mostly cloudy"