-
Notifications
You must be signed in to change notification settings - Fork 303
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
ability to change language via url redirect, added docstring #5342
ability to change language via url redirect, added docstring #5342
Conversation
This looks good, except we now have a new test failure :) This is reported in Circle CI...
I believe the test may be caused by calling the page by You can run the failing test like this: |
Current coverage is 51.22% (diff: 4.00%)@@ develop #5342 diff @@
==========================================
Files 141 141
Lines 7447 7458 +11
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 3812 3820 +8
- Misses 3635 3638 +3
Partials 0 0
|
Ah, good idea. I have made this change and committed to this branch. One problem, though -- I tested this change manually, but I was not able to run the test code as directed. When trying against my branch, I got "ImportError: No module named kalite" and when I tried under the master branch I got "ImportError: No module named dbbackup". Sorry, I'm not familiar enough with python and django :/ I guess we'll see if the automatic CircleCI tests turn anything up. Thanks for your help so far! |
Not sure what that codecov/patch error means - any suggestions appreciated... |
@needlestack thanks that's great!! I would think that now we have the tests working, then it's safe to merge. Judging from the previous fail then the tests do reach part of the function. codecov/patch is the metric for the code that's affected - I think it means that tests has only reached 4% of the changed lines. Overall, it stacks up, but it means that you have contributed code where I have to rely on your assertion that it's working and my own ability to read code :) But it's all good! I will write something for the release notes and possibly add a quick remark to ensure that future devs are able to understand why this code is there. |
Great - thanks for your help. Hope others find this useful! |
Comments and release notes about #5342
Summary
(resubmitting against develop branch per request)
In multi-lingual environments, it is not user friendly for each user to change the default language manually with the drop-down box on the bottom of the page. This patch allows setting the language through a link, which then redirects the user to the requested content. We use this patch in RACHEL for our multi-lingual installations. You can see it in action here, where we link to English, French, and Spanish versions on the same server:
http://rachelfriends.org/previews/rachelplus-en/
http://rachelfriends.org/previews/rachelplus-es/
http://rachelfriends.org/previews/rachelplus-fr/
It would be nice if this functionality were included in the official release.
TODO