Fix instances of double translation and guard translation calls using typescript (#11443)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
d13b6e1b41
commit
ac70f7ac9b
157 changed files with 554 additions and 780 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import React, { ReactNode } from "react";
|
||||
import { MatrixError, ConnectionError } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { _t, _td, Tags, TranslatedString } from "../languageHandler";
|
||||
import { _t, _td, Tags, TranslatedString, TranslationKey } from "../languageHandler";
|
||||
import SdkConfig from "../SdkConfig";
|
||||
import { ValidatedServerConfig } from "./ValidatedServerConfig";
|
||||
import ExternalLink from "../components/views/elements/ExternalLink";
|
||||
|
@ -49,7 +49,7 @@ export const adminContactStrings = {
|
|||
export function messageForResourceLimitError(
|
||||
limitType: string | undefined,
|
||||
adminContact: string | undefined,
|
||||
strings: Record<string, string>,
|
||||
strings: Record<string, TranslationKey>,
|
||||
extraTranslations?: Tags,
|
||||
): TranslatedString {
|
||||
let errString = limitType ? strings[limitType] : undefined;
|
||||
|
@ -154,8 +154,7 @@ export function messageForConnectionError(
|
|||
return (
|
||||
<span>
|
||||
{_t(
|
||||
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. " +
|
||||
"Either use HTTPS or <a>enable unsafe scripts</a>.",
|
||||
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
|
||||
{},
|
||||
{
|
||||
a: (sub) => {
|
||||
|
@ -178,9 +177,7 @@ export function messageForConnectionError(
|
|||
return (
|
||||
<span>
|
||||
{_t(
|
||||
"Can't connect to homeserver - please check your connectivity, ensure your " +
|
||||
"<a>homeserver's SSL certificate</a> is trusted, and that a browser extension " +
|
||||
"is not blocking requests.",
|
||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
|
||||
{},
|
||||
{
|
||||
a: (sub) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue