- Rename escape_json_dumps to dump_js_escaped_json
- Rename escape_js_string to js_escaped_string
- Update js_escaped_string to output empty string for None
- Introduce dump_html_escaped_json
- Move dump_js_escaped_json after the pipe as new best practice
- Introduce additional uses of helpers
- Introduce new djangolib directory and move js_utils
- Remove escaping in display_name_with_default
- Move escaped version to deprecated display_name_with_default_escaped
- Does not include any other changes to remove double-escaping
Thanks to agaylard who initiated this work:
https://github.com/edx/edx-platform/pull/10756
TNL-3425
Make escaping for json simpler and more consistent in Mako templates
- add escape_json_dumps to escape and json.dumps
- add escape_js_str to escape javascript string
- refactor Studio to use escape_json_dumps in Mako templates
TNL-2646: Escape json.dumps
Filter by Language:
Designation for course language(s) in Studio
allows for filtering of courses based on their language in the sidebar
Reuses active filter view UI/IA from find courses page on edx.org
view for clearing individual or all filters, as with edx.org filtering
This allows course authors to choose between two difference licenses for their
course content: All Rights Reserved, or Creative Commons. In the backend, XBlocks
that wish to allow custom licenses need only inherit from LicenseMixin, which
adds a `license` field as a string.
License information is displayed in the Studio editor view, and just below the
rendered XBlock in the LMS. In addition, if the course block itself has a custom
license set, this license will display just below the main body of the page
on courseware pages.
This entire feature is gated behind the LICENSING feature flag.
1. Extract the full sentence rather than parital of a sentence, so that languages with different word orders than English can benifit from this.
2. Using ngettext instead of gettext with 'xxx(s)', as Transifex treats `()` as special characters so that it enforces the translated string must have the same number of `()` pairs. Such enforcement makes translations difficult, as not every language can use forms like 'xxx(s)' to represent both singular & plural within a single word.
1. Change the link of course's about page secure aware, which displays 'https' or 'http' prefix according to the current protocol.
2. Make the email in this page translatable.
This commit adds all of cms.
These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).
For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.
Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>
[LMS-2370]