diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ede211bd4..9cdfc67bb 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -18,7 +18,7 @@ jobs: - name: build_boost run: | cd ./hikyuu - wget https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2 + wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2 tar -jxf boost_1_75_0.tar.bz2 cd boost_1_75_0 ls diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 428eea7fc..f59aa885d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,7 +17,7 @@ jobs: git clone https://github.com/fasiondog/hikyuu.git --recursive --depth 1 - name: download_boost run: | - Invoke-WebRequest "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.zip" -UseBasicParsing -OutFile ./boost_1_75_0.zip + Invoke-WebRequest "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.zip" -UseBasicParsing -OutFile ./boost_1_75_0.zip Expand-Archive ./boost_1_75_0.zip -DestinationPath ./hikyuu # Copy-Item ./boost_1_75_0 ./hikyuu diff --git a/hikyuu/admin/ServerApi/config.py b/hikyuu/admin/ServerApi/config.py index 0adf01761..265c40cc1 100644 --- a/hikyuu/admin/ServerApi/config.py +++ b/hikyuu/admin/ServerApi/config.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +from PyQt5 import QtCore + server_api_config = {"protocol": "http", "prefix": "hku", "version": "v1"} @@ -10,8 +12,13 @@ def getServerApiUrl(host_url, service, api): def defaultRequestHeader(): - return { + header = { "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0", "Accept-Encoding": "gzip, deflate, br" } + loc = QtCore.QLocale() + if loc.language() == QtCore.QLocale.Chinese: + header["Accept-Language"] = "zh_CN" + print(header) + return header diff --git a/hikyuu_cpp/hikyuu_server/i8n/zh_CN.mo b/hikyuu_cpp/hikyuu_server/i8n/zh_CN.mo index b6a636080..2ecdb6c1b 100644 Binary files a/hikyuu_cpp/hikyuu_server/i8n/zh_CN.mo and b/hikyuu_cpp/hikyuu_server/i8n/zh_CN.mo differ diff --git a/hikyuu_cpp/hikyuu_server/i8n/zh_CN.po b/hikyuu_cpp/hikyuu_server/i8n/zh_CN.po index 45d3eac1b..85568a6d5 100644 --- a/hikyuu_cpp/hikyuu_server/i8n/zh_CN.po +++ b/hikyuu_cpp/hikyuu_server/i8n/zh_CN.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Hikyuu\n" "POT-Creation-Date: 2021-05-03 01:44+0800\n" -"PO-Revision-Date: 2021-05-03 01:44+0800\n" +"PO-Revision-Date: 2021-05-03 01:53+0800\n" "Last-Translator: \n" "Language-Team: hikyuu.org\n" "Language: zh_CN\n"