web: initial migration to lingui

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-03 19:26:43 +02:00
parent fc1caf1469
commit 25300c1928
150 changed files with 8720 additions and 1482 deletions

View File

@ -1,4 +1,4 @@
import { gettext } from "django";
import { t } from "@lingui/macro";
import { customElement, html, property, TemplateResult } from "lit-element";
import { AKResponse } from "../../api/Client";
import { Table, TableColumn } from "../table/Table";
@ -26,8 +26,8 @@ export class UserConsentList extends Table<UserConsent> {
columns(): TableColumn[] {
return [
new TableColumn("Application", "application"),
new TableColumn("Expires", "expires"),
new TableColumn(t`Application`, t`application`),
new TableColumn(t`Expires`, t`expires`),
new TableColumn(""),
];
}
@ -39,14 +39,14 @@ export class UserConsentList extends Table<UserConsent> {
html`
<ak-forms-delete
.obj=${item}
objectLabel=${gettext("Consent")}
objectLabel=${t`Consent`}
.delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUserConsentDelete({
id: item.pk || 0,
});
}}>
<button slot="trigger" class="pf-c-button pf-m-danger">
${gettext("Delete Consent")}
${t`Delete Consent`}
</button>
</ak-forms-delete>`,
];