learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
456 stars 306 forks source link

Fix resource titles not displaying on chosen locale #5499

Closed mrpau-eugene closed 6 years ago

mrpau-eugene commented 6 years ago

Summary

Found the lines where we can make the titles display in the current language

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

Issues addressed

5494

radinamatic commented 6 years ago

Good job @mrpau-eduard!

I had to change the api_views.py file on my Ubuntu VM to view this, but the fix seems to work :+1:

virtualbox_ubuntu3_04_08_2017_13_14_21

codecov[bot] commented 6 years ago

Codecov Report

Merging #5499 into 0.17.x will increase coverage by 5.14%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.17.x    #5499      +/-   ##
==========================================
+ Coverage   56.84%   61.98%   +5.14%     
==========================================
  Files         117      118       +1     
  Lines        6555     6582      +27     
==========================================
+ Hits         3726     4080     +354     
+ Misses       2829     2502     -327
Impacted Files Coverage Δ
kalite/coachreports/api_views.py 93.07% <100%> (+3.84%) :arrow_up:
kalite/i18n/management/commands/makemessages.py 0% <0%> (-95.84%) :arrow_down:
kalite/settings/_utils.py 0% <0%> (-84.62%) :arrow_down:
kalite/contentload/settings.py 75% <0%> (-25%) :arrow_down:
kalite/project/settings/base.py 88.07% <0%> (-11.01%) :arrow_down:
kalite/control_panel/views.py 67.85% <0%> (-0.3%) :arrow_down:
kalite/distributed/backup.py 0% <0%> (ø)
kalite/main/models.py 86.51% <0%> (+0.84%) :arrow_up:
kalite/facility/models.py 74.56% <0%> (+3.46%) :arrow_up:
... and 17 more

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 f05d1c6...6892931. Read the comment docs.

radinamatic commented 6 years ago

:100: :+1:

mrpau-eugene commented 6 years ago

Done adding @benjaoming 👍

benjaoming commented 6 years ago

Great work! Trying to solve some issues on Circle CI - and I was going to push to your branch to continue this PR, but even though I have full access to the mrpau repo, I cannot see your branch. It's quite strange.

git fetch
git push mrpau hotfix/5494-resource-titles-displaying-in-english-instead-of-chosen-local
error: src refspec hotfix/5494-resource-titles-displaying-in-english-instead-of-chosen-local does not match any.
error: failed to push some refs to 'git@github.com:mrpau/ka-lite.git'

Will open another PR...

radinamatic commented 6 years ago

Unfortunately, while testing the final installers prior to signing them, this issue resurfaced... :disappointed:

I'm not completely sure why, since at first the resource titles do display in the chosen locale, but after playing a while by choosing subtopics from the dropdown, and resubmitting, they return to being displayed in English but only in the table at the bottom:

virtualbox_msedge - win10_preview_22_08_2017_10_41_58

@mrpau-eugene Could you re-test this and see what did we miss?

mrpau-eugene commented 6 years ago

@radinamatic sure! will work on this asap