Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Security/AuthenticationEntryPointRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
use Symfony\Contracts\Translation\TranslatorInterface;

class AuthenticationEntryPointRedirector implements AuthenticationEntryPointInterface
{
public function __construct(
private readonly TranslatorInterface $translator,
private readonly UrlGeneratorInterface $urlGenerator
) {
}
Expand All @@ -21,7 +23,7 @@ public function start(Request $request, ?AuthenticationException $authException
// add a custom flash message and redirect to the login page
/** @var Session $session */
$session = $request->getSession();
$session->getFlashBag()->add('warning', 'You have to login in order to access this page.');
$session->getFlashBag()->add('warning', $this->translator->trans('You have to login in order to access this page.', [], 'security'));

return new RedirectResponse($this->urlGenerator->generate('bolt_login'));
}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/_buttons.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</button>
<div class="dropdown-menu">
{{ macro.buttonlink(
'action.preview_secure_share',
'action.preview_secure_share'|trans,
path(record.definition.get('record_route'), {'slugOrId': record.id, 'contentTypeSlug': record.contenttype,'secret': secret(record.id)}),
'fa-user-secret',
'btn- dropdown-button mb-0',
Expand Down
8 changes: 7 additions & 1 deletion translations/messages.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2643,6 +2643,12 @@
<target>Možnosti nahrávání</target>
</segment>
</unit>
<unit id="hKmDb7q" name="Share secure preview link">
<segment>
<source>Share secure preview link</source>
<target>Sdílet zabezpečený náhled odkazu</target>
</segment>
</unit>
<unit id="a_CQgly" name="Order">
<segment>
<source>Order</source>
Expand All @@ -2658,7 +2664,7 @@
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>Pro přístup k této stránce se musíte přihlásit.</target>
<target>Pro přístup na tuto stránku se musíte přihlásit.</target>
</segment>
</unit>
<unit id="MjY7.cg" name="modal.title.file_field">
Expand Down
6 changes: 0 additions & 6 deletions translations/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1501,12 +1501,6 @@
<target>Attribute bearbeiten</target>
</segment>
</unit>
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>Sie müssen sich anmelden, um auf diese Seite zugreifen zu können.</target>
</segment>
</unit>
<unit id="MjY7.cg" name="modal.title.file_field">
<notes>
<note category="file-source" priority="1">bolt-core/templates/_partials/fields/file.html.twig:24</note>
Expand Down
6 changes: 6 additions & 0 deletions translations/messages.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,12 @@
<target>Upload Options</target>
</segment>
</unit>
<unit id="hKmDb7q" name="Share secure preview link">
<segment>
<source>Share secure preview link</source>
<target>Share secure preview link</target>
</segment>
</unit>
<unit id="a_CQgly" name="Order">
<segment>
<source>Order</source>
Expand Down
6 changes: 6 additions & 0 deletions translations/messages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2701,6 +2701,12 @@
<target>Option de téléversement</target>
</segment>
</unit>
<unit id="hKmDb7q" name="Share secure preview link">
<segment>
<source>Share secure preview link</source>
<target>Partager un lien d'aperçu sécurisé</target>
</segment>
</unit>
<unit id="a_CQgly" name="Order">
<segment>
<source>Order</source>
Expand Down
8 changes: 7 additions & 1 deletion translations/messages.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment state="translated">
<source>You have to login in order to access this page.</source>
<target>Для доступа к этой странице вам необходимо войти в систему.</target>
<target>Вы должны войти в систему, чтобы получить доступ к этой странице.</target>
</segment>
</unit>
<unit id="dp42qbF" name="reset_password.email_title">
Expand Down Expand Up @@ -2743,6 +2743,12 @@
<target>Пароли должны совпадать.</target>
</segment>
</unit>
<unit id="hKmDb7q" name="Share secure preview link">
<segment state="translated">
<source>Share secure preview link</source>
<target>Поделитесь защищённой ссылкой для предварительного просмотра</target>
</segment>
</unit>
<unit id="SxW1D3L" name="reset_password.check_email_sent_text_1">
<segment state="translated">
<source>reset_password.check_email_sent_text_1</source>
Expand Down
6 changes: 6 additions & 0 deletions translations/messages.sk.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,12 @@
<target>Možnosti nahrávania</target>
</segment>
</unit>
<unit id="hKmDb7q" name="Share secure preview link">
<segment>
<source>Share secure preview link</source>
<target>Zdieľať zabezpečený odkaz na náhľad</target>
</segment>
</unit>
<unit id="a_CQgly" name="Order">
<segment>
<source>Order</source>
Expand Down
6 changes: 6 additions & 0 deletions translations/security.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,11 @@
<target>Uživatel je deaktivován.</target>
</segment>
</unit>
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>Pro přístup k této stránce se musíte přihlásit.</target>
</segment>
</unit>
</file>
</xliff>
9 changes: 9 additions & 0 deletions translations/security.de.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="de">
<file id="security.de">
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<notes>
<note category="file-source" priority="1">bolt-core/src/Security/AuthenticationEntryPointRedirector.php:27</note>
</notes>
<segment>
<source>You have to login in order to access this page.</source>
<target>Sie müssen sich anmelden, um auf diese Seite zugreifen zu können.</target>
</segment>
</unit>
<unit id="baI_ZxO" name="An authentication exception occurred.">
<notes>
<note category="state" priority="1">obsolete</note>
Expand Down
6 changes: 6 additions & 0 deletions translations/security.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,11 @@
<target>User is disabled.</target>
</segment>
</unit>
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>You have to login in order to access this page.</target>
</segment>
</unit>
</file>
</xliff>
6 changes: 6 additions & 0 deletions translations/security.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
<source>User is disabled.</source>
<target>Пользователь отключён.</target>
</segment>
</unit>
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>Для доступа к этой странице вам необходимо войти в систему.</target>
</segment>
</unit>
</file>
</xliff>
6 changes: 6 additions & 0 deletions translations/security.sk.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,11 @@
<target>Používateľ je deaktivovaný.</target>
</segment>
</unit>
<unit id="NF.vvAN" name="You have to login in order to access this page.">
<segment>
<source>You have to login in order to access this page.</source>
<target>Na prístup k tejto stránke sa musíte prihlásiť.</target>
</segment>
</unit>
</file>
</xliff>
Loading