Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions osu.Game/Beatmaps/BeatmapManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using osu.Game.Database;
using osu.Game.Extensions;
using osu.Game.IO.Archives;
using osu.Game.Localisation;
using osu.Game.Models;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests.Responses;
Expand Down Expand Up @@ -372,7 +373,6 @@ public void DeleteAllVideos()

public void ResetAllOffsets()
{
const string reset_complete_message = "All offsets have been reset!";
Realm.Write(r =>
{
var items = r.All<BeatmapInfo>();
Expand All @@ -383,7 +383,7 @@ public void ResetAllOffsets()
beatmap.UserSettings.Offset = 0;
}

PostNotification?.Invoke(new ProgressCompletionNotification { Text = reset_complete_message });
PostNotification?.Invoke(new ProgressCompletionNotification { Text = MaintenanceSettingsStrings.AllOffsetsReset });
});
}

Expand Down Expand Up @@ -435,20 +435,18 @@ public void DeleteDifficultyImmediately(BeatmapInfo beatmapInfo)
/// </summary>
public void DeleteVideos(List<BeatmapSetInfo> items, bool silent = false)
{
const string no_videos_message = "No videos found to delete!";

if (items.Count == 0)
{
if (!silent)
PostNotification?.Invoke(new ProgressCompletionNotification { Text = no_videos_message });
PostNotification?.Invoke(new ProgressCompletionNotification { Text = MaintenanceSettingsStrings.NoVideosFoundToDelete });
return;
}

var notification = new ProgressNotification
{
Progress = 0,
Text = $"Preparing to delete all {HumanisedModelName} videos...",
CompletionText = no_videos_message,
CompletionText = MaintenanceSettingsStrings.NoVideosFoundToDelete,
State = ProgressNotificationState.Active,
};

Expand Down
5 changes: 5 additions & 0 deletions osu.Game/Localisation/EditorStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ public static class EditorStrings
/// </summary>
public static LocalisableString CheckEntireBeatmapSet => new TranslatableString(getKey(@"check_entire_beatmap_set"), @"Entire beatmap set");

/// <summary>
/// "Saving is not supported for this ruleset yet, sorry!"
/// </summary>
public static LocalisableString RulesetNotSupportSaving => new TranslatableString(getKey(@"ruleset_not_support_saving"), @"Saving is not supported for this ruleset yet, sorry!");

private static string getKey(string key) => $@"{prefix}:{key}";
}
}
10 changes: 10 additions & 0 deletions osu.Game/Localisation/MaintenanceSettingsStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ public static class MaintenanceSettingsStrings
/// </summary>
public static LocalisableString StableDirectorySelectHeader => new TranslatableString(getKey(@"stable_directory_select_header"), @"Please select your osu!stable install location");

/// <summary>
/// "All offsets have been reset!"
/// </summary>
public static LocalisableString AllOffsetsReset => new TranslatableString(getKey(@"all_offsets_reset"), @"All offsets have been reset!");

/// <summary>
/// "No videos found to delete!"
/// </summary>
public static LocalisableString NoVideosFoundToDelete => new TranslatableString(getKey(@"no_videos_found_to_delete"), @"No videos found to delete!");

private static string getKey(string key) => $"{prefix}:{key}";
}
}
10 changes: 10 additions & 0 deletions osu.Game/Localisation/MultiplayerMatchStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ public static class MultiplayerMatchStrings
/// </summary>
public static LocalisableString FreestyleButtonTooltip => new TranslatableString(getKey(@"freestyle_button_tooltip"), @"Each player can choose their preferred difficulty, ruleset and mods.");

/// <summary>
/// "Searching for opponents..."
/// </summary>
public static LocalisableString SearchingForOpponents => new TranslatableString(getKey(@"searching_for_opponents"), @"Searching for opponents...");

/// <summary>
/// "Your match is ready! Click to join."
/// </summary>
public static LocalisableString MatchIsReady => new TranslatableString(getKey(@"match_is_ready"), @"Your match is ready! Click to join.");

private static string getKey(string key) => $@"{prefix}:{key}";
}
}
5 changes: 5 additions & 0 deletions osu.Game/Localisation/NotificationsStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ public static class NotificationsStrings
/// </summary>
public static LocalisableString Mention => new TranslatableString(getKey(@"mention"), @"Mention");

/// <summary>
/// "{0} in {1}"
/// </summary>
public static LocalisableString MentionDetails(string user, string channelName) => new TranslatableString(getKey(@"mention_details"), @"{0} in {1}", user, channelName);

/// <summary>
/// "Online: {0}"
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Online/Chat/MessageNotifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void load(ChatOverlay chatOverlay, INotificationOverlay notificationOver
{
TextFlow.AddText(Localisation.NotificationsStrings.Mention.ToUpper(), s => s.Font = OsuFont.Style.Caption2.With(weight: FontWeight.Bold));
TextFlow.NewLine();
TextFlow.AddText($"{message.Sender.Username} in {channel.Name}", s =>
TextFlow.AddText(Localisation.NotificationsStrings.MentionDetails(message.Sender.Username, channel.Name), s =>
{
s.Font = OsuFont.Style.Caption2.With(weight: FontWeight.SemiBold);
s.Colour = colourProvider.Content2;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Edit/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ internal bool Save()
{
if (!canSave)
{
notifications?.Post(new SimpleErrorNotification { Text = "Saving is not supported for this ruleset yet, sorry!" });
notifications?.Post(new SimpleErrorNotification { Text = EditorStrings.RulesetNotSupportSaving });
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Online.Matchmaking;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
Expand Down Expand Up @@ -203,7 +204,7 @@ public BackgroundQueueNotification(QueueController controller, MatchmakingPoolTy
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
Text = "Searching for opponents...";
Text = MultiplayerMatchStrings.SearchingForOpponents;

Activated = () =>
{
Expand Down Expand Up @@ -255,7 +256,7 @@ protected override Notification CreateCompletionNotification()
return foundNotification = new MatchFoundNotification
{
Activated = CompletionClickAction,
Text = "Your match is ready! Click to join.",
Text = MultiplayerMatchStrings.MatchIsReady,
};
}

Expand Down
Loading