Migrate more strings to translation keys (#11694)
This commit is contained in:
parent
677854d318
commit
e1cfde0c6e
201 changed files with 21074 additions and 18552 deletions
|
@ -1228,7 +1228,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
|
||||
const isSpace = roomToLeave?.isSpaceRoom();
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: isSpace ? _t("Leave space") : _t("action|leave_room"),
|
||||
title: isSpace ? _t("space|leave_dialog_action") : _t("action|leave_room"),
|
||||
description: (
|
||||
<span>
|
||||
{isSpace
|
||||
|
@ -1271,7 +1271,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
if (room) RoomListStore.instance.manualRoomUpdate(room, RoomUpdateCause.RoomRemoved);
|
||||
})
|
||||
.catch((err) => {
|
||||
const errCode = err.errcode || _td("unknown error code");
|
||||
const errCode = err.errcode || _td("error|unknown_error_code");
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("error_dialog|forget_room_failed", { errCode }),
|
||||
description: err && err.message ? err.message : _t("invite|failed_generic"),
|
||||
|
|
|
@ -246,7 +246,7 @@ export default class RoomStatusBar extends React.PureComponent<IProps, IState> {
|
|||
<>
|
||||
<InlineSpinner w={20} h={20} />
|
||||
{/* span for css */}
|
||||
<span>{_t("Sending")}</span>
|
||||
<span>{_t("forward|sending")}</span>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -206,9 +206,9 @@ const Tile: React.FC<ITileProps> = ({
|
|||
);
|
||||
}
|
||||
|
||||
let description = _t("%(count)s members", { count: room.num_joined_members ?? 0 });
|
||||
let description = _t("common|n_members", { count: room.num_joined_members ?? 0 });
|
||||
if (numChildRooms !== undefined) {
|
||||
description += " · " + _t("%(count)s rooms", { count: numChildRooms });
|
||||
description += " · " + _t("common|n_rooms", { count: numChildRooms });
|
||||
}
|
||||
|
||||
let topic: ReactNode | string | null;
|
||||
|
@ -713,7 +713,7 @@ const ManageButtons: React.FC<IManageButtonsProps> = ({ hierarchy, selected, set
|
|||
kind="danger_outline"
|
||||
disabled={disabled}
|
||||
>
|
||||
{removing ? _t("Removing…") : _t("action|remove")}
|
||||
{removing ? _t("redact|ongoing") : _t("action|remove")}
|
||||
</Button>
|
||||
<Button
|
||||
{...props}
|
||||
|
@ -857,7 +857,7 @@ const SpaceHierarchy: React.FC<IProps> = ({ space, initialText = "", showRoom, a
|
|||
} else if (!hierarchy.canLoadMore) {
|
||||
results = (
|
||||
<div className="mx_SpaceHierarchy_noResults">
|
||||
<h3>{_t("No results found")}</h3>
|
||||
<h3>{_t("common|no_results_found")}</h3>
|
||||
<div>{_t("space|no_search_result_hint")}</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -407,7 +407,7 @@ const SpaceAddExistingRooms: React.FC<{
|
|||
{_t("create_space|skip_action")}
|
||||
</AccessibleButton>
|
||||
}
|
||||
filterPlaceholder={_t("Search for rooms")}
|
||||
filterPlaceholder={_t("space|room_filter_placeholder")}
|
||||
onFinished={onFinished}
|
||||
roomsRenderer={defaultRoomsRenderer}
|
||||
dmsRenderer={defaultDmsRenderer}
|
||||
|
@ -508,7 +508,7 @@ const SpaceSetupPrivateInvite: React.FC<{
|
|||
key={name}
|
||||
name={name}
|
||||
type="text"
|
||||
label={_t("Email address")}
|
||||
label={_t("common|email_address")}
|
||||
placeholder={_t("auth|email_field_label")}
|
||||
value={emailAddresses[i]}
|
||||
onChange={(ev: React.ChangeEvent<HTMLInputElement>) => setEmailAddress(i, ev.target.value)}
|
||||
|
@ -553,7 +553,7 @@ const SpaceSetupPrivateInvite: React.FC<{
|
|||
}
|
||||
} catch (err) {
|
||||
logger.error("Failed to invite users to space: ", err);
|
||||
setError(_t("We couldn't invite those users. Please check the users you want to invite and try again."));
|
||||
setError(_t("invite|error_invite"));
|
||||
}
|
||||
setBusy(false);
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ import classNames from "classnames";
|
|||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { SSOFlow, SSOAction } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { _t, _td, UserFriendlyError } from "../../../languageHandler";
|
||||
import { _t, UserFriendlyError } from "../../../languageHandler";
|
||||
import Login, { ClientLoginFlow, OidcNativeFlow } from "../../../Login";
|
||||
import { messageForConnectionError, messageForLoginError } from "../../../utils/ErrorUtils";
|
||||
import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils";
|
||||
|
@ -41,16 +41,6 @@ import { filterBoolean } from "../../../utils/arrays";
|
|||
import { Features } from "../../../settings/Settings";
|
||||
import { startOidcLogin } from "../../../utils/oidc/authorize";
|
||||
|
||||
// These are used in several places, and come from the js-sdk's autodiscovery
|
||||
// stuff. We define them here so that they'll be picked up by i18n.
|
||||
_td("Invalid homeserver discovery response");
|
||||
_td("Failed to get autodiscovery configuration from server");
|
||||
_td("Invalid base_url for m.homeserver");
|
||||
_td("Homeserver URL does not appear to be a valid Matrix homeserver");
|
||||
_td("Invalid identity server discovery response");
|
||||
_td("Invalid base_url for m.identity_server");
|
||||
_td("Identity server URL does not appear to be a valid identity server");
|
||||
_td("General failure");
|
||||
interface IProps {
|
||||
serverConfig: ValidatedServerConfig;
|
||||
// If true, the component will consider itself busy.
|
||||
|
|
|
@ -204,7 +204,7 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
|
|||
{useRecoveryKeyButton}
|
||||
</div>
|
||||
<div className="mx_SetupEncryptionBody_reset">
|
||||
{_t("Forgotten or lost all recovery methods? <a>Reset all</a>", undefined, {
|
||||
{_t("encryption|reset_all_button", undefined, {
|
||||
a: (sub) => (
|
||||
<AccessibleButton
|
||||
kind="link_inline"
|
||||
|
|
|
@ -315,7 +315,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
|
|||
<p>{_t("auth|soft_logout_warning")}</p>
|
||||
<div>
|
||||
<AccessibleButton onClick={this.onClearAll} kind="danger">
|
||||
{_t("Clear all data")}
|
||||
{_t("auth|soft_logout|clear_data_button")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</AuthBody>
|
||||
|
|
|
@ -72,7 +72,7 @@ export const EnterEmail: React.FC<EnterEmailProps> = ({
|
|||
<div className="mx_AuthBody_fieldRow">
|
||||
<EmailField
|
||||
name="reset_email" // define a name so browser's password autofill gets less confused
|
||||
label="Email address"
|
||||
label={_td("common|email_address")}
|
||||
labelRequired={_td("auth|forgot_password_email_required")}
|
||||
labelInvalid={_td("auth|forgot_password_email_invalid")}
|
||||
value={email}
|
||||
|
|
|
@ -94,7 +94,7 @@ export const VerifyEmailModal: React.FC<Props> = ({
|
|||
<AccessibleButton
|
||||
onClick={onCloseClick}
|
||||
className="mx_Dialog_cancelButton"
|
||||
aria-label={_t("Close dialog")}
|
||||
aria-label={_t("dialog_close_label")}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue