diff options
Diffstat (limited to 'client-web/source/user/remote.ts')
-rw-r--r-- | client-web/source/user/remote.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts index aa5b1b4..b247511 100644 --- a/client-web/source/user/remote.ts +++ b/client-web/source/user/remote.ts @@ -7,7 +7,7 @@ import { RelayMessage } from "../../../common/packets.d.ts"; import { notify } from "../helper.ts"; -import { PO } from "../locale/mod.ts"; +import { tr } from "../locale.ts"; import { log } from "../logger.ts" import { PREFS } from "../preferences/mod.ts"; import { new_remote_resource, RemoteResource } from "../resource/mod.ts"; @@ -79,7 +79,7 @@ export class RemoteUser extends User { this.pc.close() this.room.remote_users.delete(this.id) this.room.element.removeChild(this.el) - if (PREFS.notify_leave) notify(PO.leave_message(this.display_name).join("")) + if (PREFS.notify_leave) notify(tr("chat.leave_message", { name: this.display_name })) this.room.chat.add_control_message({ leave: this }) } on_relay(message: RelayMessage) { @@ -89,7 +89,7 @@ export class RemoteUser extends User { if (message.answer) this.on_answer(message.answer) if (message.identify) { this.name = message.identify.username - if (PREFS.notify_join) notify(PO.join_message(this.display_name).join("")) + if (PREFS.notify_join) notify(tr("chat.join_message", { name: this.display_name })) this.room.chat.add_control_message({ join: this }) } if (message.preview_response) { @@ -187,13 +187,13 @@ export class RemoteUser extends User { async update_status() { const states: { [key in RTCIceConnectionState]: [string, string] } = { - new: [PO.status_no_conn, "neutral"], - checking: [PO.status_checking, "neutral"], - failed: [PO.status_failed, "fail"], - closed: [PO.status_disconnected, "neutral"], - completed: [PO.status_connected, "good"], - connected: [PO.status_connected, "good"], - disconnected: [PO.status_disconnected, "neutral"] + new: [tr("status.no_conn"), "neutral"], + checking: [tr("status.checking"), "neutral"], + failed: [tr("status.failed"), "fail"], + closed: [tr("status.disconnected"), "neutral"], + completed: [tr("status.connected"), "good"], + connected: [tr("status.connected"), "good"], + disconnected: [tr("status.disconnected"), "neutral"] } this.status_el.classList.value = "" this.status_el.classList.add("connection-status", "status-" + states[this.pc.iceConnectionState][1]) |