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

Replace trans tags with separate trans files #83

Merged
merged 1 commit into from
May 14, 2024

Conversation

VirginiaDooley
Copy link
Contributor

@VirginiaDooley VirginiaDooley commented May 13, 2024

Ref DemocracyClub/WhoCanIVoteFor#1740 and https://app.asana.com/0/1204880927741389/1207297516776616/f

This change removes translation tags in the footer and instead uses conditionals based on language code to which footer template should be used.

Screenshot 2024-05-13 at 3 58 57 PM

@@ -44,35 +43,32 @@
</main>
{% endblock main_base %}


{% if USE_I18N %}
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this block is needed? I think Django sets LANGUAGE_CODE automaticlly if the i18n context processor is enabled. If it's not, the below if statement will fall back to the else condition.

Can you check this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I've removed that block.

@VirginiaDooley VirginiaDooley merged commit 5bcbd85 into main May 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants