mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
fix review points and fine tuning
This commit is contained in:
parent
3a62d29269
commit
81d582c051
@ -89,6 +89,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Collections => new TranslatableString(getKey(@"collections"), @"Collections");
|
public static LocalisableString Collections => new TranslatableString(getKey(@"collections"), @"Collections");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Mod presets"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ModPresets => new TranslatableString(getKey(@"mod_presets"), @"Mod presets");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Name"
|
/// "Name"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -44,21 +44,6 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString ClearAllCaches => new TranslatableString(getKey(@"clear_all_caches"), @"Clear all caches");
|
public static LocalisableString ClearAllCaches => new TranslatableString(getKey(@"clear_all_caches"), @"Clear all caches");
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Compact realm"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString CompactRealm => new TranslatableString(getKey(@"compact_realm"), @"Compact realm");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Block realm"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString BlockRealm => new TranslatableString(getKey(@"block_realm"), @"Block realm");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Unblock realm"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString UnblockRealm => new TranslatableString(getKey(@"unblock_realm"), @"Unblock realm");
|
|
||||||
|
|
||||||
private static string getKey(string key) => $"{prefix}:{key}";
|
private static string getKey(string key) => $"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,31 +14,6 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString MaintenanceSectionHeader => new TranslatableString(getKey(@"maintenance_section_header"), @"Maintenance");
|
public static LocalisableString MaintenanceSectionHeader => new TranslatableString(getKey(@"maintenance_section_header"), @"Maintenance");
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Beatmaps"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Beatmaps => new TranslatableString(getKey(@"beatmaps"), @"Beatmaps");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Skins"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Skins => new TranslatableString(getKey(@"skins"), @"Skins");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Collections"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Collections => new TranslatableString(getKey(@"collections"), @"Collections");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Scores"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Scores => new TranslatableString(getKey(@"scores"), @"Scores");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Mod presets"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString ModPresets => new TranslatableString(getKey(@"mod_presets"), @"Mod presets");
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Select directory"
|
/// "Select directory"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Dialog
|
namespace osu.Game.Overlays.Dialog
|
||||||
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
/// <param name="message">The description of the action to be displayed to the user.</param>
|
/// <param name="message">The description of the action to be displayed to the user.</param>
|
||||||
/// <param name="onConfirm">An action to perform on confirmation.</param>
|
/// <param name="onConfirm">An action to perform on confirmation.</param>
|
||||||
/// <param name="onCancel">An optional action to perform on cancel.</param>
|
/// <param name="onCancel">An optional action to perform on cancel.</param>
|
||||||
public ConfirmDialog(string message, Action onConfirm, Action onCancel = null)
|
public ConfirmDialog(LocalisableString message, Action onConfirm, Action onCancel = null)
|
||||||
{
|
{
|
||||||
HeaderText = message;
|
HeaderText = message;
|
||||||
BodyText = "Last chance to turn back";
|
BodyText = "Last chance to turn back";
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
|||||||
},
|
},
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = DebugSettingsStrings.CompactRealm,
|
Text = "Compact realm",
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
// Blocking operations implicitly causes a Compact().
|
// Blocking operations implicitly causes a Compact().
|
||||||
@ -46,11 +46,11 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
|||||||
},
|
},
|
||||||
blockAction = new SettingsButton
|
blockAction = new SettingsButton
|
||||||
{
|
{
|
||||||
Text = DebugSettingsStrings.BlockRealm,
|
Text = "Block realm",
|
||||||
},
|
},
|
||||||
unblockAction = new SettingsButton
|
unblockAction = new SettingsButton
|
||||||
{
|
{
|
||||||
Text = DebugSettingsStrings.UnblockRealm,
|
Text = "Unblock realm",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours, LocalisationManager localisation)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -110,9 +110,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows || RuntimeInfo.OS == RuntimeInfo.Platform.Linux)
|
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows || RuntimeInfo.OS == RuntimeInfo.Platform.Linux)
|
||||||
{
|
{
|
||||||
t.NewLine();
|
t.NewLine();
|
||||||
var formattedSource = MessageFormatter.FormatText(TabletSettingsStrings.NoTabletDetectedDescription(RuntimeInfo.OS == RuntimeInfo.Platform.Windows
|
var formattedSource = MessageFormatter.FormatText(localisation.GetLocalisedBindableString(TabletSettingsStrings.NoTabletDetectedDescription(RuntimeInfo.OS == RuntimeInfo.Platform.Windows
|
||||||
? @"https://opentabletdriver.net/Wiki/FAQ/Windows"
|
? @"https://opentabletdriver.net/Wiki/FAQ/Windows"
|
||||||
: @"https://opentabletdriver.net/Wiki/FAQ/Linux").ToString());
|
: @"https://opentabletdriver.net/Wiki/FAQ/Linux")).Value);
|
||||||
t.AddLinks(formattedSource.Text, formattedSource.Links);
|
t.AddLinks(formattedSource.Text, formattedSource.Links);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class BeatmapSettings : SettingsSubsection
|
public class BeatmapSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => MaintenanceSettingsStrings.Beatmaps;
|
protected override LocalisableString Header => CommonStrings.Beatmaps;
|
||||||
|
|
||||||
private SettingsButton importBeatmapsButton = null!;
|
private SettingsButton importBeatmapsButton = null!;
|
||||||
private SettingsButton deleteBeatmapsButton = null!;
|
private SettingsButton deleteBeatmapsButton = null!;
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class CollectionsSettings : SettingsSubsection
|
public class CollectionsSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => MaintenanceSettingsStrings.Collections;
|
protected override LocalisableString Header => CommonStrings.Collections;
|
||||||
|
|
||||||
private SettingsButton importCollectionsButton = null!;
|
private SettingsButton importCollectionsButton = null!;
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
// Quick test for whether there's already an osu! install at the target path.
|
// Quick test for whether there's already an osu! install at the target path.
|
||||||
if (fileInfos.Any(f => f.Name == OsuGameBase.CLIENT_DATABASE_FILENAME))
|
if (fileInfos.Any(f => f.Name == OsuGameBase.CLIENT_DATABASE_FILENAME))
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.TargetDirectoryAlreadyInstalledOsu.ToString(), () =>
|
dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.TargetDirectoryAlreadyInstalledOsu, () =>
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.RestartAndReOpenRequiredForCompletion.ToString(), () =>
|
dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.RestartAndReOpenRequiredForCompletion, () =>
|
||||||
{
|
{
|
||||||
(storage as OsuStorage)?.ChangeDataPath(target.FullName);
|
(storage as OsuStorage)?.ChangeDataPath(target.FullName);
|
||||||
game.Exit();
|
game.Exit();
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class ModPresetSettings : SettingsSubsection
|
public class ModPresetSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => MaintenanceSettingsStrings.ModPresets;
|
protected override LocalisableString Header => CommonStrings.ModPresets;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private RealmAccess realm { get; set; } = null!;
|
private RealmAccess realm { get; set; } = null!;
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class ScoreSettings : SettingsSubsection
|
public class ScoreSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => MaintenanceSettingsStrings.Scores;
|
protected override LocalisableString Header => CommonStrings.Scores;
|
||||||
|
|
||||||
private SettingsButton importScoresButton = null!;
|
private SettingsButton importScoresButton = null!;
|
||||||
private SettingsButton deleteScoresButton = null!;
|
private SettingsButton deleteScoresButton = null!;
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class SkinSettings : SettingsSubsection
|
public class SkinSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => MaintenanceSettingsStrings.Skins;
|
protected override LocalisableString Header => CommonStrings.Skins;
|
||||||
|
|
||||||
private SettingsButton importSkinsButton = null!;
|
private SettingsButton importSkinsButton = null!;
|
||||||
private SettingsButton deleteSkinsButton = null!;
|
private SettingsButton deleteSkinsButton = null!;
|
||||||
|
@ -28,12 +28,12 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
new PopupDialogOkButton
|
new PopupDialogOkButton
|
||||||
{
|
{
|
||||||
Text = "Sure! I know where it is located!",
|
Text = MaintenanceSettingsStrings.StableDirectoryLocationOk,
|
||||||
Action = () => Schedule(() => performer.PerformFromScreen(screen => screen.Push(new StableDirectorySelectScreen(taskCompletionSource))))
|
Action = () => Schedule(() => performer.PerformFromScreen(screen => screen.Push(new StableDirectorySelectScreen(taskCompletionSource))))
|
||||||
},
|
},
|
||||||
new PopupDialogCancelButton
|
new PopupDialogCancelButton
|
||||||
{
|
{
|
||||||
Text = "Actually I don't have osu!stable installed.",
|
Text = MaintenanceSettingsStrings.StableDirectoryLocationCancel,
|
||||||
Action = () => taskCompletionSource.TrySetCanceled()
|
Action = () => taskCompletionSource.TrySetCanceled()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user