Browse Source

Grammatical adjustments of advanced topic `Documents` (#9426)

Damilola Oladele 2 years ago
parent
commit
64e3595c6e

+ 3 - 3
docs/advanced_topics/documents/custom_document_model.md

@@ -41,15 +41,15 @@ WAGTAILDOCS_DOCUMENT_MODEL = 'app_label.CustomDocument'
 ```
 ```
 
 
 ```{note}
 ```{note}
-Migrating from the builtin document model
+Migrating from the built-in document model:
 
 
 When changing an existing site to use a custom document model, no documents
 When changing an existing site to use a custom document model, no documents
 will be copied to the new model automatically. Copying old documents to the
 will be copied to the new model automatically. Copying old documents to the
 new model would need to be done manually with a
 new model would need to be done manually with a
 {ref}`data migration <django:data-migrations>`.
 {ref}`data migration <django:data-migrations>`.
 
 
-Any templates that reference the builtin document model will still continue
-to work as before.
+Templates that reference the built-in document model will continue
+to work as before
 ```
 ```
 
 
 ## Referring to the document model
 ## Referring to the document model

+ 3 - 3
docs/advanced_topics/documents/title_generation_on_upload.md

@@ -8,11 +8,11 @@ You can also customise this [same behaviour for images](../images/title_generati
 
 
 You can customise the resolved value of this title using a JavaScript [event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) which will listen to the `'wagtail:documents-upload'` event.
 You can customise the resolved value of this title using a JavaScript [event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) which will listen to the `'wagtail:documents-upload'` event.
 
 
-The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](insert_global_admin_js), however any JavaScript that adds the event listener will work.
+The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](insert_global_admin_js). However, any JavaScript that adds an event listener will work.
 
 
 ## DOM Event
 ## DOM Event
 
 
-The event name to listen for is `'wagtail:documents-upload'`. It will be dispatched on the document upload `form`. The event's `detail` attribute will contain:
+The event name to listen to is `'wagtail:documents-upload'`. It will be dispatched on the document upload `form`. The event's `detail` attribute will contain:
 
 
 -   `data` - An object which includes the `title` to be used. It is the filename with the extension removed.
 -   `data` - An object which includes the `title` to be used. It is the filename with the extension removed.
 -   `maxTitleLength` - An integer (or `null`) which is the maximum length of the `Document` model title field.
 -   `maxTitleLength` - An integer (or `null`) which is the maximum length of the `Document` model title field.
@@ -58,7 +58,7 @@ def get_global_admin_js():
 
 
 ### Changing generated titles on the page editor only to remove dashes/underscores
 ### Changing generated titles on the page editor only to remove dashes/underscores
 
 
-Using the [`insert_editor_js` hook](insert_editor_js) instead so that this script will not run on the `Document` upload page, only on page editors.
+Use the [`insert_editor_js` hook](insert_editor_js) instead so that this script will run only on page editors and not on the `Document`.
 
 
 ```python
 ```python
 # wagtail_hooks.py
 # wagtail_hooks.py