|
1840 | 1840 | note: "Button shown in an error page that warns users of security risks on a website due to Phishing or Malware issues. The buttons allows the user to visit the website anyway despite the risks."
|
1841 | 1841 | },
|
1842 | 1842 | malwarePageHeading: {
|
1843 |
| - title: "Warning: This site may put your personal information at risk", |
1844 |
| - note: "Title shown in an error page that warn users of security risks on a website due to malware distribution" |
| 1843 | + title: "Warning: This site may be a{newline}security risk", |
| 1844 | + note: "Title shown in an error page that warn users of security risks on a website due to malware distribution. The {newline} tag should not be translated. It should be placed within the sentence to avoid having a single word hanging on the last line" |
| 1845 | + }, |
| 1846 | + malwareTabTitle: { |
| 1847 | + title: "Warning: Security Risk", |
| 1848 | + note: "Title shown in the browser window or tab when the current page may be a security risk due to malware" |
1845 | 1849 | },
|
1846 | 1850 | malwareWarningText: {
|
1847 |
| - title: "DuckDuckGo blocked this page because it may be distributing malware designed to compromise your device or steal your personal information. <a>Learn more</a>", |
1848 |
| - note: "Error description shown in an error page that warns users of security risks on a website due to malware distribution." |
| 1851 | + title: "DuckDuckGo blocked this page because it may be distributing malware designed to compromise your device or steal your personal information.{newline}<a>Learn more</a>", |
| 1852 | + note: "Error description shown in an error page that warns users of security risks on a website due to malware distribution. The {newline} tag should not be translated. It should be placed before the translated <a>Learn More</a> text." |
1849 | 1853 | },
|
1850 | 1854 | malwareAdvancedInfoHeading: {
|
1851 | 1855 | title: "If you believe this website is safe, you can <a>report an error</a>. You can still visit the website at your own risk.",
|
1852 | 1856 | note: "Title of the Advanced info section shown in an error page that warns users of security risks on a website due to malware distribution."
|
1853 | 1857 | },
|
1854 | 1858 | phishingPageHeading: {
|
1855 |
| - title: "Warning: This site may put your personal information at risk", |
1856 |
| - note: "Title shown in an error page that warn users of security risks on a website due to Phishing issues" |
| 1859 | + title: "Warning: This site may be a{newline}security risk", |
| 1860 | + note: "Title shown in an error page that warn users of security risks on a website due to Phishing issues. The {newline} tag should not be translated. It should be placed within the sentence to avoid having a single word hanging on the last line" |
| 1861 | + }, |
| 1862 | + phishingTabTitle: { |
| 1863 | + title: "Warning: Security Risk", |
| 1864 | + note: "Title shown in the browser window or tab when the current page may be a security risk due to phishing" |
1857 | 1865 | },
|
1858 | 1866 | phishingWarningText: {
|
1859 |
| - title: "This website may be impersonating a legitimate site in order to trick you into providing personal information, such as passwords or credit card numbers. <a>Learn more</a>", |
1860 |
| - note: "Error description shown in an error page that warns users of security risks on a website due to Phishing issues." |
| 1867 | + title: "This website may be impersonating a legitimate site in order to trick you into providing personal information, such as passwords or credit card numbers.{newline}<a>Learn more</a>", |
| 1868 | + note: "Error description shown in an error page that warns users of security risks on a website due to Phishing issues. The {newline} tag should not be translated. It should be placed before the translated <a>Learn More</a> text." |
1861 | 1869 | },
|
1862 | 1870 | phishingAdvancedInfoHeading: {
|
1863 | 1871 | title: "If you believe this website is safe, you can <a>report an error</a>. You can still visit the website at your own risk.",
|
|
1939 | 1947 | }
|
1940 | 1948 | };
|
1941 | 1949 | var helpPageAnchorTagParams = {
|
1942 |
| - "data-line-break": true, |
1943 | 1950 | href: phishingMalwareHelpPageURL,
|
1944 | 1951 | target: "_blank"
|
1945 | 1952 | };
|
|
1956 | 1963 | const { t: t3 } = useTypedTranslation();
|
1957 | 1964 | const { kind } = useErrorData();
|
1958 | 1965 | if (kind === "phishing") {
|
1959 |
| - return t3("phishingPageHeading"); |
| 1966 | + return t3("phishingPageHeading").replace("{newline}", "\n"); |
1960 | 1967 | }
|
1961 | 1968 | if (kind === "malware") {
|
1962 |
| - return t3("malwarePageHeading"); |
| 1969 | + return t3("malwarePageHeading").replace("{newline}", "\n"); |
1963 | 1970 | }
|
1964 | 1971 | if (kind === "ssl") {
|
1965 | 1972 | return t3("sslPageHeading");
|
|
1971 | 1978 | const errorData = useErrorData();
|
1972 | 1979 | const { kind } = useErrorData();
|
1973 | 1980 | if (kind === "phishing") {
|
1974 |
| - return [/* @__PURE__ */ g(Trans, { str: t3("phishingWarningText"), values: { a: helpPageAnchorTagParams } })]; |
| 1981 | + const text = t3("phishingWarningText").replace("{newline}", "\n"); |
| 1982 | + return [/* @__PURE__ */ g(Trans, { str: text, values: { a: helpPageAnchorTagParams } })]; |
1975 | 1983 | }
|
1976 | 1984 | if (kind === "malware") {
|
1977 |
| - return [/* @__PURE__ */ g(Trans, { str: t3("malwareWarningText"), values: { a: helpPageAnchorTagParams } })]; |
| 1985 | + const text = t3("malwareWarningText").replace("{newline}", "\n"); |
| 1986 | + return [/* @__PURE__ */ g(Trans, { str: text, values: { a: helpPageAnchorTagParams } })]; |
1978 | 1987 | }
|
1979 | 1988 | if (kind === "ssl") {
|
1980 | 1989 | const { domain } = (
|
|
2169 | 2178 | phishing: "Warning_phishing",
|
2170 | 2179 | malware: "Warning_malware",
|
2171 | 2180 | button: "Warning_button",
|
2172 |
| - advanced: "Warning_advanced" |
| 2181 | + advanced: "Warning_advanced", |
| 2182 | + title: "Warning_title" |
2173 | 2183 | };
|
2174 | 2184 |
|
2175 | 2185 | // pages/special-error/app/components/Warning.jsx
|
|
2204 | 2214 | const { kind } = useErrorData();
|
2205 | 2215 | const heading = useWarningHeading();
|
2206 | 2216 | const platformName = usePlatformName();
|
2207 |
| - return /* @__PURE__ */ g("header", { className: (0, import_classnames3.default)(Warning_default.heading, Warning_default[kind]) }, /* @__PURE__ */ g("i", { className: Warning_default.icon, "aria-hidden": "true" }), /* @__PURE__ */ g(Text, { as: "h1", variant: platformName === "macos" ? "title-2-emphasis" : "title-2", strictSpacing: platformName !== "macos" }, heading)); |
| 2217 | + return /* @__PURE__ */ g("header", { className: (0, import_classnames3.default)(Warning_default.heading, Warning_default[kind]) }, /* @__PURE__ */ g("i", { className: Warning_default.icon, "aria-hidden": "true" }), /* @__PURE__ */ g( |
| 2218 | + Text, |
| 2219 | + { |
| 2220 | + as: "h1", |
| 2221 | + variant: platformName === "macos" ? "title-2-emphasis" : "title-2", |
| 2222 | + strictSpacing: platformName !== "macos", |
| 2223 | + className: Warning_default.title |
| 2224 | + }, |
| 2225 | + heading |
| 2226 | + )); |
2208 | 2227 | }
|
2209 | 2228 | function WarningContent() {
|
2210 | 2229 | const content = useWarningContent();
|
|
2230 | 2249 | y2(() => {
|
2231 | 2250 | switch (kind) {
|
2232 | 2251 | case "malware":
|
2233 |
| - document.title = t3("malwarePageHeading"); |
| 2252 | + document.title = t3("malwareTabTitle"); |
2234 | 2253 | break;
|
2235 | 2254 | case "phishing":
|
2236 |
| - document.title = t3("phishingPageHeading"); |
| 2255 | + document.title = t3("phishingTabTitle"); |
2237 | 2256 | break;
|
2238 | 2257 | default:
|
2239 | 2258 | document.title = t3("sslPageHeading");
|
|
0 commit comments