Adjust localisablel strings and keys

This commit is contained in:
Dean Herbert 2023-11-21 15:08:15 +09:00
parent 3afaafb1d9
commit 917a68eac3
No known key found for this signature in database
4 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ public void TestErrorNotifications()
addStepClickLink("00:00:000", waitForSeek: false);
AddAssert("received 'must be in edit'",
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.MustBeInEdit),
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.MustBeInEditorToHandleLinks),
() => Is.EqualTo(1));
AddStep("enter song select", () => Game.ChildrenOfType<ButtonSystem>().Single().OnSolo.Invoke());
@ -40,7 +40,7 @@ public void TestErrorNotifications()
addStepClickLink("00:00:000 (1)", waitForSeek: false);
AddAssert("received 'must be in edit'",
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.MustBeInEdit),
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.MustBeInEditorToHandleLinks),
() => Is.EqualTo(2));
setUpEditor(rulesetInfo);
@ -48,12 +48,12 @@ public void TestErrorNotifications()
addStepClickLink("00:000", "invalid link", waitForSeek: false);
AddAssert("received 'failed to process'",
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.FailedToProcessTimestamp),
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.FailedToParseEditorLink),
() => Is.EqualTo(1));
addStepClickLink("50000:00:000", "too long link", waitForSeek: false);
AddAssert("received 'failed to process'",
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.FailedToProcessTimestamp),
() => Game.Notifications.AllNotifications.Count(x => x.Text == EditorStrings.FailedToParseEditorLink),
() => Is.EqualTo(2));
}

View File

@ -122,12 +122,12 @@ public static class EditorStrings
/// <summary>
/// "Must be in edit mode to handle editor links"
/// </summary>
public static LocalisableString MustBeInEdit => new TranslatableString(getKey(@"must_be_in_edit"), @"Must be in edit mode to handle editor links");
public static LocalisableString MustBeInEditorToHandleLinks => new TranslatableString(getKey(@"must_be_in_editor_to_handle_links"), @"Must be in edit mode to handle editor links");
/// <summary>
/// "Failed to process timestamp"
/// "Failed to parse editor link"
/// </summary>
public static LocalisableString FailedToProcessTimestamp => new TranslatableString(getKey(@"failed_to_process_timestamp"), @"Failed to process timestamp");
public static LocalisableString FailedToParseEditorLink => new TranslatableString(getKey(@"failed_to_parse_edtior_link"), @"Failed to parse editor link");
private static string getKey(string key) => $@"{prefix}:{key}";
}

View File

@ -565,7 +565,7 @@ public void HandleTimestamp(string timestamp)
Schedule(() => Notifications.Post(new SimpleNotification
{
Icon = FontAwesome.Solid.ExclamationTriangle,
Text = EditorStrings.MustBeInEdit
Text = EditorStrings.MustBeInEditorToHandleLinks
}));
return;
}

View File

@ -1146,7 +1146,7 @@ public void HandleTimestamp(string timestamp)
Schedule(() => notifications?.Post(new SimpleNotification
{
Icon = FontAwesome.Solid.ExclamationTriangle,
Text = EditorStrings.FailedToProcessTimestamp
Text = EditorStrings.FailedToParseEditorLink
}));
return;
}