From 2259decf741d7ca7ff9efb9d921a48cadb7e70d3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 21 Aug 2023 16:07:12 +0100 Subject: [PATCH] Unwrap string literals for Typescript to be happy --- src/async-components/structures/CompatibilityView.tsx | 9 +++------ src/vector/app.tsx | 3 +-- src/vector/index.ts | 3 +-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/async-components/structures/CompatibilityView.tsx b/src/async-components/structures/CompatibilityView.tsx index c6aafe0f82d..b866bc47f14 100644 --- a/src/async-components/structures/CompatibilityView.tsx +++ b/src/async-components/structures/CompatibilityView.tsx @@ -112,15 +112,13 @@ const CompatibilityView: React.FC = ({ onAccept }) => {

{_t("Your browser can't run %(brand)s", { brand })}

{_t( - "%(brand)s uses advanced browser features which aren't " + - "supported by your current browser.", + "%(brand)s uses advanced browser features which aren't supported by your current browser.", { brand }, )}

{_t( - "Please install Chrome, Firefox, " + - "or Safari for the best experience.", + "Please install Chrome, Firefox, or Safari for the best experience.", {}, { chromeLink: (sub) => {sub}, @@ -131,8 +129,7 @@ const CompatibilityView: React.FC = ({ onAccept }) => {

{_t( - "You can continue using your current browser, but some or all features may not work " + - "and the look and feel of the application may be incorrect.", + "You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.", )}

diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 2e389983ea6..3d7a7eaf403 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -147,8 +147,7 @@ async function verifyServerConfig(): Promise { if (hsUrl && (wkConfig || serverName)) { // noinspection ExceptionCaughtLocallyJS throw new UserFriendlyError( - "Invalid configuration: a default_hs_url can't be specified along with default_server_name " + - "or default_server_config", + "Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config", ); } if (incompatibleOptions.length < 1) { diff --git a/src/vector/index.ts b/src/vector/index.ts index d0a3a6e3ae4..b7dc6312f09 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -199,8 +199,7 @@ async function start(): Promise { // This uses the default brand since the app config is unavailable. return showError(_t("Your Element is misconfigured"), [ _t( - "Your Element configuration contains invalid JSON. " + - "Please correct the problem and reload the page.", + "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.", ), _t("The message from the parser is: %(message)s", { message: error.message || _t("Invalid JSON"),