1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

fix review points and fine tuning

This commit is contained in:
アズタケ 2022-09-16 21:08:25 +09:00
parent 3a62d29269
commit 81d582c051
13 changed files with 22 additions and 56 deletions

View File

@ -89,6 +89,11 @@ namespace osu.Game.Localisation
/// </summary>
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>
/// "Name"
/// </summary>

View File

@ -44,21 +44,6 @@ namespace osu.Game.Localisation
/// </summary>
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}";
}
}

View File

@ -14,31 +14,6 @@ namespace osu.Game.Localisation
/// </summary>
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>
/// "Select directory"
/// </summary>

View File

@ -5,6 +5,7 @@
using System;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
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="onConfirm">An action to perform on confirmation.</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;
BodyText = "Last chance to turn back";

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
},
new SettingsButton
{
Text = DebugSettingsStrings.CompactRealm,
Text = "Compact realm",
Action = () =>
{
// Blocking operations implicitly causes a Compact().
@ -46,11 +46,11 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
},
blockAction = new SettingsButton
{
Text = DebugSettingsStrings.BlockRealm,
Text = "Block realm",
},
unblockAction = new SettingsButton
{
Text = DebugSettingsStrings.UnblockRealm,
Text = "Unblock realm",
},
};

View File

@ -72,7 +72,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OsuColour colours, LocalisationManager localisation)
{
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)
{
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/Linux").ToString());
: @"https://opentabletdriver.net/Wiki/FAQ/Linux")).Value);
t.AddLinks(formattedSource.Text, formattedSource.Links);
}
}),

View File

@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public class BeatmapSettings : SettingsSubsection
{
protected override LocalisableString Header => MaintenanceSettingsStrings.Beatmaps;
protected override LocalisableString Header => CommonStrings.Beatmaps;
private SettingsButton importBeatmapsButton = null!;
private SettingsButton deleteBeatmapsButton = null!;

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public class CollectionsSettings : SettingsSubsection
{
protected override LocalisableString Header => MaintenanceSettingsStrings.Collections;
protected override LocalisableString Header => CommonStrings.Collections;
private SettingsButton importCollectionsButton = null!;

View File

@ -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.
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);
game.Exit();

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public class ModPresetSettings : SettingsSubsection
{
protected override LocalisableString Header => MaintenanceSettingsStrings.ModPresets;
protected override LocalisableString Header => CommonStrings.ModPresets;
[Resolved]
private RealmAccess realm { get; set; } = null!;

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public class ScoreSettings : SettingsSubsection
{
protected override LocalisableString Header => MaintenanceSettingsStrings.Scores;
protected override LocalisableString Header => CommonStrings.Scores;
private SettingsButton importScoresButton = null!;
private SettingsButton deleteScoresButton = null!;

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public class SkinSettings : SettingsSubsection
{
protected override LocalisableString Header => MaintenanceSettingsStrings.Skins;
protected override LocalisableString Header => CommonStrings.Skins;
private SettingsButton importSkinsButton = null!;
private SettingsButton deleteSkinsButton = null!;

View File

@ -28,12 +28,12 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
new PopupDialogOkButton
{
Text = "Sure! I know where it is located!",
Text = MaintenanceSettingsStrings.StableDirectoryLocationOk,
Action = () => Schedule(() => performer.PerformFromScreen(screen => screen.Push(new StableDirectorySelectScreen(taskCompletionSource))))
},
new PopupDialogCancelButton
{
Text = "Actually I don't have osu!stable installed.",
Text = MaintenanceSettingsStrings.StableDirectoryLocationCancel,
Action = () => taskCompletionSource.TrySetCanceled()
}
};