Make strings in the report assistant localizable

This commit is contained in:
lukeIam committed 2018-01-28 14:42:09 +01:00
1 parent 80ea1bce7e
commit 09ed5a3618
2 files changed
+33 -17

No files matched your search

+15
View File
@@ -242,4 +242,19 @@
<string name="TR_SCREENPVOLUMECONTROL_VOLUME">Volume</string>
<string name="TR_SCREENPSERVERQR_ADDRESS">Server address</string>
<string name="TR_SCREENPSERVERQR_NOTRUNNING">Server is not running. Please check config.xml!</string>
<string name="TR_REPORTER_TITLE_TEXT">We are sorry</string>
<string name="TR_REPORTER_MESSAGE_CRASH_TEXT">that Vocaluxe run into an error and crashed.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.</string>
<string name="TR_REPORTER_MESSAGE_NO_CRASH_TEXT">that you experienced an error.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.</string>
<string name="TR_REPORTER_NO_UPLOAD_TEXT">Don\'t upload anything (you can still copy the error message above)</string>
<string name="TR_REPORTER_GIST_AND_ISSUE_TEXT">Upload and open an issue (publicly visible + requires a github account)</string>
<string name="TR_REPORTER_GIST_ONLY_TEXT">Upload and get a link to your report (publicly visible)</string>
<string name="TR_REPORTER_SUBMIT_STEP0_TEXT">Submit</string>
<string name="TR_REPORTER_SUBMIT_STEP1_TEXT">Uploading</string>
<string name="TR_REPORTER_SUBMIT_STEP2_EXIT_TEXT">Exit</string>
<string name="TR_REPORTER_SUBMIT_STEP2_CONTINUE_TEXT">Continue</string>
<string name="TR_REPORTER_SUBMITED_MESSAGE_TEXT">The link to your report:</string>
<string name="TR_REPORTER_LOGUPLOAD_ERROR_TEXT">Error uploading the log.</string>
<string name="TR_REPORTER_LAST_ERROR_TITLE_TEXT">Last error</string>
<string name="TR_REPORTER_LAST_ERROR_NA">Not available</string>
<string name="TR_REPORTER_ISSUE_TEMPLATE">Describe your issue here.\n\n### Steps to reproduce\nTell us how to reproduce this issue.\n\n### Vocaluxe version and logfile\n{0}\n{1}</string>
</resources>
+18 -17
View File
@@ -23,29 +23,30 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using Vocaluxe.Base;
using VocaluxeLib.Log;
namespace Vocaluxe.Reporting
{
public partial class CReporter : Form
{
private string _TitleText = "We are sorry";
private string _MessageCrashText = "that Vocaluxe run into an error and crashed.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.";
private string _MessageNoCrashText = "that you experienced an error.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.";
private string _NoUploadText = "Don\'t upload anything (you can still copy the error message above)";
private string _GistAndIssueText = "Upload and open an issue (publicly visible + requires a github account)";
private string _GistOnlyText = "Upload and get a link to your report (publicly visible)";
private string _SubmitStep0Text = "Submit";
private string _SubmitStep1Text = "Uploading";
private string _SubmitStep2ExitText = "Exit";
private string _SubmitStep2ContinueText = "Continue";
private string _SubmitedMessageText = "The link to your report:";
private string _LogUploadErrorText = "Error uploading the log.";
private string _LastErrorTitleText = "Last error";
private string _LastErrorNA = "Not available";
private readonly string _TitleText = CLanguage.Translate("TR_REPORTER_TITLE_TEXT");
private readonly string _MessageCrashText = CLanguage.Translate("TR_REPORTER_MESSAGE_CRASH_TEXT");
private readonly string _MessageNoCrashText = CLanguage.Translate("TR_REPORTER_MESSAGE_NO_CRASH_TEXT");
private readonly string _NoUploadText = CLanguage.Translate("TR_REPORTER_NO_UPLOAD_TEXT");
private readonly string _GistAndIssueText = CLanguage.Translate("TR_REPORTER_GIST_AND_ISSUE_TEXT");
private readonly string _GistOnlyText = CLanguage.Translate("TR_REPORTER_GIST_ONLY_TEXT");
private readonly string _SubmitStep0Text = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP0_TEXT");
private readonly string _SubmitStep1Text = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP1_TEXT");
private readonly string _SubmitStep2ExitText = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP2_EXIT_TEXT");
private readonly string _SubmitStep2ContinueText = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP2_CONTINUE_TEXT");
private readonly string _SubmitedMessageText = CLanguage.Translate("TR_REPORTER_SUBMITED_MESSAGE_TEXT");
private readonly string _LogUploadErrorText = CLanguage.Translate("TR_REPORTER_LOGUPLOAD_ERROR_TEXT");
private readonly string _LastErrorTitleText = CLanguage.Translate("TR_REPORTER_LAST_ERROR_TITLE_TEXT");
private readonly string _LastErrorNa = CLanguage.Translate("TR_REPORTER_LAST_ERROR_NA");
private readonly string _IssueTemplate = CLanguage.Translate("TR_REPORTER_ISSUE_TEMPLATE");
private string _IssueTemplate = "Describe your issue here.\n\n### Steps to reproduce\nTell us how to reproduce this issue.\n\n### Vocaluxe version and logfile\n{0}\n{1}";
//CLanguage.Translate("TR_DEBUG_AUDIO_STREAMS")
private int _Step = 0;
private readonly bool _Crash;
@@ -112,7 +113,7 @@ namespace Vocaluxe.Reporting
this.SubmitButton.Text = _SubmitStep0Text;
this.SubmitedTitleLabel.Text = _SubmitedMessageText;
this.LastErrorTitleLabel.Text = _LastErrorTitleText;
this.LastErrorBox.Text = string.IsNullOrWhiteSpace(lastError) ? _LastErrorNA : lastError;
this.LastErrorBox.Text = string.IsNullOrWhiteSpace(lastError) ? _LastErrorNa : lastError;
this.LogBox.Text = log.Replace("\n","\r\n");
this.LogBox.SelectionStart = 0;
}