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
2757209c
Kaydet (Commit)
2757209c
authored
Şub 06, 2017
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27795 -- Removed force_text from templatize function
üst
15c14f6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
makemessages.py
django/core/management/commands/makemessages.py
+1
-1
template.py
django/utils/translation/template.py
+1
-3
No files found.
django/core/management/commands/makemessages.py
Dosyayı görüntüle @
2757209c
...
...
@@ -110,7 +110,7 @@ class BuildFile:
if
self
.
domain
==
'djangojs'
:
content
=
prepare_js_for_gettext
(
src_data
)
elif
self
.
domain
==
'django'
:
content
=
templatize
(
src_data
,
origin
=
self
.
path
[
2
:]
,
charset
=
encoding
)
content
=
templatize
(
src_data
,
origin
=
self
.
path
[
2
:])
with
open
(
self
.
work_path
,
'w'
,
encoding
=
'utf-8'
)
as
fp
:
fp
.
write
(
content
)
...
...
django/utils/translation/template.py
Dosyayı görüntüle @
2757209c
...
...
@@ -6,7 +6,6 @@ from django.template.base import (
TOKEN_BLOCK
,
TOKEN_COMMENT
,
TOKEN_TEXT
,
TOKEN_VAR
,
TRANSLATOR_COMMENT_MARK
,
Lexer
,
)
from
django.utils.encoding
import
force_text
from
.
import
TranslatorCommentWarning
,
trim_whitespace
...
...
@@ -36,13 +35,12 @@ plural_re = re.compile(r"""^\s*plural$""")
constant_re
=
re
.
compile
(
r"""_\(((?:".*?")|(?:'.*?'))\)"""
)
def
templatize
(
src
,
origin
=
None
,
charset
=
'utf-8'
):
def
templatize
(
src
,
origin
=
None
):
"""
Turn a Django template into something that is understood by xgettext. It
does so by translating the Django translation tags into standard gettext
function invocations.
"""
src
=
force_text
(
src
,
charset
)
out
=
StringIO
(
''
)
message_context
=
None
intrans
=
False
...
...
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