From 6db1b12611942e2a40aff24e9415157289c33770 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Fri, 21 Jun 2019 23:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/language/__init__.py | 2 +- vnpy/trader/language/chinese/constant.py | 4 ++++ vnpy/trader/language/english/constant.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/language/__init__.py b/vnpy/trader/language/__init__.py index 6a20d0f4..c9d512a1 100644 --- a/vnpy/trader/language/__init__.py +++ b/vnpy/trader/language/__init__.py @@ -5,5 +5,5 @@ from .chinese import text, constant # 是否要使用英文 from vnpy.trader.vtGlobal import globalSetting -if globalSetting['language'] == 'english': +if globalSetting.get('language',None) == 'english': from vnpy.trader.language.english import text, constant \ No newline at end of file diff --git a/vnpy/trader/language/chinese/constant.py b/vnpy/trader/language/chinese/constant.py index 1263a8d3..9c8ed0b7 100644 --- a/vnpy/trader/language/chinese/constant.py +++ b/vnpy/trader/language/chinese/constant.py @@ -53,6 +53,10 @@ OPTION_PUT = u'看跌期权' # 交易所类型 EXCHANGE_SSE = 'SSE' # 上交所 EXCHANGE_SZSE = 'SZSE' # 深交所 + +EXCHANGE_XSHG = 'XSHG' # 上交所(股票使用) +EXCHANGE_XSHE = 'XSHE' # 深交所(股票使用) + EXCHANGE_CFFEX = 'CFFEX' # 中金所 EXCHANGE_SHFE = 'SHFE' # 上期所 EXCHANGE_CZCE = 'CZCE' # 郑商所 diff --git a/vnpy/trader/language/english/constant.py b/vnpy/trader/language/english/constant.py index 506057aa..4bc6221c 100644 --- a/vnpy/trader/language/english/constant.py +++ b/vnpy/trader/language/english/constant.py @@ -54,6 +54,10 @@ OPTION_PUT = u'put' # 交易所类型 EXCHANGE_SSE = 'SSE' # 上交所 EXCHANGE_SZSE = 'SZSE' # 深交所 + +EXCHANGE_XSHG = 'XSHG' # 上交所(股票使用) +EXCHANGE_XSHE = 'XSHE' # 深交所(股票使用) + EXCHANGE_CFFEX = 'CFFEX' # 中金所 EXCHANGE_SHFE = 'SHFE' # 上期所 EXCHANGE_CZCE = 'CZCE' # 郑商所