Loading browser/components/newtab/content-src/asrouter/asrouter-content.jsx +4 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { actionTypes as at } from "common/Actions.sys.mjs"; import { ASRouterUtils } from "./asrouter-utils"; import { generateBundles } from "./rich-text-strings"; import { ImpressionsWrapper } from "./components/ImpressionsWrapper/ImpressionsWrapper"; import { LocalizationProvider } from "fluent-react"; import { LocalizationProvider, ReactLocalization } from "@fluent/react"; import { NEWTAB_DARK_THEME } from "content-src/lib/constants"; import React from "react"; import ReactDOM from "react-dom"; Loading Loading @@ -285,7 +285,9 @@ export class ASRouterUISurface extends React.PureComponent { // This helps with testing document={this.props.document} > <LocalizationProvider bundles={generateBundles(content)}> <LocalizationProvider l10n={new ReactLocalization(generateBundles(content))} > <SnippetComponent {...this.state.message} UISurface="NEWTAB_FOOTER_BAR" Loading browser/components/newtab/content-src/asrouter/components/RichText/RichText.jsx +11 −9 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import { Localized } from "fluent-react"; import { Localized } from "@fluent/react"; import React from "react"; import { RICH_TEXT_KEYS } from "../../rich-text-strings"; import { safeURI } from "../../template-utils"; Loading Loading @@ -69,14 +69,16 @@ export function RichText(props) { return ( <Localized id={props.localization_id} {...ALLOWED_TAGS} {...props.customElements} {...convertLinks( elems={{ ...ALLOWED_TAGS, ...props.customElements, ...convertLinks( props.links, props.sendClick, props.doNotAutoBlock, props.openNewWindow )} ), }} > <span>{props.text}</span> </Localized> Loading browser/components/newtab/content-src/asrouter/rich-text-strings.js +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import { FluentBundle } from "fluent"; import { FluentBundle, FluentResource } from "@fluent/bundle"; /** * Properties that allow rich text MUST be added to this list. Loading Loading @@ -38,7 +38,7 @@ export function generateBundles(content) { const attr = attrsToTry.pop(); string = content[attr]; } bundle.addMessages(`${key} = ${string}`); bundle.addResource(new FluentResource(`${key} = ${string}`)); }); return [bundle]; } browser/components/newtab/data/content/activity-stream.bundle.js +1033 −1110 File changed.Preview size limit exceeded, changes collapsed. Show changes browser/components/newtab/karma.mc.config.js +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ module.exports = function(config) { }, { test: /\.js$/, exclude: [/node_modules\/(?!(fluent|fluent-react)\/).*/, /test/], exclude: [/node_modules\/(?!@fluent\/).*/, /test/], loader: "babel-loader", options: { // This is a workaround for bug 1787278. It can be removed once Loading Loading
browser/components/newtab/content-src/asrouter/asrouter-content.jsx +4 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { actionTypes as at } from "common/Actions.sys.mjs"; import { ASRouterUtils } from "./asrouter-utils"; import { generateBundles } from "./rich-text-strings"; import { ImpressionsWrapper } from "./components/ImpressionsWrapper/ImpressionsWrapper"; import { LocalizationProvider } from "fluent-react"; import { LocalizationProvider, ReactLocalization } from "@fluent/react"; import { NEWTAB_DARK_THEME } from "content-src/lib/constants"; import React from "react"; import ReactDOM from "react-dom"; Loading Loading @@ -285,7 +285,9 @@ export class ASRouterUISurface extends React.PureComponent { // This helps with testing document={this.props.document} > <LocalizationProvider bundles={generateBundles(content)}> <LocalizationProvider l10n={new ReactLocalization(generateBundles(content))} > <SnippetComponent {...this.state.message} UISurface="NEWTAB_FOOTER_BAR" Loading
browser/components/newtab/content-src/asrouter/components/RichText/RichText.jsx +11 −9 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import { Localized } from "fluent-react"; import { Localized } from "@fluent/react"; import React from "react"; import { RICH_TEXT_KEYS } from "../../rich-text-strings"; import { safeURI } from "../../template-utils"; Loading Loading @@ -69,14 +69,16 @@ export function RichText(props) { return ( <Localized id={props.localization_id} {...ALLOWED_TAGS} {...props.customElements} {...convertLinks( elems={{ ...ALLOWED_TAGS, ...props.customElements, ...convertLinks( props.links, props.sendClick, props.doNotAutoBlock, props.openNewWindow )} ), }} > <span>{props.text}</span> </Localized> Loading
browser/components/newtab/content-src/asrouter/rich-text-strings.js +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import { FluentBundle } from "fluent"; import { FluentBundle, FluentResource } from "@fluent/bundle"; /** * Properties that allow rich text MUST be added to this list. Loading Loading @@ -38,7 +38,7 @@ export function generateBundles(content) { const attr = attrsToTry.pop(); string = content[attr]; } bundle.addMessages(`${key} = ${string}`); bundle.addResource(new FluentResource(`${key} = ${string}`)); }); return [bundle]; }
browser/components/newtab/data/content/activity-stream.bundle.js +1033 −1110 File changed.Preview size limit exceeded, changes collapsed. Show changes
browser/components/newtab/karma.mc.config.js +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ module.exports = function(config) { }, { test: /\.js$/, exclude: [/node_modules\/(?!(fluent|fluent-react)\/).*/, /test/], exclude: [/node_modules\/(?!@fluent\/).*/, /test/], loader: "babel-loader", options: { // This is a workaround for bug 1787278. It can be removed once Loading