summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2021-04-29 19:29:08 +0100
committerGitHub <noreply@github.com>2021-04-29 20:29:08 +0200
commit2161db0792f2e4d3deef3e09cd72f7a08340cafe (patch)
tree94ffd28dc91c0c7b3aae5cc53a8f1233a7b277c1 /django
parent907d3a7ff4e12ad4ccc86af26a728007fe4d6fa2 (diff)
Fixed capitalization of "ECMAScript" and "JavaScript".
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/static/admin/js/core.js2
-rw-r--r--django/contrib/admin/templatetags/admin_list.py2
-rw-r--r--django/contrib/admin/templatetags/admin_modify.py2
-rw-r--r--django/http/response.py2
-rw-r--r--django/utils/jslex.py14
5 files changed, 11 insertions, 11 deletions
diff --git a/django/contrib/admin/static/admin/js/core.js b/django/contrib/admin/static/admin/js/core.js
index 3a2e4aa728..afdae281c3 100644
--- a/django/contrib/admin/static/admin/js/core.js
+++ b/django/contrib/admin/static/admin/js/core.js
@@ -1,4 +1,4 @@
-// Core javascript helper functions
+// Core JavaScript helper functions
'use strict';
// quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]);
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index f4b6d8d59f..86eade6fed 100644
--- a/django/contrib/admin/templatetags/admin_list.py
+++ b/django/contrib/admin/templatetags/admin_list.py
@@ -234,7 +234,7 @@ def items_for_result(cl, result, form):
link_or_text = result_repr
else:
url = add_preserved_filters({'preserved_filters': cl.preserved_filters, 'opts': cl.opts}, url)
- # Convert the pk to something that can be used in Javascript.
+ # Convert the pk to something that can be used in JavaScript.
# Problem cases are non-ASCII strings.
if cl.to_field:
attr = str(cl.to_field)
diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py
index ee5f23b8af..fcc1755199 100644
--- a/django/contrib/admin/templatetags/admin_modify.py
+++ b/django/contrib/admin/templatetags/admin_modify.py
@@ -10,7 +10,7 @@ register = template.Library()
def prepopulated_fields_js(context):
"""
- Create a list of prepopulated_fields that should render Javascript for
+ Create a list of prepopulated_fields that should render JavaScript for
the prepopulated fields for both the admin form and inlines.
"""
prepopulated_fields = []
diff --git a/django/http/response.py b/django/http/response.py
index 1c22edaff3..f1f0a1ed43 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -581,7 +581,7 @@ class JsonResponse(HttpResponse):
An HTTP response class that consumes data to be serialized to JSON.
:param data: Data to be dumped into json. By default only ``dict`` objects
- are allowed to be passed due to a security flaw before EcmaScript 5. See
+ are allowed to be passed due to a security flaw before ECMAScript 5. See
the ``safe`` parameter for more information.
:param encoder: Should be a json encoder class. Defaults to
``django.core.serializers.json.DjangoJSONEncoder``.
diff --git a/django/utils/jslex.py b/django/utils/jslex.py
index 1e3a8eb532..d775d23a35 100644
--- a/django/utils/jslex.py
+++ b/django/utils/jslex.py
@@ -1,4 +1,4 @@
-"""JsLex: a lexer for Javascript"""
+"""JsLex: a lexer for JavaScript"""
# Originally from https://bitbucket.org/ned/jslex
import re
@@ -75,23 +75,23 @@ class Lexer:
class JsLexer(Lexer):
"""
- A Javascript lexer
+ A JavaScript lexer
>>> lexer = JsLexer()
>>> list(lexer.lex("a = 1"))
[('id', 'a'), ('ws', ' '), ('punct', '='), ('ws', ' '), ('dnum', '1')]
- This doesn't properly handle non-ASCII characters in the Javascript source.
+ This doesn't properly handle non-ASCII characters in the JavaScript source.
"""
# Because these tokens are matched as alternatives in a regex, longer
# possibilities must appear in the list before shorter ones, for example,
# '>>' before '>'.
#
- # Note that we don't have to detect malformed Javascript, only properly
- # lex correct Javascript, so much of this is simplified.
+ # Note that we don't have to detect malformed JavaScript, only properly
+ # lex correct JavaScript, so much of this is simplified.
- # Details of Javascript lexical structure are taken from
+ # Details of JavaScript lexical structure are taken from
# http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
# A useful explanation of automatic semicolon insertion is at
@@ -184,7 +184,7 @@ class JsLexer(Lexer):
def prepare_js_for_gettext(js):
"""
- Convert the Javascript source `js` into something resembling C for
+ Convert the JavaScript source `js` into something resembling C for
xgettext.
What actually happens is that all the regex literals are replaced with