From 757c4d84c7f5d1d05e02119f668b0a2d8173fd76 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 27 Sep 2022 14:01:50 +0200 Subject: [PATCH] Change the incompatible replay dialogue text from "Cancel" to "OK" --- OpenRA.Mods.Common/Widgets/Logic/ReplayUtils.cs | 12 +++++------- mods/common/languages/en.ftl | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/ReplayUtils.cs b/OpenRA.Mods.Common/Widgets/Logic/ReplayUtils.cs index 73d3f6bdc6..81ba8d4dea 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ReplayUtils.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ReplayUtils.cs @@ -23,6 +23,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic [TranslationReference] static readonly string IncompatibleReplayPrompt = "incompatible-replay-prompt"; + [TranslationReference] + static readonly string IncompatibleReplayAccept = "incompatible-replay-accept"; + [TranslationReference] static readonly string UnknownVersion = "incompatible-replay-unknown-version"; @@ -46,12 +49,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic onCancel = DoNothing; if (replayMeta == null) - { - ConfirmationDialogs.ButtonPrompt(modData, IncompatibleReplayTitle, - IncompatibleReplayPrompt, onCancel: onCancel); - - return false; - } + return IncompatibleReplayDialog(IncompatibleReplayPrompt, null, modData, onCancel); var version = replayMeta.GameInfo.Version; if (version == null) @@ -75,7 +73,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic static bool IncompatibleReplayDialog(string text, Dictionary textArguments, ModData modData, Action onCancel) { - ConfirmationDialogs.ButtonPrompt(modData, IncompatibleReplayTitle, text, textArguments: textArguments, onCancel: onCancel); + ConfirmationDialogs.ButtonPrompt(modData, IncompatibleReplayTitle, text, textArguments: textArguments, onCancel: onCancel, cancelText: IncompatibleReplayAccept); return false; } } diff --git a/mods/common/languages/en.ftl b/mods/common/languages/en.ftl index 03a86f6698..1321fd28ac 100644 --- a/mods/common/languages/en.ftl +++ b/mods/common/languages/en.ftl @@ -501,6 +501,7 @@ replay-deletion-failed = Failed to delete replay file '{ $file }'. See the debug ## ReplayUtils incompatible-replay-title = Incompatible Replay incompatible-replay-prompt = Replay metadata could not be read. +incompatible-replay-accept = OK -incompatible-replay-recorded = It was recorded with incompatible-replay-unknown-version = { -incompatible-replay-recorded } an unknown version. incompatible-replay-unknown-mod = { -incompatible-replay-recorded } an unknown mod.