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
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
import React, { ChangeEvent, ReactNode, useContext, useMemo, useRef, useState } from "react";
|
||||
import { IContent, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { _t, _td } from "../../../../languageHandler";
|
||||
import { _t, _td, TranslationKey } from "../../../../languageHandler";
|
||||
import Field from "../../elements/Field";
|
||||
import BaseTool, { DevtoolsContext, IDevtoolsProps } from "./BaseTool";
|
||||
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
||||
|
@ -37,7 +37,7 @@ interface IEventEditorProps extends Pick<IDevtoolsProps, "onBack"> {
|
|||
|
||||
interface IFieldDef {
|
||||
id: string;
|
||||
label: string; // _td
|
||||
label: TranslationKey;
|
||||
default?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ import { VerificationPhase as Phase, VerificationRequestEvent } from "matrix-js-
|
|||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||
|
||||
import { useTypedEventEmitter, useTypedEventEmitterState } from "../../../../hooks/useEventEmitter";
|
||||
import { _t, _td } from "../../../../languageHandler";
|
||||
import { _t, _td, TranslationKey } from "../../../../languageHandler";
|
||||
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
||||
import BaseTool, { DevtoolsContext, IDevtoolsProps } from "./BaseTool";
|
||||
import { Tool } from "../DevtoolsDialog";
|
||||
|
||||
const PHASE_MAP: Record<Phase, string> = {
|
||||
const PHASE_MAP: Record<Phase, TranslationKey> = {
|
||||
[Phase.Unsent]: _td("Unsent"),
|
||||
[Phase.Requested]: _td("Requested"),
|
||||
[Phase.Ready]: _td("Ready"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue