From a7f751f3b39982608f26dbd0b62905d5fa31a744 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 3 Apr 2021 20:42:08 +0200 Subject: [PATCH] web/admin: fix expression info not being localised Signed-off-by: Jens Langhammer --- authentik/core/api/users.py | 1 - web/src/elements/charts/UserChart.ts | 2 +- web/src/locales/en.po | 20 +++++++++++++++++++ web/src/locales/pseudo-LOCALE.po | 20 +++++++++++++++++++ .../expression/ExpressionPolicyForm.ts | 5 ++++- .../PropertyMappingLDAPForm.ts | 5 ++++- .../PropertyMappingSAMLForm.ts | 5 ++++- .../PropertyMappingScopeForm.ts | 5 ++++- web/src/pages/users/UserViewPage.ts | 2 +- 9 files changed, 58 insertions(+), 7 deletions(-) diff --git a/authentik/core/api/users.py b/authentik/core/api/users.py index 94e926247..550645872 100644 --- a/authentik/core/api/users.py +++ b/authentik/core/api/users.py @@ -137,4 +137,3 @@ class UserViewSet(ModelViewSet): reverse_lazy("authentik_flows:default-recovery") + f"?{querystring}" ) return Response({"link": link}) - diff --git a/web/src/elements/charts/UserChart.ts b/web/src/elements/charts/UserChart.ts index 41a9d4407..4e959a73e 100644 --- a/web/src/elements/charts/UserChart.ts +++ b/web/src/elements/charts/UserChart.ts @@ -7,7 +7,7 @@ import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-charts-user") export class UserChart extends AKChart { - @property() + @property({type: Number}) userId?: number; apiRequest(): Promise { diff --git a/web/src/locales/en.po b/web/src/locales/en.po index decb367ff..6ab128bed 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -6,6 +6,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: @lingui/cli\n" "Language: en\n" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Plural-Forms: \n" #: src/pages/policies/BoundPoliciesList.ts:54 msgid "-" @@ -1129,6 +1135,13 @@ msgstr "Export" msgid "Expression" msgstr "Expression" +#: src/pages/policies/expression/ExpressionPolicyForm.ts:78 +#: src/pages/property-mappings/PropertyMappingLDAPForm.ts:70 +#: src/pages/property-mappings/PropertyMappingSAMLForm.ts:80 +#: src/pages/property-mappings/PropertyMappingScopeForm.ts:77 +msgid "Expression using Python." +msgstr "Expression using Python." + #: src/pages/applications/ApplicationListPage.ts:31 msgid "External Applications which use authentik as Identity-Provider, utilizing protocols like OAuth2 and SAML." msgstr "External Applications which use authentik as Identity-Provider, utilizing protocols like OAuth2 and SAML." @@ -2420,6 +2433,13 @@ msgstr "Search..." msgid "Secret:" msgstr "Secret:" +#: src/pages/policies/expression/ExpressionPolicyForm.ts:80 +#: src/pages/property-mappings/PropertyMappingLDAPForm.ts:72 +#: src/pages/property-mappings/PropertyMappingSAMLForm.ts:82 +#: src/pages/property-mappings/PropertyMappingScopeForm.ts:79 +msgid "See documentation for a list of all variables." +msgstr "See documentation for a list of all variables." + #: src/elements/table/Table.ts:215 msgid "Select all rows" msgstr "Select all rows" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index c4b201530..7f6d33323 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -6,6 +6,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: @lingui/cli\n" "Language: pseudo-LOCALE\n" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Plural-Forms: \n" #: src/pages/policies/BoundPoliciesList.ts:54 msgid "-" @@ -1125,6 +1131,13 @@ msgstr "" msgid "Expression" msgstr "" +#: src/pages/policies/expression/ExpressionPolicyForm.ts:78 +#: src/pages/property-mappings/PropertyMappingLDAPForm.ts:70 +#: src/pages/property-mappings/PropertyMappingSAMLForm.ts:80 +#: src/pages/property-mappings/PropertyMappingScopeForm.ts:77 +msgid "Expression using Python." +msgstr "" + #: src/pages/applications/ApplicationListPage.ts:31 msgid "External Applications which use authentik as Identity-Provider, utilizing protocols like OAuth2 and SAML." msgstr "" @@ -2416,6 +2429,13 @@ msgstr "" msgid "Secret:" msgstr "" +#: src/pages/policies/expression/ExpressionPolicyForm.ts:80 +#: src/pages/property-mappings/PropertyMappingLDAPForm.ts:72 +#: src/pages/property-mappings/PropertyMappingSAMLForm.ts:82 +#: src/pages/property-mappings/PropertyMappingScopeForm.ts:79 +msgid "See documentation for a list of all variables." +msgstr "" + #: src/elements/table/Table.ts:215 msgid "Select all rows" msgstr "" diff --git a/web/src/pages/policies/expression/ExpressionPolicyForm.ts b/web/src/pages/policies/expression/ExpressionPolicyForm.ts index 776fc13c1..533c3b65f 100644 --- a/web/src/pages/policies/expression/ExpressionPolicyForm.ts +++ b/web/src/pages/policies/expression/ExpressionPolicyForm.ts @@ -72,7 +72,10 @@ export class ExpressionPolicyForm extends Form {

- Expression using Python. See here for a list of all variables. + ${t`Expression using Python.`} + + ${t`See documentation for a list of all variables.`} +

diff --git a/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts b/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts index 786daf1ed..c92bb84d4 100644 --- a/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts @@ -64,7 +64,10 @@ export class PropertyMappingLDAPForm extends Form {

- Expression using Python. See here for a list of all variables. + ${t`Expression using Python.`} + + ${t`See documentation for a list of all variables.`} +

`; diff --git a/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts b/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts index baee22239..98a54e780 100644 --- a/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts @@ -74,7 +74,10 @@ export class PropertyMappingLDAPForm extends Form {

- Expression using Python. See here for a list of all variables. + ${t`Expression using Python.`} + + ${t`See documentation for a list of all variables.`} +

`; diff --git a/web/src/pages/property-mappings/PropertyMappingScopeForm.ts b/web/src/pages/property-mappings/PropertyMappingScopeForm.ts index 00c39530e..ed8ae52d5 100644 --- a/web/src/pages/property-mappings/PropertyMappingScopeForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingScopeForm.ts @@ -71,7 +71,10 @@ export class PropertyMappingScopeForm extends Form {

- Expression using Python. See here for a list of all variables. + ${t`Expression using Python.`} + + ${t`See documentation for a list of all variables.`} +

`; diff --git a/web/src/pages/users/UserViewPage.ts b/web/src/pages/users/UserViewPage.ts index 3799544c3..2d54aa9ba 100644 --- a/web/src/pages/users/UserViewPage.ts +++ b/web/src/pages/users/UserViewPage.ts @@ -168,7 +168,7 @@ export class UserViewPage extends Page {