Merge pull request #19693 from its5Q/editor-localisation

Add localisation support for beatmap editor setup
This commit is contained in:
Dean Herbert
2022-08-20 11:51:57 +09:00
committed by GitHub
10 changed files with 256 additions and 42 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Localisation;
namespace osu.Game.Screens.Edit.Setup
{
@ -18,7 +19,7 @@ namespace osu.Game.Screens.Edit.Setup
private LabelledFileChooser audioTrackChooser;
private LabelledFileChooser backgroundChooser;
public override LocalisableString Title => "Resources";
public override LocalisableString Title => EditorSetupStrings.ResourcesHeader;
[Resolved]
private MusicController music { get; set; }
@ -42,13 +43,13 @@ namespace osu.Game.Screens.Edit.Setup
{
backgroundChooser = new LabelledFileChooser(".jpg", ".jpeg", ".png")
{
Label = "Background",
Label = GameplaySettingsStrings.BackgroundHeader,
FixedLabelWidth = LABEL_WIDTH,
TabbableContentContainer = this
},
audioTrackChooser = new LabelledFileChooser(".mp3", ".ogg")
{
Label = "Audio Track",
Label = EditorSetupStrings.AudioTrack,
FixedLabelWidth = LABEL_WIDTH,
TabbableContentContainer = this
},
@ -143,12 +144,12 @@ namespace osu.Game.Screens.Edit.Setup
private void updatePlaceholderText()
{
audioTrackChooser.Text = audioTrackChooser.Current.Value == null
? "Click to select a track"
: "Click to replace the track";
? EditorSetupStrings.ClickToSelectTrack
: EditorSetupStrings.ClickToReplaceTrack;
backgroundChooser.Text = backgroundChooser.Current.Value == null
? "Click to select a background image"
: "Click to replace the background image";
? EditorSetupStrings.ClickToSelectBackground
: EditorSetupStrings.ClickToReplaceBackground;
}
}
}