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

@VirginiaDooley VirginiaDooley force-pushed the hotfix/static-translations branch from 7c8824d to dc87b99 Compare May 13, 2024 14:57
@VirginiaDooley VirginiaDooley marked this pull request as ready for review May 13, 2024 15:01
@VirginiaDooley VirginiaDooley requested a review from symroe May 13, 2024 15:02
@@ -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 force-pushed the hotfix/static-translations branch from dc87b99 to 8ef01ac Compare May 14, 2024 07:32
@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