Migrate more strings to translation keys (#11651)
This commit is contained in:
parent
560449676b
commit
f4d056fd38
127 changed files with 8916 additions and 8272 deletions
|
@ -149,7 +149,7 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
|
||||
public safeGet(): MatrixClient {
|
||||
if (!this.matrixClient) {
|
||||
throw new UserFriendlyError("User is not logged in");
|
||||
throw new UserFriendlyError("error_user_not_logged_in");
|
||||
}
|
||||
return this.matrixClient;
|
||||
}
|
||||
|
@ -209,10 +209,8 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
// For guests this is likely to happen during e-mail verification as part of registration
|
||||
|
||||
const { finished } = Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Database unexpectedly closed"),
|
||||
description: _t(
|
||||
"This may be caused by having the app open in multiple tabs or due to clearing browser data.",
|
||||
),
|
||||
title: _t("error_database_closed_title"),
|
||||
description: _t("error_database_closed_description"),
|
||||
button: _t("action|reload"),
|
||||
});
|
||||
const [reload] = await finished;
|
||||
|
@ -346,7 +344,7 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
private namesToRoomName(names: string[], count: number): string | undefined {
|
||||
const countWithoutMe = count - 1;
|
||||
if (!names.length) {
|
||||
return _t("Empty room");
|
||||
return _t("empty_room");
|
||||
}
|
||||
if (names.length === 1 && countWithoutMe <= 1) {
|
||||
return names[0];
|
||||
|
@ -358,12 +356,12 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
if (name) return name;
|
||||
|
||||
if (names.length === 2 && count === 2) {
|
||||
return _t("%(user1)s and %(user2)s", {
|
||||
return _t("user1_and_user2", {
|
||||
user1: names[0],
|
||||
user2: names[1],
|
||||
});
|
||||
}
|
||||
return _t("%(user)s and %(count)s others", {
|
||||
return _t("user_and_n_others", {
|
||||
user: names[0],
|
||||
count: count - 1,
|
||||
});
|
||||
|
@ -374,12 +372,12 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
if (name) return name;
|
||||
|
||||
if (names.length === 2 && count === 2) {
|
||||
return _t("Inviting %(user1)s and %(user2)s", {
|
||||
return _t("inviting_user1_and_user2", {
|
||||
user1: names[0],
|
||||
user2: names[1],
|
||||
});
|
||||
}
|
||||
return _t("Inviting %(user)s and %(count)s others", {
|
||||
return _t("inviting_user_and_n_others", {
|
||||
user: names[0],
|
||||
count: count - 1,
|
||||
});
|
||||
|
@ -420,11 +418,11 @@ class MatrixClientPegClass implements IMatrixClientPeg {
|
|||
}
|
||||
case RoomNameType.EmptyRoom:
|
||||
if (state.oldName) {
|
||||
return _t("Empty room (was %(oldName)s)", {
|
||||
return _t("empty_room_was_name", {
|
||||
oldName: state.oldName,
|
||||
});
|
||||
} else {
|
||||
return _t("Empty room");
|
||||
return _t("empty_room");
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue