Re-key all |zero-pluralised translations for Localazy compatibility (#11417)
* Re-key all |zero-pluralised translations for Localazy compatibility * Add missing interpolation variable * i18n * Add test coverage * Improve coverage
This commit is contained in:
parent
a5107518b5
commit
6b14ecfdf9
51 changed files with 270 additions and 158 deletions
|
@ -43,11 +43,17 @@ export function roomContextDetails(room: Room): RoomContextDetails | null {
|
|||
ariaLabel: _t("In spaces %(space1Name)s and %(space2Name)s.", { space1Name, space2Name }),
|
||||
};
|
||||
} else if (parent) {
|
||||
const spaceName = room.client.getRoom(parent)?.name;
|
||||
const spaceName = room.client.getRoom(parent)?.name ?? "";
|
||||
const count = otherParents.length;
|
||||
if (count > 0) {
|
||||
return {
|
||||
details: _t("%(spaceName)s and %(count)s others", { spaceName, count }),
|
||||
ariaLabel: _t("In %(spaceName)s and %(count)s other spaces.", { spaceName, count }),
|
||||
};
|
||||
}
|
||||
return {
|
||||
details: _t("%(spaceName)s and %(count)s others", { spaceName, count }),
|
||||
ariaLabel: _t("In %(spaceName)s and %(count)s other spaces.", { spaceName, count }),
|
||||
details: spaceName,
|
||||
ariaLabel: _t("In %(spaceName)s.", { spaceName }),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue