Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Grammar cleanups for recent documentation and docstring changes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f7d2e9ea9f0d9bba38553f21cfe3f1a821916374 1 parent f3319e4
Adrian Holovaty authored November 13, 2005
4  django/utils/translation.py
@@ -256,7 +256,7 @@ def ngettext(singular, plural, number):
256 256
 def check_for_language(lang_code):
257 257
     """
258 258
     Checks whether there is a global language file for the given language code.
259  
-    This is used to decide whether a user-provided language is available. this is
  259
+    This is used to decide whether a user-provided language is available. This is
260 260
     only used for language codes from either the cookies or session.
261 261
     """
262 262
     from django.conf import settings
@@ -327,7 +327,7 @@ def _parsed(el):
327 327
 
328 328
 def get_date_formats():
329 329
     """
330  
-    This function checks wether translation files provide a translation for some
  330
+    This function checks whether translation files provide a translation for some
331 331
     technical message ID to store date and time formats. If it doesn't contain
332 332
     one, the formats provided in the settings will be used.
333 333
     """
15  docs/i18n.txt
@@ -426,18 +426,21 @@ Notes:
426 426
       Django uses the base language. For example, if a user specifies ``de-at``
427 427
       (Austrian German) but Django only has ``de`` available, Django uses
428 428
       ``de``.
429  
-    * only languages listed in the LANGUAGES setting can be selected. So if you want
430  
-      to restrict the language selection to a subset of provided languages (because
431  
-      your appliaction doesn't provide all those languages), just set it to a list
432  
-      of languages like this::
  429
+    * Only languages listed in the `LANGUAGES setting`_ can be selected. If
  430
+      you want to restrict the language selection to a subset of provided
  431
+      languages (because your appliaction doesn't provide all those languages),
  432
+      set ``LANGUAGES`` to a list of languages. For example::
433 433
 
434 434
           LANGUAGES = (
435 435
             ('de', _('German')),
436 436
             ('en', _('English')),
437 437
           )
438 438
 
439  
-      This would restrict the available languages for automatic selection to German
440  
-      and English (and any sublanguage of those, like de-ch or en-us).
  439
+      This example restricts languages that are available for automatic
  440
+      selection to German and English (and any sublanguage, like de-ch or
  441
+      en-us).
  442
+
  443
+      .. _LANGUAGES setting: http://www.djangoproject.com/documentation/settings/#languages
441 444
 
442 445
 Once ``LocaleMiddleware`` determines the user's preference, it makes this
443 446
 preference available as ``request.LANGUAGE_CODE`` for each `request object`_.
33  docs/settings.txt
@@ -403,12 +403,33 @@ in standard language format. For example, U.S. English is ``"en-us"``. See the
403 403
 LANGUAGES
404 404
 ---------
405 405
 
406  
-Default: a list of available languages and their name
407  
-
408  
-This is a list of two-tuples with language code and language name that are available
409  
-for language selection. See the `internationalization docs`_ for details. It usually
410  
-isn't defined, only if you want to restrict language selection to a subset of the
411  
-django-provided languages you need to set it.
  406
+Default: A tuple of all available languages. Currently, this is::
  407
+
  408
+    LANGUAGES = (
  409
+        ('bn', _('Bengali')),
  410
+        ('cs', _('Czech')),
  411
+        ('cy', _('Welsh')),
  412
+        ('de', _('German')),
  413
+        ('en', _('English')),
  414
+        ('es', _('Spanish')),
  415
+        ('fr', _('French')),
  416
+        ('gl', _('Galician')),
  417
+        ('it', _('Italian')),
  418
+        ('no', _('Norwegian')),
  419
+        ('pt-br', _('Brazilian')),
  420
+        ('ro', _('Romanian')),
  421
+        ('ru', _('Russian')),
  422
+        ('sk', _('Slovak')),
  423
+        ('sr', _('Serbian')),
  424
+        ('zh-cn', _('Simplified Chinese')),
  425
+    )
  426
+
  427
+A tuple of two-tuples in the format (language code, language name). This
  428
+specifies which languages are available for language selection. See the
  429
+`internationalization docs`_ for details.
  430
+
  431
+Generally, the default value should suffice. Only set this setting if you want
  432
+to restrict language selection to a subset of the Django-provided languages.
412 433
 
413 434
 MANAGERS
414 435
 --------

0 notes on commit f7d2e9e

Please sign in to comment.
Something went wrong with that request. Please try again.