Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
d3596477
Kaydet (Commit)
d3596477
authored
Haz 17, 2014
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21498: Don't use a fallback language if you're en-us.
üst
b22917bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
trans_real.py
django/utils/translation/trans_real.py
+5
-1
No files found.
django/utils/translation/trans_real.py
Dosyayı görüntüle @
d3596477
...
@@ -173,7 +173,11 @@ class DjangoTranslation(gettext_module.GNUTranslations):
...
@@ -173,7 +173,11 @@ class DjangoTranslation(gettext_module.GNUTranslations):
def
_add_fallback
(
self
):
def
_add_fallback
(
self
):
"""Sets the GNUTranslations() fallback with the default language."""
"""Sets the GNUTranslations() fallback with the default language."""
if
self
.
__language
==
settings
.
LANGUAGE_CODE
:
# Don't set a fallback for the default language or for
# en-us (as it's empty, so it'll ALWAYS fall back to the default
# language; found this as part of #21498, as we set en-us for
# management commands)
if
self
.
__language
==
settings
.
LANGUAGE_CODE
or
self
.
__language
==
"en-us"
:
return
return
default_translation
=
translation
(
settings
.
LANGUAGE_CODE
)
default_translation
=
translation
(
settings
.
LANGUAGE_CODE
)
self
.
add_fallback
(
default_translation
)
self
.
add_fallback
(
default_translation
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment