Skip to content

Commit

Permalink
Translate update dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawodowiec1532 authored and azeier committed Jan 3, 2018
1 parent 021365e commit 41e7726
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Hearthstone Deck Tracker/Utility/Updating/Updater.Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static async void ShowNewUpdateMessage(bool beta)
return;
_showingUpdateMessage = true;

var settings = new MessageDialogs.Settings {AffirmativeButtonText = "Download", NegativeButtonText = "Not now"};
var settings = new MessageDialogs.Settings {AffirmativeButtonText = LocUtil.Get("Button_Download"), NegativeButtonText = LocUtil.Get("Button_Notnow")};
if(_release == null)
{
_showingUpdateMessage = false;
Expand All @@ -57,12 +57,8 @@ private static async void ShowNewUpdateMessage(bool beta)
Core.MainWindow.ActivateWindow();
while(Core.MainWindow.Visibility != Visibility.Visible || Core.MainWindow.WindowState == WindowState.Minimized)
await Task.Delay(100);
var betaString = beta ? " BETA" : "";
var result =
await
Core.MainWindow.ShowMessageAsync("New" + betaString + " Update available!",
"Press \"Download\" to automatically download.",
MessageDialogStyle.AffirmativeAndNegative, settings);
var updateString = beta ? LocUtil.Get("MainWindow_StatusBarUpdate_NewBETAUpdateAvailable") : LocUtil.Get("MainWindow_StatusBarUpdate_NewUpdateAvailable");
var result = await Core.MainWindow.ShowMessageAsync(updateString, LocUtil.Get("MainWindow_ShowMessage_UpdateDialog"), MessageDialogStyle.AffirmativeAndNegative, settings);

if(result == MessageDialogResult.Affirmative)
StartUpdate();
Expand Down

0 comments on commit 41e7726

Please sign in to comment.