Skip to content

Commit 9cab73a

Browse files
committed
Support for newer Django versions in orig_str
1 parent efe56b9 commit 9cab73a

File tree

6 files changed

+4
-1
lines changed

6 files changed

+4
-1
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
.Python
1010
env/
1111
venv/
12+
.venv/
1213
build/
1314
develop-eggs/
1415
dist/

Diff for: internationalflavor/_helpers.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33

44
def orig_str(lazy_str):
5-
return lazy_str._proxy____args[0]
5+
if hasattr(lazy_str, "_proxy____args"):
6+
return lazy_str._proxy____args[0]
7+
return lazy_str._args[0]
68

79

810
def _string_format(str, format):

Diff for: internationalflavor/locale/io/LC_MESSAGES/django.mo

-29 Bytes
Binary file not shown.

Diff for: internationalflavor/locale/kab/LC_MESSAGES/django.mo

3.5 KB
Binary file not shown.

Diff for: internationalflavor/locale/os/LC_MESSAGES/django.mo

2.53 KB
Binary file not shown.

Diff for: internationalflavor/locale/udm/LC_MESSAGES/django.mo

-29 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)