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__toggle pf-m-text pf-m-plain">
<span class="pf-c-options-menu__toggle-text">
${this.pages?.startIndex} -
${this.pages?.endIndex} of
${this.pages?.count}
${t`${this.pages?.startIndex} - ${this.pages?.endIndex} of ${this.pages?.count}`}
</span>
</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 PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
import AKGlobal from "../../authentik.css";
import { t } from "@lingui/macro";
@customElement("ak-table-search")
export class TableSearch extends LitElement {
@ -31,7 +32,7 @@ export class TableSearch extends LitElement {
if (el.value === "") return;
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;
this.onSearch((ev.target as HTMLInputElement).value);
}}>

View File

@ -1279,11 +1279,11 @@ msgstr "Generate"
msgid "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"
msgstr "Go to next page"
#: src/elements/table/TablePagination.ts:41
#: src/elements/table/TablePagination.ts:39
msgid "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"
msgstr "Scopes"
#: src/elements/table/TableSearch.ts:35
msgid "Search..."
msgstr "Search..."
#: src/pages/events/EventInfo.ts:124
msgid "Secret:"
msgstr "Secret:"
@ -3681,6 +3685,10 @@ msgstr "{0} ('{1}', Type {2})"
msgid "{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
msgid "{0} is available!"
msgstr "{0} is available!"

View File

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