You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2026-10-24 23:19:26 +03:00
* Remove legacy Module & Customisation API in favour of the new runtime modules system * Delint * Remove unused i18n string * Fix tests * Fix test * Fix tests * Iterate * Fix bad merge * Bump Module API version * Bump module-api compatibility ranges * Update docs * Fix semver ranges * Update test module API version * Too many versions * Too many versions again
26 lines
706 B
JavaScript
26 lines
706 B
JavaScript
/*
|
|
Copyright 2025 New Vector Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
export default class ExampleModule {
|
|
static moduleApiVersion = "^2.0.0";
|
|
constructor(api) {
|
|
this.api = api;
|
|
|
|
this.api.i18n.register({
|
|
key: {
|
|
en: "%(brand)s module loading successful!",
|
|
de: "%(brand)s-Module erfolgreich geladen!",
|
|
},
|
|
});
|
|
}
|
|
async load() {
|
|
const brand = this.api.config.get("brand");
|
|
// oxlint-disable-next-line no-alert
|
|
alert(this.api.i18n.translate("key", { brand }));
|
|
}
|
|
}
|