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

Use Django's JavaScript translation catalog #1415

Merged
merged 7 commits into from
Aug 12, 2020
Merged

Use Django's JavaScript translation catalog #1415

merged 7 commits into from
Aug 12, 2020

Conversation

courtneycb
Copy link
Contributor

This PR enables the use of Django's JavaScript translation catalog, meaning we can now use gettext() to translate text in JavaScript files.

It also uses django-statici18n, a Django app that collects JavaScript catalogs into a single location. (Instead of generating it dynamically on each request).

The docs have also been updated.

The following changes were also made in the csu helper script:

  • Compiles messages within the static command as compiling JavaScript translations creates a static file.
  • Remove deletion of volumes as this deletes a Docker volume creating for storing node modules. Tidying Docker should be a user choice/action, not a project action.

Resolves #1409

@courtneycb courtneycb added backend Related to the software powering the website internationalization Related to translating the website labels Aug 11, 2020
@courtneycb courtneycb requested a review from eAlasdair August 11, 2020 01:00
@courtneycb courtneycb self-assigned this Aug 11, 2020
csu Show resolved Hide resolved
@courtneycb courtneycb merged commit 6fd5ca9 into develop Aug 12, 2020
@courtneycb courtneycb deleted the issue/1409 branch August 12, 2020 06:28
courtneycb added a commit that referenced this pull request Aug 13, 2020
This reverts commit 6fd5ca9, reversing
changes made to 01ca283.
@courtneycb courtneycb restored the issue/1409 branch September 7, 2020 23:28
@courtneycb courtneycb changed the title Use Djano's JavaScript translation catalog Use Django's JavaScript translation catalog Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the software powering the website internationalization Related to translating the website
Development

Successfully merging this pull request may close these issues.

Use Django's JavaScript Catalog
2 participants