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 #713

Merged
merged 32 commits into from
Sep 21, 2018

Conversation

courtneycb
Copy link
Contributor

@courtneycb courtneycb commented Sep 13, 2018

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).

Todo:

  • Documentation

@@ -16,6 +17,7 @@
url(r"^chapters/", include("chapters.urls", namespace="chapters")),
url(r"^appendices/", include("appendices.urls", namespace="appendices")),
url(r"^search/", include("search.urls", namespace="search")),
url(r"^jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalog"),
Copy link
Member

Choose a reason for hiding this comment

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

This might not be required, worth checking.

@codecov
Copy link

codecov bot commented Sep 13, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64c80df...2de89d9. Read the comment docs.

@courtneycb courtneycb changed the title (WIP) Use Django's Javascript translation catalog Use Django's Javascript translation catalog Sep 13, 2018
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...dc6fcbe. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will decrease coverage by 2.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #713      +/-   ##
==========================================
- Coverage    98.01%   95.9%   -2.12%     
==========================================
  Files           59      56       -3     
  Lines          858     806      -52     
  Branches        67      61       -6     
==========================================
- Hits           841     773      -68     
- Misses          13      29      +16     
  Partials         4       4
Impacted Files Coverage Δ
csfieldguide/utils/LoaderFactory.py 0% <0%> (-100%) ⬇️
...guide/chapters/management/commands/loadchapters.py
...teractives/management/commands/loadinteractives.py
...eldguide/general/management/commands/updatedata.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

2 similar comments
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will decrease coverage by 2.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #713      +/-   ##
==========================================
- Coverage    98.01%   95.9%   -2.12%     
==========================================
  Files           59      56       -3     
  Lines          858     806      -52     
  Branches        67      61       -6     
==========================================
- Hits           841     773      -68     
- Misses          13      29      +16     
  Partials         4       4
Impacted Files Coverage Δ
csfieldguide/utils/LoaderFactory.py 0% <0%> (-100%) ⬇️
...guide/chapters/management/commands/loadchapters.py
...teractives/management/commands/loadinteractives.py
...eldguide/general/management/commands/updatedata.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will decrease coverage by 2.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #713      +/-   ##
==========================================
- Coverage    98.01%   95.9%   -2.12%     
==========================================
  Files           59      56       -3     
  Lines          858     806      -52     
  Branches        67      61       -6     
==========================================
- Hits           841     773      -68     
- Misses          13      29      +16     
  Partials         4       4
Impacted Files Coverage Δ
csfieldguide/utils/LoaderFactory.py 0% <0%> (-100%) ⬇️
...guide/chapters/management/commands/loadchapters.py
...teractives/management/commands/loadinteractives.py
...eldguide/general/management/commands/updatedata.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

4 similar comments
@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 18, 2018

Codecov Report

Merging #713 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    98.01%   98.01%           
========================================
  Files           59       59           
  Lines          858      858           
  Branches        67       67           
========================================
  Hits           841      841           
  Misses          13       13           
  Partials         4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96756f8...f0877ef. Read the comment docs.

@JackMorganNZ JackMorganNZ merged commit f0877ef into develop Sep 21, 2018
@JackMorganNZ JackMorganNZ deleted the javascript-translation-catalog branch September 21, 2018 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants