mirror of
https://github.com/vector-im/element-call.git
synced 2026-06-27 17:52:56 +00:00
Replace deprecated i18next-parser with i18next-cli
This commit is contained in:
@@ -8,6 +8,8 @@ Please see LICENSE in the repository root for full details.
|
||||
import { t } from "i18next";
|
||||
import { type ConnectionError } from "livekit-client";
|
||||
|
||||
import { i18nKey } from "./i18n";
|
||||
|
||||
export enum ErrorCode {
|
||||
/**
|
||||
* Configuration problem due to no MatrixRTC backend/SFU is exposed via .well-known and no fallback configured.
|
||||
@@ -251,9 +253,9 @@ export class PeerConnectionTimeoutError extends ElementCallError {
|
||||
ErrorCode.SFU_ERROR,
|
||||
ErrorCategory.NETWORK_CONNECTIVITY,
|
||||
);
|
||||
// Mark translation key for i18n extraction
|
||||
// t("error.peer_connection_timeout_description");
|
||||
this.localisedMessageKey = "error.peer_connection_timeout_description";
|
||||
this.localisedMessageKey = i18nKey(
|
||||
"error.peer_connection_timeout_description",
|
||||
);
|
||||
this.localisedMessageValues = {
|
||||
linkUrl:
|
||||
"https://docs.element.io/latest/element-server-suite-pro/configuring-components/configuring-matrix-rtc/#sfu-connectivity-troubleshooting",
|
||||
@@ -268,9 +270,9 @@ export class LivekitConnectionError extends ElementCallError {
|
||||
ErrorCode.SFU_ERROR,
|
||||
ErrorCategory.NETWORK_CONNECTIVITY,
|
||||
);
|
||||
// Mark translation key for i18n extraction
|
||||
// t("error.livekit_connection_error_description");
|
||||
this.localisedMessageKey = "error.livekit_connection_error_description";
|
||||
this.localisedMessageKey = i18nKey(
|
||||
"error.livekit_connection_error_description",
|
||||
);
|
||||
this.localisedMessageValues = { reason: cause.reasonName };
|
||||
}
|
||||
}
|
||||
|
||||
9
src/utils/i18n.ts
Normal file
9
src/utils/i18n.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
Copyright 2026 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
// Custom marker function to allow i18next extraction
|
||||
export const i18nKey = (key: string): string => key;
|
||||
Reference in New Issue
Block a user