localise Intro.xaml runtime strings

This commit is contained in:
Jack Baron 2020-02-02 06:27:37 +00:00
parent 7908f64b24
commit 8dc0ce4a9b
No known key found for this signature in database
GPG key ID: CD10BCEEC646C064
3 changed files with 17 additions and 4 deletions

View file

@ -68,6 +68,10 @@
</Span>
<sys:String x:Key="Intro:AgreeButton">DEBUG</sys:String>
<sys:String x:Key="Intro:DisagreeButton">DEBUG</sys:String>
<sys:String x:Key="Intro:ClosingApp">DEBUG</sys:String>
<sys:String x:Key="Intro:VersionDownloadFailed">DEBUG</sys:String>
<sys:String x:Key="Intro:ModsTabDisabled">DEBUG</sys:String>
<sys:String x:Key="Intro:ModsTabEnabled">DEBUG</sys:String>
<!-- Mods Page -->
<sys:String x:Key="Mods:Title">DEBUG</sys:String>

View file

@ -83,6 +83,10 @@
</Span>
<sys:String x:Key="Intro:AgreeButton">I Agree</sys:String>
<sys:String x:Key="Intro:DisagreeButton">Disagree</sys:String>
<sys:String x:Key="Intro:ClosingApp">Closing Application: You did not agree to terms and conditions.</sys:String>
<sys:String x:Key="Intro:VersionDownloadFailed">Could not download versions list</sys:String>
<sys:String x:Key="Intro:ModsTabDisabled">Mods tab disabled. Please restart to try again.</sys:String>
<sys:String x:Key="Intro:ModsTabEnabled">You can now use the Mods tab!</sys:String>
<!-- Mods Page -->
<sys:String x:Key="Mods:Title">Mods</sys:String>

View file

@ -39,7 +39,7 @@ namespace ModAssistant.Pages
MainWindow.Instance.ModsButton.IsEnabled = false;
Properties.Settings.Default.Agreed = false;
Properties.Settings.Default.Save();
MessageBox.Show("Closing Application: You did not agree to terms and conditions.");
MessageBox.Show((string)FindResource("Intro:ClosingApp"));
System.Windows.Application.Current.Shutdown();
}
@ -47,13 +47,18 @@ namespace ModAssistant.Pages
{
if (String.IsNullOrEmpty(MainWindow.GameVersion))
{
MessageBox.Show("Could not download versions list.\nMods tab disabled. Please restart to try again.");
string line1 = (string)FindResource("Intro:VersionDownloadFailed");
string line2 = (string)FindResource("Intro:ModsTabDisabled");
MessageBox.Show($"{line1}.\n{line2}");
}
else
{
MainWindow.Instance.ModsButton.IsEnabled = true;
Utils.SendNotify("You can now use the Mods tab!");
MainWindow.Instance.MainText = "You can now use the Mods tab!";
string text = (string)FindResource("Intro:ModsTabEnabled");
Utils.SendNotify(text);
MainWindow.Instance.MainText = text;
}
Properties.Settings.Default.Agreed = true;
Properties.Settings.Default.Save();