diff --git a/osu.Game/Localisation/EditorStrings.cs b/osu.Game/Localisation/EditorStrings.cs
index d77f051183..40f98f70dd 100644
--- a/osu.Game/Localisation/EditorStrings.cs
+++ b/osu.Game/Localisation/EditorStrings.cs
@@ -234,6 +234,41 @@ namespace osu.Game.Localisation
///
public static LocalisableString RulesetNotSupportSaving => new TranslatableString(getKey(@"ruleset_not_support_saving"), @"Saving is not supported for this ruleset yet, sorry!");
+ ///
+ /// "Export failed!"
+ ///
+ public static LocalisableString ExportFailed => new TranslatableString(getKey(@"export_failed"), @"Export failed!");
+
+ ///
+ /// "Import failed!"
+ ///
+ public static LocalisableString ImportFailed => new TranslatableString(getKey(@"import_failed"), @"Import failed!");
+
+ ///
+ /// "Open folder"
+ ///
+ public static LocalisableString OpenFolder => new TranslatableString(getKey(@"open_folder"), @"Open folder");
+
+ ///
+ /// "Cleaning up..."
+ ///
+ public static LocalisableString ExternalEditCleaningUp => new TranslatableString(getKey(@"external_edit_cleaning_up"), @"Cleaning up...");
+
+ ///
+ /// "Exporting for edit..."
+ ///
+ public static LocalisableString ExternalEditExporting => new TranslatableString(getKey(@"external_edit_exporting"), @"Exporting for edit...");
+
+ ///
+ /// "Beatmap is mounted externally"
+ ///
+ public static LocalisableString BeatmapMountedExternally => new TranslatableString(getKey(@"beatmap_mounted_externally"), @"Beatmap is mounted externally");
+
+ ///
+ /// "Any changes made to the exported folder will be imported to the game, including file additions, modifications and deletions."
+ ///
+ public static LocalisableString ExternalEditMountedExplanation => new TranslatableString(getKey(@"external_edit_mounted_explanation"), @"Any changes made to the exported folder will be imported to the game, including file additions, modifications and deletions.");
+
private static string getKey(string key) => $@"{prefix}:{key}";
}
}
diff --git a/osu.Game/Localisation/SkinEditorStrings.cs b/osu.Game/Localisation/SkinEditorStrings.cs
index d96ea7dd9f..a8b3a5a3bc 100644
--- a/osu.Game/Localisation/SkinEditorStrings.cs
+++ b/osu.Game/Localisation/SkinEditorStrings.cs
@@ -94,6 +94,21 @@ namespace osu.Game.Localisation
///
public static LocalisableString CurrentWorkingLayer => new TranslatableString(getKey(@"current_working_layer"), @"Current working layer");
+ ///
+ /// "Please navigate to a skinnable screen using the scene library"
+ ///
+ public static LocalisableString NavigateToSkinnableScreen => new TranslatableString(getKey(@"navigate_to_skinnable_screen"), @"Please navigate to a skinnable screen using the scene library");
+
+ ///
+ /// "Return to game"
+ ///
+ public static LocalisableString ReturnToGame => new TranslatableString(getKey(@"return_to_game"), @"Return to game");
+
+ ///
+ /// "Skin is mounted externally"
+ ///
+ public static LocalisableString SkinMountedExternally => new TranslatableString(getKey(@"skin_mounted_externally"), @"Skin is mounted externally");
+
private static string getKey(string key) => $@"{prefix}:{key}";
}
}
diff --git a/osu.Game/Overlays/SkinEditor/ExternalEditOverlay.cs b/osu.Game/Overlays/SkinEditor/ExternalEditOverlay.cs
index 4d91b4ebfd..1b77340178 100644
--- a/osu.Game/Overlays/SkinEditor/ExternalEditOverlay.cs
+++ b/osu.Game/Overlays/SkinEditor/ExternalEditOverlay.cs
@@ -13,6 +13,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
+using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Framework.Testing;
@@ -107,7 +108,7 @@ namespace osu.Game.Overlays.SkinEditor
throw new InvalidOperationException("Cannot start multiple concurrent external edits!");
Show();
- showSpinner("Mounting external skin...");
+ showSpinner(EditorStrings.ExternalEditExporting);
setGlobalSkinDisabled(true);
await Task.Delay(500).ConfigureAwait(true);
@@ -120,7 +121,7 @@ namespace osu.Game.Overlays.SkinEditor
{
Logger.Log($"Failed to initialize external edit operation: {ex}", LoggingTarget.Database, LogLevel.Error);
setGlobalSkinDisabled(false);
- Schedule(() => showSpinner("Export failed!"));
+ Schedule(() => showSpinner(EditorStrings.ExportFailed));
Scheduler.AddDelayed(Hide, 1000);
return Task.FromException(ex);
}
@@ -131,7 +132,7 @@ namespace osu.Game.Overlays.SkinEditor
{
new OsuSpriteText
{
- Text = "Skin is mounted externally",
+ Text = SkinEditorStrings.SkinMountedExternally,
Font = OsuFont.Default.With(size: 30),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@@ -143,11 +144,11 @@ namespace osu.Game.Overlays.SkinEditor
Origin = Anchor.TopCentre,
Width = 350,
AutoSizeAxes = Axes.Y,
- Text = "Any changes made to the exported folder will be imported to the game, including file additions, modifications and deletions.",
+ Text = EditorStrings.ExternalEditMountedExplanation,
},
new PurpleRoundedButton
{
- Text = "Open folder",
+ Text = EditorStrings.OpenFolder,
Width = 350,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@@ -198,7 +199,7 @@ namespace osu.Game.Overlays.SkinEditor
Debug.Assert(taskCompletionSource != null);
- showSpinner("Cleaning up...");
+ showSpinner(EditorStrings.ExternalEditCleaningUp);
await Task.Delay(500).ConfigureAwait(true);
try
@@ -208,7 +209,7 @@ namespace osu.Game.Overlays.SkinEditor
catch (Exception ex)
{
Logger.Log($"Failed to finish external edit operation: {ex}", LoggingTarget.Database, LogLevel.Error);
- showSpinner("Import failed!");
+ showSpinner(EditorStrings.ImportFailed);
Scheduler.AddDelayed(Hide, 1000);
setGlobalSkinDisabled(false);
taskCompletionSource.SetException(ex);
@@ -275,7 +276,7 @@ namespace osu.Game.Overlays.SkinEditor
return base.OnPressed(e);
}
- private void showSpinner(string text)
+ private void showSpinner(LocalisableString text)
{
foreach (var b in flow.ChildrenOfType())
b.Enabled.Value = false;
diff --git a/osu.Game/Overlays/SkinEditor/NonSkinnableScreenPlaceholder.cs b/osu.Game/Overlays/SkinEditor/NonSkinnableScreenPlaceholder.cs
index daaa92035e..ce19b5dd17 100644
--- a/osu.Game/Overlays/SkinEditor/NonSkinnableScreenPlaceholder.cs
+++ b/osu.Game/Overlays/SkinEditor/NonSkinnableScreenPlaceholder.cs
@@ -9,6 +9,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterfaceV2;
+using osu.Game.Localisation;
using osuTK;
namespace osu.Game.Overlays.SkinEditor
@@ -56,7 +57,7 @@ namespace osu.Game.Overlays.SkinEditor
TextAnchor = Anchor.Centre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
- Text = "Please navigate to a skinnable screen using the scene library",
+ Text = SkinEditorStrings.NavigateToSkinnableScreen,
},
new RoundedButton
{
@@ -65,7 +66,7 @@ namespace osu.Game.Overlays.SkinEditor
Width = 200,
Margin = new MarginPadding { Top = 20 },
Action = () => skinEditorOverlay?.Hide(),
- Text = "Return to game"
+ Text = SkinEditorStrings.ReturnToGame,
}
}
},
diff --git a/osu.Game/Screens/Edit/ExternalEditScreen.cs b/osu.Game/Screens/Edit/ExternalEditScreen.cs
index 21eff36558..29b611cc76 100644
--- a/osu.Game/Screens/Edit/ExternalEditScreen.cs
+++ b/osu.Game/Screens/Edit/ExternalEditScreen.cs
@@ -10,6 +10,7 @@ using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
+using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Framework.Screens;
@@ -118,7 +119,7 @@ namespace osu.Game.Screens.Edit
private async Task begin()
{
- showSpinner("Exporting for edit...");
+ showSpinner(EditorStrings.ExternalEditExporting);
await Task.Delay(500).ConfigureAwait(true);
@@ -130,7 +131,7 @@ namespace osu.Game.Screens.Edit
{
Logger.Log($@"Failed to initiate external edit operation: {ex}", LoggingTarget.Database);
fileMountOperation = null;
- showSpinner("Export failed!");
+ showSpinner(EditorStrings.ExportFailed);
await Task.Delay(1000).ConfigureAwait(true);
this.Exit();
}
@@ -139,7 +140,7 @@ namespace osu.Game.Screens.Edit
{
new OsuSpriteText
{
- Text = "Beatmap is mounted externally",
+ Text = EditorStrings.BeatmapMountedExternally,
Font = OsuFont.Default.With(size: 30),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@@ -151,11 +152,11 @@ namespace osu.Game.Screens.Edit
Origin = Anchor.TopCentre,
Width = 350,
AutoSizeAxes = Axes.Y,
- Text = "Any changes made to the exported folder will be imported to the game, including file additions, modifications and deletions.",
+ Text = EditorStrings.ExternalEditMountedExplanation,
},
new PurpleRoundedButton
{
- Text = "Open folder",
+ Text = EditorStrings.OpenFolder,
Width = 350,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@@ -200,7 +201,7 @@ namespace osu.Game.Screens.Edit
BackButtonVisibility.Value = false;
string originalDifficulty = editor.Beatmap.Value.Beatmap.BeatmapInfo.DifficultyName;
- showSpinner("Cleaning up...");
+ showSpinner(EditorStrings.ExternalEditCleaningUp);
Live? beatmap = null;
@@ -211,7 +212,7 @@ namespace osu.Game.Screens.Edit
catch (Exception ex)
{
Logger.Log($@"Failed to finish external edit operation: {ex}", LoggingTarget.Database);
- showSpinner("Import failed!");
+ showSpinner(EditorStrings.ImportFailed);
await Task.Delay(1000).ConfigureAwait(true);
}
@@ -246,7 +247,7 @@ namespace osu.Game.Screens.Edit
}
}
- private void showSpinner(string text)
+ private void showSpinner(LocalisableString text)
{
foreach (var b in flow.ChildrenOfType())
b.Enabled.Value = false;