Use internationalization for user facing strings

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-03 22:56:49 +05:30
parent 986f04aac0
commit a3587a80c6

View file

@ -5,7 +5,7 @@ import { AvatarView } from "../../avatar.js";
export class RoomInfoView extends TemplateView {
render(t, vm) {
const encryptionString = vm.isEncrypted ? "On" : "Off";
const encryptionString = vm.isEncrypted ? vm.i18n`On` : vm.i18n`Off`;
return t.div({ className: "RoomInfo" }, [
this._createButton(vm),
@ -15,8 +15,8 @@ export class RoomInfoView extends TemplateView {
this._createRoomAliasDisplay(vm),
t.div({ className: "SidebarRow_collection" },
[
this._createSideBarRow("People", vm.memberCount, { MemberCount: true }),
this._createSideBarRow("Encryption", encryptionString, { EncryptionStatus: true })
this._createSideBarRow(vm.i18n`People`, vm.memberCount, { MemberCount: true }),
this._createSideBarRow(vm.i18n`Encryption`, encryptionString, { EncryptionStatus: true })
])
]);
}