Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
661 B
JavaScript
Raw Permalink Normal View History

/*
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 {
2025-05-14 09:21:24 +01:00
static moduleApiVersion = "^1.0.0";
constructor(api) {
this.api = api;
2025-05-14 09:21:24 +01:00
this.api.i18n.register({
key: {
en: "%(brand)s module loading successful!",
de: "%(brand)s-Module erfolgreich geladen!",
},
});
}
async load() {
2025-05-14 09:21:24 +01:00
const brand = this.api.config.get("brand");
alert(this.api.i18n.translate("key", { brand }));
}
}