Просмотр исходного кода

Add guideline on the use of British vs American English

Matt Westcott 6 лет назад
Родитель
Сommit
06d8fb0f63
2 измененных файлов с 8 добавлено и 0 удалено
  1. 7 0
      docs/contributing/general_guidelines.rst
  2. 1 0
      docs/contributing/index.rst

+ 7 - 0
docs/contributing/general_guidelines.rst

@@ -0,0 +1,7 @@
+General coding guidelines
+=========================
+
+Language
+~~~~~~~~
+
+British English is preferred for user-facing text; this text should also be marked for translation (using the ``django.utils.translation.gettext`` function and ``{% trans %}`` template tag, for example). However, identifiers within code should use American English if the British or international spelling would conflict with built-in language keywords; for example, CSS code should consistently use the spelling ``color`` to avoid inconsistencies like ``background-color: $colour-red``.

+ 1 - 0
docs/contributing/index.rst

@@ -46,6 +46,7 @@ More information
     :maxdepth: 2
 
     styleguide
+    general_guidelines
     python_guidelines
     css_guidelines
     javascript_guidelines