Consolidate conjugation i18n strings (#11660)

This commit is contained in:
Michael Telatynski
2023-09-25 12:18:15 +01:00
committed by GitHub
parent f841757906
commit 0f59298f30
59 changed files with 371 additions and 283 deletions
+3 -8
View File
@@ -49,6 +49,7 @@ import { SettingLevel } from "./settings/SettingLevel";
import MatrixClientBackedController from "./settings/controllers/MatrixClientBackedController";
import ErrorDialog from "./components/views/dialogs/ErrorDialog";
import PlatformPeg from "./PlatformPeg";
import { formatList } from "./utils/FormattingUtils";
export interface IMatrixClientCreds {
homeserverUrl: string;
@@ -356,15 +357,9 @@ class MatrixClientPegClass implements IMatrixClientPeg {
if (name) return name;
if (names.length === 2 && count === 2) {
return _t("user1_and_user2", {
user1: names[0],
user2: names[1],
});
return formatList(names);
}
return _t("user_and_n_others", {
user: names[0],
count: count - 1,
});
return formatList(names, 1);
}
private inviteeNamesToRoomName(names: string[], count: number): string {