Skip to content

Commit

Permalink
docs: Fix a few typos (#651)
Browse files Browse the repository at this point in the history
There are small typos in:
- docs/modeltranslation/admin.rst
- docs/modeltranslation/installation.rst
- docs/modeltranslation/related_projects.rst
- modeltranslation/admin.py
- modeltranslation/management/commands/sync_translation_fields.py
- modeltranslation/tests/models.py

Fixes:
- Should read `similar` rather than `similiar`.
- Should read `whose` rather than `whos`.
- Should read `original` rather than `orginal`.
- Should read `missing` rather than `missings`.
- Should read `consistent` rather than `consistant`.
- Should read `compatibility` rather than `compatibiliy`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
  • Loading branch information
timgates42 committed Sep 3, 2022
1 parent 8ef8afd commit ab79ec8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/modeltranslation/admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In addition the ``TranslationBaseModelAdmin`` class overrides ``get_form`` and

1. Removes the original field from every admin form by adding it to
``exclude`` under the hood.
2. Replaces the - now removed - orginal fields with their corresponding
2. Replaces the - now removed - original fields with their corresponding
translation fields.

Taken the ``fieldsets`` option as an example, where the ``title`` field is
Expand Down
4 changes: 2 additions & 2 deletions docs/modeltranslation/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Example::

Default: ``()`` (empty tuple)

Modeltranslation uses an autoregister feature similiar to the one in Django's
Modeltranslation uses an autoregister feature similar to the one in Django's
admin. The autoregistration process will look for a ``translation.py``
file in the root directory of each application that is in ``INSTALLED_APPS``.

Expand All @@ -298,7 +298,7 @@ Example::
file which was defined through
``MODELTRANSLATION_TRANSLATION_REGISTRY = '<PROJECT_MODULE>.translation'``.

In version 0.4 and 0.5, for backwards compatibiliy, the module defined through this setting was
In version 0.4 and 0.5, for backwards compatibility, the module defined through this setting was
automatically added to ``MODELTRANSLATION_TRANSLATION_FILES``. A
``DeprecationWarning`` was issued in this case.

Expand Down
2 changes: 1 addition & 1 deletion docs/modeltranslation/related_projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It is not possible to reuse existing models without modifying them.

A much simpler version of the above `django-multilingual`.

It works very similiar to the `django-multilingual` approach.
It works very similar to the `django-multilingual` approach.


`transdb`_
Expand Down
2 changes: 1 addition & 1 deletion modeltranslation/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _get_form_or_formset(self, request, obj, **kwargs):
# Take the custom ModelForm's Meta.exclude into account only if the
# ModelAdmin doesn't define its own.
exclude.extend(self.form._meta.exclude)
# If exclude is an empty list we pass None to be consistant with the
# If exclude is an empty list we pass None to be consistent with the
# default on modelform_factory
exclude = self.replace_orig_field(exclude) or None
exclude = self._exclude_original_fields(exclude)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def get_table_fields(self, db_table):

def get_missing_languages(self, field_name, db_table):
"""
Gets only missings fields.
Gets only missing fields.
"""
db_table_fields = self.get_table_fields(db_table)
for lang_code in AVAILABLE_LANGUAGES:
Expand Down
2 changes: 1 addition & 1 deletion modeltranslation/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class ModelY(AbstractModelY):
pass


# Non-abstract base models whos Manager is not allowed to be overwritten
# Non-abstract base models whose Manager is not allowed to be overwritten


class InheritedPermission(Permission):
Expand Down

0 comments on commit ab79ec8

Please sign in to comment.