-
Notifications
You must be signed in to change notification settings - Fork 68
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
Implement i18n support #243
base: main
Are you sure you want to change the base?
Implement i18n support #243
Conversation
…messages for es and compile translations for testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an impressive amount of work!
In addition to the code comments, below, please:
- ensure this pull request (PR) branch (
rypptc:features/implement-internationalization
) is up-to-date with themain
branch ofcreativecommons/legaldb
and all conflicts are resolved. - use the formatting / static analysis tools: https://github.com/creativecommons/legaldb#code-style
- They can also be run in Docker so you don't have to configure pipenv:
docker compose exec app isort .
docker compose exec app black .
docker compose exec app flake8 .
- They can also be run in Docker so you don't have to configure pipenv:
@@ -1,15 +1,16 @@ | |||
{% load compress %} | |||
{% load static %} | |||
{% load static i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
<p class="hero-description body-normal">Please add any cases related to Creative Commons licenses and other legal tools that you think should be included in the database. <span class="required">*</span> Required.</p> | ||
<h1 class="hero-title title is-2">{% trans "Case Submission" %}</h1> | ||
<p class="hero-description body-normal"> | ||
{% trans "Please add any cases related to Creative Commons licenses and other legal tools that you think should be included in the database." %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Longer sentences and paragraphs should use {% blocktrans %}
. For example:
{% blocktrans trimmed %}
Please add any cases related to Creative Commons licenses and other legal tools that you think should be included in the database.
{% endblocktrans %}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I get it
@@ -1,11 +1,15 @@ | |||
{% extends 'legal_db/base.html' %} | |||
{% load widget_tweaks %} | |||
{% load widget_tweaks i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
@@ -1,23 +1,23 @@ | |||
{% extends 'legal_db/base.html' %} | |||
{% load static %} | |||
{% load static i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
legal_db/templates/legal_db/faq.html
Outdated
@@ -1,20 +1,20 @@ | |||
{% extends 'legal_db/base.html' %} | |||
{% load markdown_extras %} | |||
{% load markdown_extras i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
<p class="hero-description body-bigger column is-9"> | ||
{% url 'case_index' as case_index_url %} | ||
{% url 'scholarship_index' as scholarship_index_url %} | ||
{% blocktrans with case_url=case_index_url scholarship_url=scholarship_index_url %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also include trimmed
option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
@@ -1,14 +1,15 @@ | |||
{% load static i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
@@ -1,4 +1,4 @@ | |||
{% load static %} | |||
{% load static i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
@@ -1,25 +1,26 @@ | |||
{% load widget_tweaks %} | |||
{% load widget_tweaks i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
@@ -1,23 +1,23 @@ | |||
{% extends 'legal_db/base.html' %} | |||
{% load static %} | |||
{% load static i18n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update load listing to be in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed
All requested changes have been made, I made style checks with isort, black and flake8 as indicated, and legaldb main branch has been merged into the features/implement-internationalization branch, and all existing conflicts were solved. |
Fixes
Description
Technical details
This implementation provides basic Spanish translations for testing. Full integration with Transifex for managing translations will be handled in future steps. The language selection dropdown is implemented using Django’s i18n framework, ensuring smooth language switching without the need for custom JavaScript.
Screenshots
Checklist
Update index.md
).main
ormaster
).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin