Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove localized from description in blog_card template #12916

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

dlopezvsr
Copy link
Collaborator

@dlopezvsr dlopezvsr commented Sep 23, 2024

Description

This PR removes .localized from blog_card.html template, reducing the number of .localized attributes in the codebase, and still keeping the information translated and displayed properly thanks to the localize_queryset function already created on
/networkapi/wagtailpages/utils.py.

Link to sample test page: https://foundation-s-tp1-100-re-cee0m8.herokuapp.com/en/
Related PRs/issues: #10007

How to test

  • Pull and checkout this branch into your local env, and start app.
  • Go to blogs section
  • Change the locale slug from "en" to any other locale available.
  • Make sure the blog card description is still displayed properly and translated accordingly.

Image for reference:
image

Caveats:

  • In case there is not any current translation, the meta description will remain the same. So you can go to the CMS > open the blog page that will be tested > go to promote section > switch locale > add translation > publish.

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

Documentation:

  • Is my code documented?
  • Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

┆Issue is synchronized with this Jira Story

@dlopezvsr dlopezvsr self-assigned this Sep 23, 2024
@dlopezvsr dlopezvsr temporarily deployed to foundation-s-tp1-100-re-dzdrg7 September 23, 2024 19:22 Inactive
@dlopezvsr dlopezvsr temporarily deployed to foundation-s-tp1-100-re-cee0m8 September 23, 2024 19:42 Inactive
@dlopezvsr dlopezvsr marked this pull request as ready for review September 24, 2024 19:45
Copy link
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and approved 👍 great work @dlopezvsr! 🚀

@dlopezvsr dlopezvsr temporarily deployed to foundation-s-tp1-100-re-ha0sy1 September 25, 2024 15:40 Inactive
@mofodevops mofodevops temporarily deployed to foundation-s-tp1-100-re-g2syny September 25, 2024 15:42 Inactive
@dlopezvsr dlopezvsr merged commit 485ba28 into main Sep 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants