1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #29713 -- Added check that LANGUAGE_CODE uses standard language id format.

This commit is contained in:
David
2018-09-03 18:43:55 +10:00
committed by Carlton Gibson
parent ee52044a27
commit 5db8d617c0
6 changed files with 80 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ Django's system checks are organized using the following tags:
* ``staticfiles``: Checks :mod:`django.contrib.staticfiles` configuration.
* ``templates``: Checks template related configuration.
* ``urls``: Checks URL configuration.
* ``translation``: Checks language formats used for translation.
Some checks may be registered with multiple tags.
@@ -449,6 +450,18 @@ The following checks are performed on your URL configuration:
* **urls.E006**: The :setting:`MEDIA_URL`/ :setting:`STATIC_URL` setting must
end with a slash.
Translation
-----------
The following checks are performed on your translation configuration:
* **translation.E001**: LANGUAGE_CODE in settings.py is ``<language_code>``.
It should be in the form ll or ll-cc where ll is the language and cc is the
country. Examples include: ``it``, ``de-at``, ``es``, ``pt-br``. The full
set of language codes specifications is outlined by
https://en.wikipedia.org/wiki/IETF_language_tag#Syntax_of_language_tags
``contrib`` app checks
======================