Skip to content

Commit

Permalink
Unwrap string literals for Typescript to be happy
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Aug 21, 2023
1 parent 7f3d85c commit 2259dec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/async-components/structures/CompatibilityView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,13 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
<h2 id="step1_heading">{_t("Your browser can't run %(brand)s", { brand })}</h2>
<p>
{_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 },
)}
</p>
<p>
{_t(
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, " +
"or <safariLink>Safari</safariLink> for the best experience.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.",
{},
{
chromeLink: (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
Expand All @@ -131,8 +129,7 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
</p>
<p>
{_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.",
)}
</p>
<button onClick={onAccept}>{_t("I understand the risks and wish to continue")}</button>
Expand Down
3 changes: 1 addition & 2 deletions src/vector/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ async function verifyServerConfig(): Promise<IConfigOptions> {
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) {
Expand Down
3 changes: 1 addition & 2 deletions src/vector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ async function start(): Promise<void> {
// 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"),
Expand Down

0 comments on commit 2259dec

Please sign in to comment.