summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-04-29 14:36:09 +0000
committerJannis Leidel <jannis@leidel.info>2010-04-29 14:36:09 +0000
commit77c13844ae9f30ecc10b54cf0b1a338039aa7cea (patch)
treecf74acede5390a0017ec9d43aa9cbce330a98555 /django/utils
parentdf44485c40b144baac626d351c2a462988c2e577 (diff)
Fixed #11068 - Introduced new language code "nb" for Norwegian Bokmål as a replacement of the current "no".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13047 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation/trans_real.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 7a66177f30..641318ba01 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -184,6 +184,12 @@ def activate(language):
language and installs it as the current translation object for the current
thread.
"""
+ if isinstance(language, basestring) and language == 'no':
+ warnings.warn(
+ "The use of the language code 'no' is deprecated. "
+ "Please use the 'nb' translation instead.",
+ PendingDeprecationWarning
+ )
_active[currentThread()] = translation(language)
def deactivate():
@@ -504,8 +510,8 @@ def get_date_formats():
formats provided in the settings will be used.
"""
warnings.warn(
- '`django.utils.translation.get_date_formats` is deprecated. '
- 'Please update your code to use the new i18n aware formatting.',
+ "'django.utils.translation.get_date_formats' is deprecated. "
+ "Please update your code to use the new i18n aware formatting.",
PendingDeprecationWarning
)
from django.conf import settings
@@ -527,8 +533,8 @@ def get_partial_date_formats():
formats provided in the settings will be used.
"""
warnings.warn(
- '`django.utils.translation.get_partial_date_formats` is deprecated. '
- 'Please update your code to use the new i18n aware formatting.',
+ "'django.utils.translation.get_partial_date_formats' is deprecated. "
+ "Please update your code to use the new i18n aware formatting.",
PendingDeprecationWarning
)
from django.conf import settings