Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.

Commit 9a2b244

Browse files
committed
support chn menu on windows simplified cdn locale
1 parent 02083c8 commit 9a2b244

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloudflare-partner-cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@
8181
}
8282

8383
def i18n(s):
84-
return I18N[s] if LOCALE[1] and LOCALE[1].lower() == "utf-8" and s in I18N else s
84+
_ = I18N[s] if LOCALE[1] and LOCALE[1].lower() in ("utf-8", "cp936") and s in I18N else s
85+
if LOCALE[1].lower() == "cp936" and not PY3K: # windows with simplified Chinese locale
86+
return _.decode('utf-8').encode('gb18030')
87+
return _
8588

8689
def log(fmt, arg = (), level = "INFO"):
8790
if PY3K:

0 commit comments

Comments
 (0)