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
35ea6d83
Kaydet (Commit)
35ea6d83
authored
Agu 16, 2016
tarafından
Mattias Loverot
Kaydeden (comit)
Tim Graham
Agu 17, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27069 -- Doc'd which gettext functions may be aliased as _.
üst
49fcbe73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
translation.txt
docs/topics/i18n/translation.txt
+10
-0
No files found.
docs/topics/i18n/translation.txt
Dosyayı görüntüle @
35ea6d83
...
...
@@ -70,6 +70,16 @@ as a shorter alias, ``_``, to save typing.
global ``_()`` function causes interference. Explicitly importing
``ugettext()`` as ``_()`` avoids this problem.
.. admonition:: What functions may be aliased as ``_``?
Because of how ``xgettext`` (used by :djadmin:`makemessages`) works, only
functions that take a single string argument can be imported as ``_``:
* :func:`~django.utils.translation.gettext`
* :func:`~django.utils.translation.gettext_lazy`
* :func:`~django.utils.translation.ugettext`
* :func:`~django.utils.translation.ugettext_lazy`
In this example, the text ``"Welcome to my site."`` is marked as a translation
string::
...
...
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