From 4554c468bc19c0e2ef772329ca66390db154938d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 3 Apr 2021 20:01:29 +0200 Subject: [PATCH] web/elements: fully translate table Signed-off-by: Jens Langhammer --- web/src/elements/table/TablePagination.ts | 4 +--- web/src/elements/table/TableSearch.ts | 3 ++- web/src/locales/en.po | 12 ++++++++++-- web/src/locales/pseudo-LOCALE.po | 12 ++++++++++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/web/src/elements/table/TablePagination.ts b/web/src/elements/table/TablePagination.ts index eb904234c..a4db4cc52 100644 --- a/web/src/elements/table/TablePagination.ts +++ b/web/src/elements/table/TablePagination.ts @@ -25,9 +25,7 @@ export class TablePagination extends LitElement {
- ${this.pages?.startIndex} - - ${this.pages?.endIndex} of - ${this.pages?.count} + ${t`${this.pages?.startIndex} - ${this.pages?.endIndex} of ${this.pages?.count}`}
diff --git a/web/src/elements/table/TableSearch.ts b/web/src/elements/table/TableSearch.ts index 4516031a2..99959c503 100644 --- a/web/src/elements/table/TableSearch.ts +++ b/web/src/elements/table/TableSearch.ts @@ -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); }}> - { + { if (!this.onSearch) return; this.onSearch((ev.target as HTMLInputElement).value); }}> diff --git a/web/src/locales/en.po b/web/src/locales/en.po index d58158d6e..526d791a6 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -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!" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index dbdcb83d2..d248f7d3b 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -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 ""