1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Make "general" a common string

This commit is contained in:
Joseph Madamba 2023-09-05 23:00:07 -07:00
parent 701e24e8d3
commit 73604d171a
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76
12 changed files with 14 additions and 34 deletions

View File

@ -169,6 +169,11 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString RevertToDefault => new TranslatableString(getKey(@"revert_to_default"), @"Revert to default"); public static LocalisableString RevertToDefault => new TranslatableString(getKey(@"revert_to_default"), @"Revert to default");
/// <summary>
/// "General"
/// </summary>
public static LocalisableString General => new TranslatableString(getKey(@"general"), @"General");
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }
} }

View File

@ -14,11 +14,6 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString DebugSectionHeader => new TranslatableString(getKey(@"debug_section_header"), @"Debug"); public static LocalisableString DebugSectionHeader => new TranslatableString(getKey(@"debug_section_header"), @"Debug");
/// <summary>
/// "General"
/// </summary>
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
/// <summary> /// <summary>
/// "Show log overlay" /// "Show log overlay"
/// </summary> /// </summary>

View File

@ -19,11 +19,6 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString BeatmapHeader => new TranslatableString(getKey(@"beatmap_header"), @"Beatmap"); public static LocalisableString BeatmapHeader => new TranslatableString(getKey(@"beatmap_header"), @"Beatmap");
/// <summary>
/// "General"
/// </summary>
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
/// <summary> /// <summary>
/// "Audio" /// "Audio"
/// </summary> /// </summary>

View File

@ -9,11 +9,6 @@ namespace osu.Game.Localisation
{ {
private const string prefix = @"osu.Game.Resources.Localisation.GeneralSettings"; private const string prefix = @"osu.Game.Resources.Localisation.GeneralSettings";
/// <summary>
/// "General"
/// </summary>
public static LocalisableString GeneralSectionHeader => new TranslatableString(getKey(@"general_section_header"), @"General");
/// <summary> /// <summary>
/// "Language" /// "Language"
/// </summary> /// </summary>

View File

@ -19,11 +19,6 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString LocallyModifiedTooltip => new TranslatableString(getKey(@"locally_modified_tooltip"), @"Has been locally modified"); public static LocalisableString LocallyModifiedTooltip => new TranslatableString(getKey(@"locally_modified_tooltip"), @"Has been locally modified");
/// <summary>
/// "General"
/// </summary>
public static LocalisableString General => new TranslatableString(getKey(@"general"), @"General");
/// <summary> /// <summary>
/// "Manage collections" /// "Manage collections"
/// </summary> /// </summary>

View File

@ -14,11 +14,6 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString UserInterfaceSectionHeader => new TranslatableString(getKey(@"user_interface_section_header"), @"User Interface"); public static LocalisableString UserInterfaceSectionHeader => new TranslatableString(getKey(@"user_interface_section_header"), @"User Interface");
/// <summary>
/// "General"
/// </summary>
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
/// <summary> /// <summary>
/// "Rotate cursor when dragging" /// "Rotate cursor when dragging"
/// </summary> /// </summary>

View File

@ -8,7 +8,7 @@ namespace osu.Game.Overlays.OSD
public partial class CopyUrlToast : Toast public partial class CopyUrlToast : Toast
{ {
public CopyUrlToast() public CopyUrlToast()
: base(UserInterfaceStrings.GeneralHeader, ToastStrings.UrlCopied, "") : base(CommonStrings.General, ToastStrings.UrlCopied, "")
{ {
} }
} }

View File

@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
{ {
public partial class GeneralSettings : SettingsSubsection public partial class GeneralSettings : SettingsSubsection
{ {
protected override LocalisableString Header => DebugSettingsStrings.GeneralHeader; protected override LocalisableString Header => CommonStrings.General;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, IPerformFromScreenRunner? performer) private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, IPerformFromScreenRunner? performer)

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{ {
public partial class GeneralSettings : SettingsSubsection public partial class GeneralSettings : SettingsSubsection
{ {
protected override LocalisableString Header => GameplaySettingsStrings.GeneralHeader; protected override LocalisableString Header => CommonStrings.General;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuConfigManager config) private void load(OsuConfigManager config)

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections
[Resolved(CanBeNull = true)] [Resolved(CanBeNull = true)]
private OsuGame? game { get; set; } private OsuGame? game { get; set; }
public override LocalisableString Header => GeneralSettingsStrings.GeneralSectionHeader; public override LocalisableString Header => CommonStrings.General;
public override Drawable CreateIcon() => new SpriteIcon public override Drawable CreateIcon() => new SpriteIcon
{ {

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
{ {
public partial class GeneralSettings : SettingsSubsection public partial class GeneralSettings : SettingsSubsection
{ {
protected override LocalisableString Header => UserInterfaceStrings.GeneralHeader; protected override LocalisableString Header => CommonStrings.General;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuConfigManager config) private void load(OsuConfigManager config)

View File

@ -18,12 +18,12 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Localisation;
using osu.Game.Overlays; using osu.Game.Overlays;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osuTK.Input; using osuTK.Input;
using osu.Game.Localisation; using WebCommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings;
using CommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings;
namespace osu.Game.Screens.Select.FooterV2 namespace osu.Game.Screens.Select.FooterV2
{ {
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Select.FooterV2
beatmapWhenOpening = beatmap.Value; beatmapWhenOpening = beatmap.Value;
addHeader(SongSelectStrings.General); addHeader(CommonStrings.General);
addButton(SongSelectStrings.ManageCollections, FontAwesome.Solid.Book, () => manageCollectionsDialog?.Show()); addButton(SongSelectStrings.ManageCollections, FontAwesome.Solid.Book, () => manageCollectionsDialog?.Show());
addHeader(SongSelectStrings.ForAllDifficulties, beatmapWhenOpening.BeatmapSetInfo.ToString()); addHeader(SongSelectStrings.ForAllDifficulties, beatmapWhenOpening.BeatmapSetInfo.ToString());
@ -70,7 +70,7 @@ namespace osu.Game.Screens.Select.FooterV2
if (songSelect != null && songSelect.AllowEditing) if (songSelect != null && songSelect.AllowEditing)
addButton(SongSelectStrings.EditBeatmap, FontAwesome.Solid.PencilAlt, () => songSelect.Edit(beatmapWhenOpening.BeatmapInfo)); addButton(SongSelectStrings.EditBeatmap, FontAwesome.Solid.PencilAlt, () => songSelect.Edit(beatmapWhenOpening.BeatmapInfo));
addButton(CommonStrings.ButtonsHide.ToSentence(), FontAwesome.Solid.Magic, () => beatmapManager?.Hide(beatmapWhenOpening.BeatmapInfo)); addButton(WebCommonStrings.ButtonsHide.ToSentence(), FontAwesome.Solid.Magic, () => beatmapManager?.Hide(beatmapWhenOpening.BeatmapInfo));
} }
protected override void LoadComplete() protected override void LoadComplete()