Migrate more strings to translation keys (#11651)

This commit is contained in:
Michael Telatynski
2023-09-22 16:39:40 +01:00
committed by GitHub
parent 560449676b
commit f4d056fd38
127 changed files with 8916 additions and 8272 deletions
+4 -6
View File
@@ -127,9 +127,7 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro
case "email": {
const isUrl = client.getIdentityServerUrl(true);
if (!isUrl) {
throw new UserFriendlyError(
'Cannot invite user by email without an identity server. You can connect to one under "Settings".',
);
throw new UserFriendlyError("cannot_invite_without_identity_server");
}
createOpts.invite_3pid = [
{
@@ -390,15 +388,15 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro
roomId,
});
logger.error("Failed to create room " + roomId + " " + err);
let description = _t("Server may be unavailable, overloaded, or you hit a bug.");
let description = _t("create_room|generic_error");
if (err.errcode === "M_UNSUPPORTED_ROOM_VERSION") {
// Technically not possible with the UI as of April 2019 because there's no
// options for the user to change this. However, it's not a bad thing to report
// the error to the user for if/when the UI is available.
description = _t("The server does not support the room version specified.");
description = _t("create_room|unsupported_version");
}
Modal.createDialog(ErrorDialog, {
title: _t("Failure to create room"),
title: _t("create_room|error_title"),
description,
});
return null;