ci: fix backend translate compile ci job (#5500)

* ci: fix backend translate compile ci job

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix redirect challenge for relative URLs

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-05-06 13:42:41 +02:00 committed by GitHub
parent 36bd4b1e51
commit 8ded11806a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View file

@ -3,10 +3,7 @@ on:
push: push:
branches: [main] branches: [main]
paths: paths:
- "/locale/" - "locale/**"
pull_request:
paths:
- "/locale/"
workflow_dispatch: workflow_dispatch:
env: env:
@ -24,7 +21,7 @@ jobs:
- name: Setup authentik env - name: Setup authentik env
uses: ./.github/actions/setup uses: ./.github/actions/setup
- name: run compile - name: run compile
run: poetry run ./manage.py compilemessages run: poetry run ak compilemessages
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v5 uses: peter-evans/create-pull-request@v5
id: cpr id: cpr

View file

@ -38,7 +38,7 @@ export class RedirectStage extends BaseStage<RedirectChallenge, FlowChallengeRes
]; ];
} }
renderURL(): string { getURL(): string {
if (!this.challenge.to.includes("://")) { if (!this.challenge.to.includes("://")) {
return window.location.origin + this.challenge.to; return window.location.origin + this.challenge.to;
} }
@ -58,7 +58,7 @@ export class RedirectStage extends BaseStage<RedirectChallenge, FlowChallengeRes
} }
renderLoading(): TemplateResult { renderLoading(): TemplateResult {
const url = new URL(this.challenge.to); const url = new URL(this.getURL());
// If the protocol isn't http or https assume a custom protocol, that has an OS-level // If the protocol isn't http or https assume a custom protocol, that has an OS-level
// handler, which the browser will show a popup for. // handler, which the browser will show a popup for.
// As this wouldn't really be a redirect, show a message that the page can be closed // As this wouldn't really be a redirect, show a message that the page can be closed
@ -87,7 +87,7 @@ export class RedirectStage extends BaseStage<RedirectChallenge, FlowChallengeRes
<form class="pf-c-form"> <form class="pf-c-form">
<div class="pf-c-form__group"> <div class="pf-c-form__group">
<p>${t`You're about to be redirect to the following URL.`}</p> <p>${t`You're about to be redirect to the following URL.`}</p>
<code>${this.renderURL()}</code> <code>${this.getURL()}</code>
</div> </div>
<div class="pf-c-form__group pf-m-action"> <div class="pf-c-form__group pf-m-action">
<a <a