Remove the DarkLang middleware from the LMS
Created and basic routing to the update_lang page for the GET Request
TNL-4742
Basic form functionality
Working example in LMS of the form to set the language
Login now required to change the preview language, and corrected some minor bugs
Updates to move the template code to lms and to correct minor defects
TNL-4742
Added template for preview_lang.html to cms
TNL-4742
Changed filename of darklang.py to api.py to match convention
TNL-4742
Updated and refactored the Darklang tests
TNL-4742
Updated comments in tests
TNL-4742
Formating updates
TNL-4742
Updated comments and formatting
TNL-4742
Corrected i18n tests and corrected PEP8 format issues
TNL-4742
Code Lint/PEP-8 corrections and upates
TNL-4742
Removed constant that was not needed (to be squashed)
TNL-4742
Added init method to clear up PEP8 Warnings (will squash)
TNL-4742
PEP-8/Lint issue resolved (squash)
Updated for i18n
TNL-4742
Refactored the preview_lang.html page to use a common included template
Refactoring and changes from PR comments
TNL-4742
Correction for safecommit violation (Squash)
TNL-4742
PR changes and refactoring (Squash)
Updates to reduce changes made in the urls used
TNL-4742
Removed unneeded aria-described by and bug in MAKO Template (squash)
TNK-4742
Updated docstring comments
Clarified form response text
Minor PR request (Squash)
Refactoring of how the responses are generated within the DarkLang views file
A series of refactors in response to PR comments
Method name change for clarity in reponse to PR comments (Squash)
Updates to tests per PR requests (Squash)
Minor comment updates for clarity and PR requests (Squash)
Updated per PR comments and added a test for empty preview_language
Layout and code style updates (Squash)
Updated test to contain method in the request.
Removed the Darklang preview-lang and clear-lang parameters and added the new DarkLang settings form at /update_lang
Refactored tests and added some tests for coverage, corrected defect with empty input codes
Removed unused and obsolete code
Corrected test errors, resolved PR comments, and updated comments to clarify testing
TNL-4742
Updated tests to deal with Pylint quality issue (Squash)
Updated tests to better reflect test case and PR updates (Squash)
This hardcoded the db_alias fetched from schema_editor and forces django
to try and migrate any second database you use, rather than routing to
the default database. In testing a build from scratch, these do not
appear needed.
Using using() prevents us from using multiple databases behind edxapp.
Additionally - add back a removed backwards migration from certificates
0003. I have no idea why this was dropped in the 1.8 upgrade.
We need to be sure the migrations will work even in the presence of data
from the future. get_or_create is a problem, because if the data
already exists, there could be more than one record, even if this
migration only creates one.
Check if the request's user is authenticated before attempting to
get their user preferences. Otherwise, log warnings appear indicating
the UserNotFound error was caught.
Adds a temporary user_preference key, DARK_LANGUAGE_KEY, to hold the user's dark lang preference.
This preference key is deleted when ?clear-lang is placed in query params.
The old-style chinese language codes used in django 1.4 series are now deprecated, as discussed here: https://code.djangoproject.com/ticket/18419.
Although majority of browsers still use the old-style language codes, some new browsers such as IE11 in Windows 8.1 start to use the new-style names instead of old-style ones which makes the current chinese translations of edX can't work properly under these browsers.
As there is no easy way for edX to change a higher version of django, I think we could do some mapping here so that the users who use IE11 in Windows 8.1 or other browsers that use the new-style names can view correct translations.
Also, this fix will make users who use one of the language codes: zh-hk , zh-sg and zh-mo can see the correct translations.
To mark a language as dark-launched, add it to the DARK_LANGUAGES
django conf setting. To activate a dark-launched language, set he
query parameter `preview-lang` to the language code on any url.
[LMS-2045]
[LMS-2077]
[LMS-2076]