mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:47:21 +08:00
Move some strings to common
This commit is contained in:
parent
5d2e09137c
commit
00acea59fc
@ -104,6 +104,56 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Description => new TranslatableString(getKey(@"description"), @"Description");
|
public static LocalisableString Description => new TranslatableString(getKey(@"description"), @"Description");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "File"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString MenuBarFile => new TranslatableString(getKey(@"menu_bar_file"), @"File");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Edit"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString MenuBarEdit => new TranslatableString(getKey(@"menu_bar_edit"), @"Edit");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "View"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString MenuBarView => new TranslatableString(getKey(@"menu_bar_view"), @"View");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Undo"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Undo => new TranslatableString(getKey(@"undo"), @"Undo");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Redo"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Redo => new TranslatableString(getKey(@"redo"), @"Redo");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Cut"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Cut => new TranslatableString(getKey(@"cut"), @"Cut");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Copy"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Copy => new TranslatableString(getKey(@"copy"), @"Copy");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Paste"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Paste => new TranslatableString(getKey(@"paste"), @"Paste");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Clone"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Clone => new TranslatableString(getKey(@"clone"), @"Clone");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Exit"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,51 +9,6 @@ namespace osu.Game.Localisation
|
|||||||
{
|
{
|
||||||
private const string prefix = @"osu.Game.Resources.Localisation.Editor";
|
private const string prefix = @"osu.Game.Resources.Localisation.Editor";
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "File"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString File => new TranslatableString(getKey(@"file"), @"File");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Edit"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Edit => new TranslatableString(getKey(@"edit"), @"Edit");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Undo"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Undo => new TranslatableString(getKey(@"undo"), @"Undo");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Redo"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Redo => new TranslatableString(getKey(@"redo"), @"Redo");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Cut"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Cut => new TranslatableString(getKey(@"cut"), @"Cut");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Copy"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Copy => new TranslatableString(getKey(@"copy"), @"Copy");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Paste"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Paste => new TranslatableString(getKey(@"paste"), @"Paste");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Clone"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Clone => new TranslatableString(getKey(@"clone"), @"Clone");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "View"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString View => new TranslatableString(getKey(@"view"), @"View");
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Waveform opacity"
|
/// "Waveform opacity"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -94,11 +49,6 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString DeleteDifficulty => new TranslatableString(getKey(@"delete_difficulty"), @"Delete difficulty");
|
public static LocalisableString DeleteDifficulty => new TranslatableString(getKey(@"delete_difficulty"), @"Delete difficulty");
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Exit"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit");
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "setup"
|
/// "setup"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -51,7 +51,7 @@ using osu.Game.Screens.Edit.Verify;
|
|||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
using CommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings;
|
using WebCommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit
|
namespace osu.Game.Screens.Edit
|
||||||
{
|
{
|
||||||
@ -294,24 +294,24 @@ namespace osu.Game.Screens.Edit
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Items = new[]
|
Items = new[]
|
||||||
{
|
{
|
||||||
new MenuItem(EditorStrings.File)
|
new MenuItem(CommonStrings.MenuBarFile)
|
||||||
{
|
{
|
||||||
Items = createFileMenuItems()
|
Items = createFileMenuItems()
|
||||||
},
|
},
|
||||||
new MenuItem(EditorStrings.Edit)
|
new MenuItem(CommonStrings.MenuBarEdit)
|
||||||
{
|
{
|
||||||
Items = new[]
|
Items = new[]
|
||||||
{
|
{
|
||||||
undoMenuItem = new EditorMenuItem(EditorStrings.Undo, MenuItemType.Standard, Undo),
|
undoMenuItem = new EditorMenuItem(CommonStrings.Undo, MenuItemType.Standard, Undo),
|
||||||
redoMenuItem = new EditorMenuItem(EditorStrings.Redo, MenuItemType.Standard, Redo),
|
redoMenuItem = new EditorMenuItem(CommonStrings.Redo, MenuItemType.Standard, Redo),
|
||||||
new EditorMenuItemSpacer(),
|
new EditorMenuItemSpacer(),
|
||||||
cutMenuItem = new EditorMenuItem(EditorStrings.Cut, MenuItemType.Standard, Cut),
|
cutMenuItem = new EditorMenuItem(CommonStrings.Cut, MenuItemType.Standard, Cut),
|
||||||
copyMenuItem = new EditorMenuItem(EditorStrings.Copy, MenuItemType.Standard, Copy),
|
copyMenuItem = new EditorMenuItem(CommonStrings.Copy, MenuItemType.Standard, Copy),
|
||||||
pasteMenuItem = new EditorMenuItem(EditorStrings.Paste, MenuItemType.Standard, Paste),
|
pasteMenuItem = new EditorMenuItem(CommonStrings.Paste, MenuItemType.Standard, Paste),
|
||||||
cloneMenuItem = new EditorMenuItem(EditorStrings.Clone, MenuItemType.Standard, Clone),
|
cloneMenuItem = new EditorMenuItem(CommonStrings.Clone, MenuItemType.Standard, Clone),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new MenuItem(EditorStrings.View)
|
new MenuItem(CommonStrings.MenuBarView)
|
||||||
{
|
{
|
||||||
Items = new MenuItem[]
|
Items = new MenuItem[]
|
||||||
{
|
{
|
||||||
@ -344,7 +344,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
bottomBar = new BottomBar(),
|
bottomBar = new BottomBar(),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
changeHandler?.CanUndo.BindValueChanged(v => undoMenuItem.Action.Disabled = !v.NewValue, true);
|
changeHandler?.CanUndo.BindValueChanged(v => undoMenuItem.Action.Disabled = !v.NewValue, true);
|
||||||
changeHandler?.CanRedo.BindValueChanged(v => redoMenuItem.Action.Disabled = !v.NewValue, true);
|
changeHandler?.CanRedo.BindValueChanged(v => redoMenuItem.Action.Disabled = !v.NewValue, true);
|
||||||
|
|
||||||
@ -952,7 +951,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private List<MenuItem> createFileMenuItems() => new List<MenuItem>
|
private List<MenuItem> createFileMenuItems() => new List<MenuItem>
|
||||||
{
|
{
|
||||||
new EditorMenuItem(CommonStrings.ButtonsSave, MenuItemType.Standard, () => Save()),
|
new EditorMenuItem(WebCommonStrings.ButtonsSave, MenuItemType.Standard, () => Save()),
|
||||||
new EditorMenuItem(EditorStrings.ExportPackage, MenuItemType.Standard, exportBeatmap) { Action = { Disabled = !RuntimeInfo.IsDesktop } },
|
new EditorMenuItem(EditorStrings.ExportPackage, MenuItemType.Standard, exportBeatmap) { Action = { Disabled = !RuntimeInfo.IsDesktop } },
|
||||||
new EditorMenuItemSpacer(),
|
new EditorMenuItemSpacer(),
|
||||||
createDifficultyCreationMenu(),
|
createDifficultyCreationMenu(),
|
||||||
@ -960,7 +959,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
new EditorMenuItemSpacer(),
|
new EditorMenuItemSpacer(),
|
||||||
new EditorMenuItem(EditorStrings.DeleteDifficulty, MenuItemType.Standard, deleteDifficulty) { Action = { Disabled = Beatmap.Value.BeatmapSetInfo.Beatmaps.Count < 2 } },
|
new EditorMenuItem(EditorStrings.DeleteDifficulty, MenuItemType.Standard, deleteDifficulty) { Action = { Disabled = Beatmap.Value.BeatmapSetInfo.Beatmaps.Count < 2 } },
|
||||||
new EditorMenuItemSpacer(),
|
new EditorMenuItemSpacer(),
|
||||||
new EditorMenuItem(EditorStrings.Exit, MenuItemType.Standard, this.Exit)
|
new EditorMenuItem(CommonStrings.Exit, MenuItemType.Standard, this.Exit)
|
||||||
};
|
};
|
||||||
|
|
||||||
private void exportBeatmap()
|
private void exportBeatmap()
|
||||||
|
Loading…
Reference in New Issue
Block a user