web/elements: fully translate table

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-03 20:01:29 +02:00
parent 5923edc69a
commit 4554c468bc
4 changed files with 23 additions and 8 deletions

View file

@ -25,9 +25,7 @@ export class TablePagination extends LitElement {
<div class="pf-c-options-menu"> <div class="pf-c-options-menu">
<div class="pf-c-options-menu__toggle pf-m-text pf-m-plain"> <div class="pf-c-options-menu__toggle pf-m-text pf-m-plain">
<span class="pf-c-options-menu__toggle-text"> <span class="pf-c-options-menu__toggle-text">
${this.pages?.startIndex} - ${t`${this.pages?.startIndex} - ${this.pages?.endIndex} of ${this.pages?.count}`}
${this.pages?.endIndex} of
${this.pages?.count}
</span> </span>
</div> </div>
</div> </div>

View file

@ -6,6 +6,7 @@ import PFToolbar from "@patternfly/patternfly/components/Toolbar/toolbar.css";
import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css"; import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
import AKGlobal from "../../authentik.css"; import AKGlobal from "../../authentik.css";
import { t } from "@lingui/macro";
@customElement("ak-table-search") @customElement("ak-table-search")
export class TableSearch extends LitElement { export class TableSearch extends LitElement {
@ -31,7 +32,7 @@ export class TableSearch extends LitElement {
if (el.value === "") return; if (el.value === "") return;
this.onSearch(el?.value); this.onSearch(el?.value);
}}> }}>
<input class="pf-c-form-control" name="search" type="search" placeholder="Search..." value="${ifDefined(this.value)}" @search=${(ev: Event) => { <input class="pf-c-form-control" name="search" type="search" placeholder=${t`Search...`} value="${ifDefined(this.value)}" @search=${(ev: Event) => {
if (!this.onSearch) return; if (!this.onSearch) return;
this.onSearch((ev.target as HTMLInputElement).value); this.onSearch((ev.target as HTMLInputElement).value);
}}> }}>

View file

@ -1279,11 +1279,11 @@ msgstr "Generate"
msgid "Generate Certificate-Key Pair" msgid "Generate Certificate-Key Pair"
msgstr "Generate Certificate-Key Pair" msgstr "Generate Certificate-Key Pair"
#: src/elements/table/TablePagination.ts:51 #: src/elements/table/TablePagination.ts:49
msgid "Go to next page" msgid "Go to next page"
msgstr "Go to next page" msgstr "Go to next page"
#: src/elements/table/TablePagination.ts:41 #: src/elements/table/TablePagination.ts:39
msgid "Go to previous page" msgid "Go to previous page"
msgstr "Go to previous page" msgstr "Go to previous page"
@ -2418,6 +2418,10 @@ msgstr "Scope which the client can specify to access these properties."
msgid "Scopes" msgid "Scopes"
msgstr "Scopes" msgstr "Scopes"
#: src/elements/table/TableSearch.ts:35
msgid "Search..."
msgstr "Search..."
#: src/pages/events/EventInfo.ts:124 #: src/pages/events/EventInfo.ts:124
msgid "Secret:" msgid "Secret:"
msgstr "Secret:" msgstr "Secret:"
@ -3681,6 +3685,10 @@ msgstr "{0} ('{1}', Type {2})"
msgid "{0} ({1})" msgid "{0} ({1})"
msgstr "{0} ({1})" msgstr "{0} ({1})"
#: src/elements/table/TablePagination.ts:29
msgid "{0} - {1} of {2}"
msgstr "{0} - {1} of {2}"
#: src/pages/admin-overview/cards/VersionStatusCard.ts:27 #: src/pages/admin-overview/cards/VersionStatusCard.ts:27
msgid "{0} is available!" msgid "{0} is available!"
msgstr "{0} is available!" msgstr "{0} is available!"

View file

@ -1275,11 +1275,11 @@ msgstr ""
msgid "Generate Certificate-Key Pair" msgid "Generate Certificate-Key Pair"
msgstr "" msgstr ""
#: src/elements/table/TablePagination.ts:51 #: src/elements/table/TablePagination.ts:49
msgid "Go to next page" msgid "Go to next page"
msgstr "" msgstr ""
#: src/elements/table/TablePagination.ts:41 #: src/elements/table/TablePagination.ts:39
msgid "Go to previous page" msgid "Go to previous page"
msgstr "" msgstr ""
@ -2410,6 +2410,10 @@ msgstr ""
msgid "Scopes" msgid "Scopes"
msgstr "" msgstr ""
#: src/elements/table/TableSearch.ts:35
msgid "Search..."
msgstr ""
#: src/pages/events/EventInfo.ts:124 #: src/pages/events/EventInfo.ts:124
msgid "Secret:" msgid "Secret:"
msgstr "" msgstr ""
@ -3673,6 +3677,10 @@ msgstr ""
msgid "{0} ({1})" msgid "{0} ({1})"
msgstr "" msgstr ""
#: src/elements/table/TablePagination.ts:29
msgid "{0} - {1} of {2}"
msgstr ""
#: src/pages/admin-overview/cards/VersionStatusCard.ts:27 #: src/pages/admin-overview/cards/VersionStatusCard.ts:27
msgid "{0} is available!" msgid "{0} is available!"
msgstr "" msgstr ""