mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Adjust localisablel strings and keys
This commit is contained in:
parent
3afaafb1d9
commit
917a68eac3
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
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 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
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 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -122,12 +122,12 @@ namespace osu.Game.Localisation
|
||||
/// <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}";
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ namespace osu.Game
|
||||
Schedule(() => Notifications.Post(new SimpleNotification
|
||||
{
|
||||
Icon = FontAwesome.Solid.ExclamationTriangle,
|
||||
Text = EditorStrings.MustBeInEdit
|
||||
Text = EditorStrings.MustBeInEditorToHandleLinks
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
@ -1146,7 +1146,7 @@ namespace osu.Game.Screens.Edit
|
||||
Schedule(() => notifications?.Post(new SimpleNotification
|
||||
{
|
||||
Icon = FontAwesome.Solid.ExclamationTriangle,
|
||||
Text = EditorStrings.FailedToProcessTimestamp
|
||||
Text = EditorStrings.FailedToParseEditorLink
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user