Skip to content

Commit

Permalink
Merge pull request #2489 from digitalfabrik/develop
Browse files Browse the repository at this point in the history
Release `2023.10.2`
  • Loading branch information
timobrembeck authored Oct 26, 2023
2 parents 249b3d4 + 9886106 commit 5af7df9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ jobs:
- run:
name: Get release notes
command: |
RELEASE_NOTES=$(./tools/make_release_notes.sh --format=raw --no-heading --no-subheading)
RELEASE_NOTES=$(./tools/make_release_notes.sh --format=raw --no-heading --no-subheading | sed "s/\"/'/g")
echo "export RELEASE_NOTES=\"${RELEASE_NOTES}\"" >> $BASH_ENV
- run:
name: Get contributors
Expand Down
4 changes: 3 additions & 1 deletion integreat_cms/cms/forms/custom_content_model_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def clean_content(self):
):
translated_url, translated_text = translation
link.set("href", translated_url)
link.text = translated_text
# translated_text might be None if the link tag consists of other tags instead of plain text
if translated_text:
link.text = translated_text
self.logger.debug(
"Updated link url from %s to %s", href, translated_url
)
Expand Down
12 changes: 6 additions & 6 deletions integreat_cms/cms/utils/internal_link_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ def update_link_language(current_link, link_text, target_language_slug):
fixed_link = target_translation.full_url

# Update the title if it was previously the translation title or the url
title = link_text
if source_translation.title.lower() == link_text.strip().lower():
title = target_translation.title
elif current_link.strip() == link_text.strip():
title = fixed_link
if link_text:
if source_translation.title.lower() == link_text.strip().lower():
link_text = target_translation.title
elif current_link.strip() == link_text.strip():
link_text = fixed_link

return fixed_link, title
return fixed_link, link_text

return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _

from ...utils.translation_utils import gettext_many_lazy as __

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -47,12 +49,10 @@ def dispatch(self, *args, **kwargs):
# If not, redirect to the password reset form
messages.error(
self.request,
" ".join(
[
_("This password reset link is invalid."),
_("It may have already been used."),
_("Please request a new link to reset your password."),
]
__(
_("This password reset link is invalid."),
_("It may have already been used."),
_("Please request a new link to reset your password."),
),
)
return redirect("public:password_reset")
Expand All @@ -70,11 +70,9 @@ def form_valid(self, form):
"""
messages.success(
self.request,
" ".join(
[
_("Your password has been successfully changed."),
_("You can now log in with your new password."),
]
__(
_("Your password has been successfully changed."),
_("You can now log in with your new password."),
),
)
logger.info("The password for %r was changed.", form.user)
Expand Down
2 changes: 2 additions & 0 deletions integreat_cms/release_notes/current/unreleased/2484.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
en: Fix error during password reset
de: Behebe Fehler beim Passwort zurücksetzen
2 changes: 2 additions & 0 deletions integreat_cms/release_notes/current/unreleased/2485.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
en: Fix error when translating links with HTML tags in the link text
de: Behebe Fehler beim Übersetzen von Links mit HTML tags im Link-Text

0 comments on commit 5af7df9

Please sign in to comment.