Skip to content

Commit

Permalink
Merge pull request #4 from xfz329/new_ui
Browse files Browse the repository at this point in the history
0.1.4.b
  • Loading branch information
xfz329 authored Aug 6, 2023
2 parents fc11393 + a0d64c3 commit 34aa444
Show file tree
Hide file tree
Showing 23 changed files with 279 additions and 219 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@ dmypy.json
# about files
!/about/*.*
/config
!requirements.txt
!requirements.txt
logs/
3 changes: 2 additions & 1 deletion common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class Config(QConfig):

YEAR = "2004-2020"
AUTHOR = "Jiang Feng"
VERSION = "0.1.4"
VERSION = "0.1.4.b"
KERNEL_VERSION = "0.1.4"
HELP_URL = "https://xfz329-pk4adi-tutorial.readthedocs.io/en/latest/"
REPO_URL = "https://github.com/xfz329/pk4adi_gui"
FEEDBACK_URL = "https://github.com/xfz329/pk4adi_gui/issues"
Expand Down
5 changes: 3 additions & 2 deletions nsis/output.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

; 安装程序初始定义常量
!define PRODUCT_NAME "PK4ADI计算器"
!define PRODUCT_VERSION "0.1.4.a"
!define PRODUCT_VERSION "0.1.4.b"
!define PRODUCT_PUBLISHER "浙江大学生仪学院"
!define PRODUCT_WEB_SITE "http://www.cbeis.zju.edu.cn/main.htm"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
Expand Down Expand Up @@ -41,7 +41,7 @@ SetCompressor lzma
; ------ MUI 现代界面定义结束 ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "D:\UrgeData\Documents\Codes\Github\pk_gui\nsis\PK4ADI_0.1.4.a_x64-setup.exe"
OutFile "D:\UrgeData\Documents\Codes\Github\pk_gui\nsis\PK4ADI_0.1.4.b_x64-setup.exe"
InstallDir "$PROGRAMFILES\PK4ADI"
ShowInstDetails show
ShowUnInstDetails show
Expand Down Expand Up @@ -83,6 +83,7 @@ Section Uninstall
RMDir "$SMPROGRAMS\PK4ADI"
RMDir ""

RMDir /r "$INSTDIR\license"
RMDir /r "$INSTDIR\numpy"
RMDir /r "$INSTDIR\pandas"
RMDir /r "$INSTDIR\PIL"
Expand Down
15 changes: 0 additions & 15 deletions qms/data_toolbar.py.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,5 @@
<source>Display the workbook {0} in the file.</source>
<translation>当前显示工作簿名为 {0}。</translation>
</message>
<message>
<location filename="../view/widget/data_toolbar.py" line="144"/>
<source>There are duplicate column names in the displaying data. This may trigger subsequent calculation errors or program crashes.</source>
<translation>当前数据存在重复列名,这可能会引起程序错误。</translation>
</message>
<message>
<location filename="../view/widget/data_toolbar.py" line="152"/>
<source>Warn</source>
<translation>警告</translation>
</message>
<message>
<location filename="../view/widget/data_toolbar.py" line="152"/>
<source>Plain number used as the column name in the displaying data. This may trigger subsequent calculation errors or program crashes.</source>
<translation>当前数据存在列名为纯数字,这可能会引起程序错误。</translation>
</message>
</context>
</TS>
11 changes: 5 additions & 6 deletions qms/openthread.py.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN" sourcelanguage="en_US">
<!DOCTYPE TS><TS version="2.0" language="zh_CN" sourcelanguage="en_US">
<context>
<name>OpenThread</name>
<message>
<location filename="../thread/openthread.py" line="26"/>
<location filename="../threads/openthread.py" line="26"/>
<source>The file name is empty!</source>
<translation>文件名为空!</translation>
</message>
<message>
<location filename="../thread/openthread.py" line="30"/>
<location filename="../threads/openthread.py" line="30"/>
<source>The csv file {0} read finished.</source>
<translation>读取csv文件 {0} 完成。.</translation>
</message>
<message>
<location filename="../thread/openthread.py" line="33"/>
<location filename="../threads/openthread.py" line="33"/>
<source>The xls/xlsx file {0} read finished.</source>
<translation>读取 xls/xlsx文件 {0} 完成。.</translation>
</message>
<message>
<location filename="../thread/openthread.py" line="35"/>
<location filename="../threads/openthread.py" line="35"/>
<source>The file {0} is not supported yet.</source>
<translation>尚未支持的文件类型 {0}.</translation>
</message>
Expand Down
9 changes: 7 additions & 2 deletions qms/operate_toolbar.py.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
</message>
<message>
<location filename="../view/widget/operate_toolbar.py" line="26"/>
<source>Calculating</source>
<translation>计算中</translation>
<source>Percentage of process 0%</source>
<translation>当前处理进度 0%</translation>
</message>
<message>
<location filename="../view/widget/operate_toolbar.py" line="52"/>
<source>Percentage of process </source>
<translation>当前处理进度 </translation>
</message>
</context>
</TS>
102 changes: 61 additions & 41 deletions qms/pkthread.py.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,169 +4,189 @@
<context>
<name>PKThread</name>
<message>
<location filename="../thread/pkthread.py" line="58"/>
<location filename="../threads/pkthread.py" line="62"/>
<source>Working in the thread.</source>
<translation>使用线程进行数据计算中。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="84"/>
<location filename="../threads/pkthread.py" line="91"/>
<source>Save the result to the following files.</source>
<translation>本次结果已保存为以下文件:</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="95"/>
<location filename="../threads/pkthread.py" line="102"/>
<source>Must set a independent variable only and a test variable at least for calculating the PKs.</source>
<translation>PK值计算需要设置一个独立变量和至少一个检验变量!</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="136"/>
<location filename="../threads/pkthread.py" line="150"/>
<source>Independent variables</source>
<translation>独立变量</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="98"/>
<location filename="../threads/pkthread.py" line="105"/>
<source>Test variables</source>
<translation>检验变量</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="98"/>
<location filename="../threads/pkthread.py" line="106"/>
<source>Jackknife</source>
<translation>刀切法</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="99"/>
<location filename="../threads/pkthread.py" line="105"/>
<source>Error Detail</source>
<translation>错误详情</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="113"/>
<location filename="../threads/pkthread.py" line="122"/>
<source>The result above contains error, calculate pk failed.</source>
<translation>上述结果中包含错误,PK值计算失败。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="115"/>
<location filename="../threads/pkthread.py" line="129"/>
<source>Calculate PKs command finished. Start saving the results.</source>
<translation>计算PK值命令执行完毕,开始存储结果至文件。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="133"/>
<location filename="../threads/pkthread.py" line="147"/>
<source>Must set a independent variable only and two test variables at least for comparing the PKs.</source>
<translation>PK值比较需要设置一个独立变量和至少两个检验变量!</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="136"/>
<location filename="../threads/pkthread.py" line="150"/>
<source>Test variables 1</source>
<translation>检验变量1</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="136"/>
<location filename="../threads/pkthread.py" line="150"/>
<source>Test variables 2</source>
<translation>检验变量2</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="137"/>
<location filename="../threads/pkthread.py" line="151"/>
<source>Error of PK1</source>
<translation>计算PK1错误</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="151"/>
<source>Error of PK2</source>
<translation>计算PK2错误</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="151"/>
<source>Error of comparision</source>
<translation>比较PK错误</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="152"/>
<source>P value of norm</source>
<translation>正态分布下的P值</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="137"/>
<location filename="../threads/pkthread.py" line="152"/>
<source>Comment 1</source>
<translation>备注1</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="138"/>
<location filename="../threads/pkthread.py" line="153"/>
<source>P value of t</source>
<translation>t分布下的P值</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="138"/>
<location filename="../threads/pkthread.py" line="153"/>
<source>Comment 2</source>
<translation>备注2</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="138"/>
<source>Error 1</source>
<translation>错误详情1</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="138"/>
<source>Error 2</source>
<translation>错误详情2</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="169"/>
<location filename="../threads/pkthread.py" line="196"/>
<source>The result above contains error, compare pks failed.</source>
<translation>上述结果中包含错误,PK值比较失败。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="171"/>
<location filename="../threads/pkthread.py" line="203"/>
<source>Compare PKs command finished. Start saving the results.</source>
<translation>比较PK值命令执行完毕,开始存储结果至文件。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="188"/>
<location filename="../threads/pkthread.py" line="220"/>
<source>Query the PK between {0} and {1}</source>
<translation>查询 {0} and {1}的PK值。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="208"/>
<location filename="../threads/pkthread.py" line="240"/>
<source>Get the cache result.</source>
<translation>成功获取缓存值。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="193"/>
<location filename="../threads/pkthread.py" line="225"/>
<source>There is no cache result, start calculating PK.</source>
<translation>查询缓存失败,直接开始计算PK值。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="195"/>
<location filename="../threads/pkthread.py" line="227"/>
<source>Calculating PK finished, the result is as the following.</source>
<translation>计算PK值完成,结果如下:</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="205"/>
<location filename="../threads/pkthread.py" line="237"/>
<source>Query the PKs&apos; comparison result between the PK value of {0} and {1} and the PK value of {2} and {3}.</source>
<translation>比较{0}与{1}间的PK值 与 {2} 与 {3} 间的PK值。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="210"/>
<location filename="../threads/pkthread.py" line="242"/>
<source>There is no cache result, start compare PK.</source>
<translation>查询缓存失败,直接开始比较PK值。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="213"/>
<location filename="../threads/pkthread.py" line="245"/>
<source>Comparing PK finished, the result is as the following.</source>
<translation>比较PK值完成,结果如下:</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="231"/>
<location filename="../threads/pkthread.py" line="263"/>
<source>The test variable&apos;s data type errors, it should be the int or float.</source>
<translation>检验变量数据类型错误,需要为整型或浮点型。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="234"/>
<location filename="../threads/pkthread.py" line="266"/>
<source>The test variable contains nan.</source>
<translation>检验变量包含非数值字符。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="237"/>
<location filename="../threads/pkthread.py" line="269"/>
<source>The independent variable&apos;s data type errors, it should be the int or float.</source>
<translation>独立变量数据类型错误,需要为整型或浮点型。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="240"/>
<location filename="../threads/pkthread.py" line="272"/>
<source>The independent variable contains nan.</source>
<translation>独立变量包含非数值字符。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="245"/>
<location filename="../threads/pkthread.py" line="277"/>
<source>The lengths of test and independent variable are not equal or the length less than 2.</source>
<translation>独立变量与检验变量长度不等或长度小于2。</translation>
</message>
<message>
<location filename="../thread/pkthread.py" line="249"/>
<location filename="../threads/pkthread.py" line="281"/>
<source>The independent variable should contain 2 distinct values at least.</source>
<translation>独立变量需最少包含两个区分数值。</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="73"/>
<source>Process finished! Start writing to files.</source>
<translation>计算完成!开始将结果写入文件。</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="291"/>
<source>math domain error</source>
<translation>对负数求根错误</translation>
</message>
<message>
<location filename="../threads/pkthread.py" line="302"/>
<source>float division by zero</source>
<translation>除0错误</translation>
</message>
</context>
</TS>
4 changes: 2 additions & 2 deletions qms/setting_interface.py.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
</message>
<message>
<location filename="../view/setting_interface.py" line="116"/>
<source>Based on python package PK4ADI 0.1.3</source>
<translation>基于开源python包 PK4ADI 0.1.3</translation>
<source>Based on python package PK4ADI </source>
<translation>基于开源python包 PK4ADI </translation>
</message>
<message>
<location filename="../view/setting_interface.py" line="132"/>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
openpyxl
pk4adi >=0.1.3
pk4adi >=0.1.4
pandas
PyQt5-Frameless-Window>=0.2.7
PyQt_Fluent_Widgets
Binary file modified resource/i18n/pk4adi_calculator.zh_CN.qm
Binary file not shown.
Loading

0 comments on commit 34aa444

Please sign in to comment.