Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
增加无网络连接时的错误提示对话框
Browse files Browse the repository at this point in the history
  • Loading branch information
MerrickZ committed Jun 26, 2016
1 parent 6006387 commit 1156278
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CnBeta/assets/about.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ Page {
text: qsTr("2. Raw text process may produces bad paragraphs.")
textStyle.fontWeight: FontWeight.W100
}
Label {
multiline: true
horizontalAlignment: HorizontalAlignment.Left
textStyle.fontSize: FontSize.Small
text: qsTr("3. No HTML Link.")
textStyle.fontWeight: FontWeight.W100
}
Label {
multiline: true
text: qsTr("ALL CONTENT RIGHTS RESERVED BY CNBETA.COM")
Expand Down
8 changes: 4 additions & 4 deletions CnBeta/assets/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ NavigationPane {
id: ssd
property string err
title: qsTr("ERROR")
body: qsTr("Error fetching data, Server response is [%1]").arg(err)
body: qsTr("Error fetching data, Server response is [%1], please check your internet connection.").arg(err)
includeRememberMe: false
confirmButton.label: "Reload"
cancelButton.label: "Cancel"
customButton.label: "Exit App"
confirmButton.label: qsTr("Reload")
cancelButton.label: qsTr("Cancel")
customButton.label: qsTr("Exit App")
customButton.enabled: true
confirmButton.enabled: true
cancelButton.enabled: true
Expand Down
2 changes: 1 addition & 1 deletion CnBeta/bar-descriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
<buildId>1</buildId>
<buildId>2</buildId>
<packageLocale>zh-CN</packageLocale>

<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
Expand Down
32 changes: 31 additions & 1 deletion CnBeta/translations/CnBeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/about.qml" line="53"/>
<location filename="../assets/about.qml" line="55"/>
<source>3. No HTML Link.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/about.qml" line="60"/>
<source>ALL CONTENT RIGHTS RESERVED BY CNBETA.COM</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -56,6 +61,31 @@
<source>CnBeta for BlackBerry 10</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/main.qml" line="78"/>
<source>ERROR</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/main.qml" line="79"/>
<source>Error fetching data, Server response is [%1], please check your internet connection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/main.qml" line="81"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/main.qml" line="82"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../assets/main.qml" line="83"/>
<source>Exit App</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>settings</name>
Expand Down
38 changes: 36 additions & 2 deletions CnBeta/translations/CnBeta_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<message>
<location filename="../assets/about.qml" line="29"/>
<source>Merrick Zhang ( [email protected] )</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../assets/about.qml" line="35"/>
Expand All @@ -44,7 +44,12 @@
<translation>2. 页面内容是自动分析取得,可能会出错。</translation>
</message>
<message>
<location filename="../assets/about.qml" line="53"/>
<location filename="../assets/about.qml" line="55"/>
<source>3. No HTML Link.</source>
<translation>3. 内容中不包括超链接。</translation>
</message>
<message>
<location filename="../assets/about.qml" line="60"/>
<source>ALL CONTENT RIGHTS RESERVED BY CNBETA.COM</source>
<translation>文章内容版权由cnbeta.com所有</translation>
</message>
Expand All @@ -56,6 +61,35 @@
<source>CnBeta for BlackBerry 10</source>
<translation></translation>
</message>
<message>
<location filename="../assets/main.qml" line="78"/>
<source>ERROR</source>
<translation>网络发生错误</translation>
</message>
<message>
<source>Error fetching data, Server response is [%1]</source>
<translation type="obsolete">获取数据失败,服务器返回了 [%1],请检查网络连接</translation>
</message>
<message>
<location filename="../assets/main.qml" line="79"/>
<source>Error fetching data, Server response is [%1], please check your internet connection.</source>
<translation>获取数据失败,服务器返回了 [%1],请检查网络连接。</translation>
</message>
<message>
<location filename="../assets/main.qml" line="81"/>
<source>Reload</source>
<translation>重试</translation>
</message>
<message>
<location filename="../assets/main.qml" line="82"/>
<source>Cancel</source>
<translation>取消</translation>
</message>
<message>
<location filename="../assets/main.qml" line="83"/>
<source>Exit App</source>
<translation>退出</translation>
</message>
</context>
<context>
<name>settings</name>
Expand Down

0 comments on commit 1156278

Please sign in to comment.