diff --git a/PythonHome/wox.py b/PythonHome/wox.py
index e0050e2253..f31a5f072d 100644
--- a/PythonHome/wox.py
+++ b/PythonHome/wox.py
@@ -2,6 +2,7 @@
import json
import sys
import inspect
+import chardet
class Wox(object):
"""
@@ -9,7 +10,7 @@ class Wox(object):
"""
def __init__(self):
- rpc_request = json.loads(sys.argv[1],encoding="gb2312")
+ rpc_request = json.loads(sys.argv[1],encoding=chardet.detect(sys.argv[1])["encoding"])
self.proxy = rpc_request.get("proxy",{})
request_method_name = rpc_request.get("method")
request_parameters = rpc_request.get("parameters")
diff --git a/Wox.CrashReporter/ReportWindow.xaml b/Wox.CrashReporter/ReportWindow.xaml
index ae0e2fe0ea..abd22798ea 100644
--- a/Wox.CrashReporter/ReportWindow.xaml
+++ b/Wox.CrashReporter/ReportWindow.xaml
@@ -9,11 +9,12 @@
Topmost="True"
ResizeMode="NoResize"
Width="600"
- Height="450"
+ Height="455"
+ Title="{DynamicResource reportWindow_wox_got_an_error}"
d:DesignHeight="300" d:DesignWidth="600" x:ClassModifier="internal">
-
+
@@ -29,15 +30,15 @@
-
+
-
+
-
+
-
+
@@ -51,12 +52,12 @@
-
+
-
+
-
-
+
+
@@ -64,13 +65,13 @@
diff --git a/Wox.CrashReporter/ReportWindow.xaml.cs b/Wox.CrashReporter/ReportWindow.xaml.cs
index 63a65bfc75..2d09206ebb 100644
--- a/Wox.CrashReporter/ReportWindow.xaml.cs
+++ b/Wox.CrashReporter/ReportWindow.xaml.cs
@@ -13,6 +13,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using Wox.Core;
using Wox.Core.Exception;
+using Wox.Core.i18n;
using Wox.Core.UI;
using Wox.Core.UserSettings;
using Wox.Core.Version;
@@ -20,7 +21,7 @@ using Wox.Infrastructure.Http;
namespace Wox.CrashReporter
{
- internal partial class ReportWindow : IUIResource
+ internal partial class ReportWindow
{
private Exception exception;
@@ -41,17 +42,22 @@ namespace Wox.CrashReporter
tbType.Text = exception.GetType().ToString();
}
- public ResourceDictionary GetResourceDictionary()
- {
- return null;
- }
-
private void btnSend_Click(object sender, RoutedEventArgs e)
{
- tbSendReport.Content = "Sending";
+ string sendingMsg = InternationalizationManager.Internationalization.GetTranslation("reportWindow_sending");
+ tbSendReport.Content = sendingMsg;
btnSend.IsEnabled = false;
string error = string.Format("{{\"data\":{0}}}", ExceptionFormatter.FormatExcpetion(exception));
string response = HttpRequest.Post(APIServer.ErrorReportURL, error, HttpProxy.Instance);
+ if (response.ToLower() == "ok")
+ {
+ MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("reportWindow_report_succeed"));
+ }
+ else
+ {
+ MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("reportWindow_report_failed"));
+ }
+ Close();
}
private void btnCancel_Click(object sender, RoutedEventArgs e)
diff --git a/Wox/Languages/en.xaml b/Wox/Languages/en.xaml
index ee7c18c2ae..4f1561034b 100644
--- a/Wox/Languages/en.xaml
+++ b/Wox/Languages/en.xaml
@@ -81,4 +81,21 @@
Hotkey unavailable
+
+
+ Version
+ Time
+ Please tell us how application crashed so we can fix it
+ Send Report
+ Cancel
+ General
+ Exceptions
+ Exception Type
+ Source
+ Stack Trace
+ Sending
+ Report succeed
+ Report failed
+ Wox got an error
+
\ No newline at end of file
diff --git a/Wox/Languages/zh-cn.xaml b/Wox/Languages/zh-cn.xaml
index b13726eb4b..5e06761f1c 100644
--- a/Wox/Languages/zh-cn.xaml
+++ b/Wox/Languages/zh-cn.xaml
@@ -82,4 +82,19 @@
热键不可用
+
+ 版本
+ 时间
+ 请告诉我们如何重现此问题,以便我们进行修复
+ 发送报告
+ 取消
+ 基本信息
+ 异常信息
+ 异常类型
+ 异常源
+ 堆栈信息
+ 发送中
+ 发送成功
+ 发送失败
+ Wox出错啦
\ No newline at end of file
diff --git a/Wox/Languages/zh-tw.xaml b/Wox/Languages/zh-tw.xaml
index 5f10da7471..d3c8812995 100644
--- a/Wox/Languages/zh-tw.xaml
+++ b/Wox/Languages/zh-tw.xaml
@@ -82,4 +82,20 @@
熱鍵不可用
+
+ 版本
+ 時間
+ 請告訴我們如何重現此問題,以便我們進行修復
+ 發送報告
+ 取消
+ 基本信息
+ 異常信息
+ 異常類型
+ 異常源
+ 堆棧信息
+ 發送中
+ 發送成功
+ 發送失敗
+ Wox出錯啦
+
\ No newline at end of file