From 743bd32c575f0537bb9f54a57faededd07811a5e Mon Sep 17 00:00:00 2001 From: MikiraSora Date: Sat, 2 Nov 2024 12:36:53 +0800 Subject: [PATCH] add I18N --- .../Audio/Views/AudioSettingView.xaml | 6 +- .../Dialogs/ConfigKeyBindingDialog.xaml.cs | 9 +- .../Properties/Resources.Designer.cs | 40 ++++++++- OngekiFumenEditor/Properties/Resources.resx | 16 +++- .../Properties/Resources.zh-Hans.resx | 82 +++++++++++++++++++ 5 files changed, 143 insertions(+), 10 deletions(-) diff --git a/OngekiFumenEditor/Kernel/SettingPages/Audio/Views/AudioSettingView.xaml b/OngekiFumenEditor/Kernel/SettingPages/Audio/Views/AudioSettingView.xaml index 25c0c6fd..47ce0540 100644 --- a/OngekiFumenEditor/Kernel/SettingPages/Audio/Views/AudioSettingView.xaml +++ b/OngekiFumenEditor/Kernel/SettingPages/Audio/Views/AudioSettingView.xaml @@ -38,20 +38,20 @@ - + - + diff --git a/OngekiFumenEditor/Kernel/SettingPages/KeyBinding/Dialogs/ConfigKeyBindingDialog.xaml.cs b/OngekiFumenEditor/Kernel/SettingPages/KeyBinding/Dialogs/ConfigKeyBindingDialog.xaml.cs index d8c74d14..f8c79f4f 100644 --- a/OngekiFumenEditor/Kernel/SettingPages/KeyBinding/Dialogs/ConfigKeyBindingDialog.xaml.cs +++ b/OngekiFumenEditor/Kernel/SettingPages/KeyBinding/Dialogs/ConfigKeyBindingDialog.xaml.cs @@ -1,6 +1,7 @@ using Caliburn.Micro; using MahApps.Metro.Controls; using OngekiFumenEditor.Kernel.KeyBinding; +using OngekiFumenEditor.Utils; using System; using System.Collections.Generic; using System.ComponentModel; @@ -54,7 +55,8 @@ private void OnKeyUp(object sender, KeyEventArgs e) var key = (e.Key == Key.System ? e.SystemKey : e.Key); - if (Definition.Key == Key.None) { + if (Definition.Key == Key.None) + { TryClearModifier(key); } @@ -68,7 +70,8 @@ private void OnKeyDown(object sender, KeyEventArgs e) var key = (e.Key == Key.System ? e.SystemKey : e.Key); - if (TryGetModifier(key, out var modifier)) { + if (TryGetModifier(key, out var modifier)) + { this.modifier = modifier; this.key = Key.None; } @@ -141,7 +144,7 @@ private void Button_Click_1(object sender, RoutedEventArgs e) { if (ConflictDefinition is not null) { - if (MessageBox.Show($"你绑定的键位和 {ConflictDefinition.DisplayName} 冲突, 如果继续绑定则清空对方冲突的键位, 是否继续?", "警告", MessageBoxButton.YesNo) != MessageBoxResult.Yes) + if (MessageBox.Show(Properties.Resources.ConflictNotifyComfirm.Format(ConflictDefinition.DisplayName), Properties.Resources.Warning, MessageBoxButton.YesNo) != MessageBoxResult.Yes) return; } UpdateExpression(); diff --git a/OngekiFumenEditor/Properties/Resources.Designer.cs b/OngekiFumenEditor/Properties/Resources.Designer.cs index e2498713..793cd073 100644 --- a/OngekiFumenEditor/Properties/Resources.Designer.cs +++ b/OngekiFumenEditor/Properties/Resources.Designer.cs @@ -1185,6 +1185,15 @@ public static string Confirm { } } + /// + /// 查找类似 The key you bind to conflicts with {0}, if you continue to bind, the conflicting key will be cleared, do you want to continue? 的本地化字符串。 + /// + public static string ConflictNotifyComfirm { + get { + return ResourceManager.GetString("ConflictNotifyComfirm", resourceCulture); + } + } + /// /// 查找类似 To control object time... 的本地化字符串。 /// @@ -1896,6 +1905,15 @@ public static string EnableUpdateCheck { } } + /// + /// 查找类似 Allow variable speed music playback (requires program restart) 的本地化字符串。 + /// + public static string EnableVarspeed { + get { + return ResourceManager.GetString("EnableVarspeed", resourceCulture); + } + } + /// /// 查找类似 Enable display visualizer 的本地化字符串。 /// @@ -3408,6 +3426,15 @@ public static string MenuSelecting { } } + /// + /// 查找类似 ms 的本地化字符串。 + /// + public static string Millisecond { + get { + return ResourceManager.GetString("Millisecond", resourceCulture); + } + } + /// /// 查找类似 Mirror lane colors 的本地化字符串。 /// @@ -3607,7 +3634,7 @@ public static string NoFumenInput { } /// - /// 查找类似 x 的本地化字符串。 + /// 查找类似 (No Limit) 的本地化字符串。 /// public static string NoLimit { get { @@ -4858,7 +4885,7 @@ public static string SelectMusicXmlFile { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Please select a dockable lane 的本地化字符串。 /// public static string SelectOneDockableLaneOnly { get { @@ -5505,6 +5532,15 @@ public static string UsingExtendScriptEditor { } } + /// + /// 查找类似 Sampling audio buffer window size 的本地化字符串。 + /// + public static string VarspeedReadDurationMs { + get { + return ResourceManager.GetString("VarspeedReadDurationMs", resourceCulture); + } + } + /// /// 查找类似 Vertical scale 的本地化字符串。 /// diff --git a/OngekiFumenEditor/Properties/Resources.resx b/OngekiFumenEditor/Properties/Resources.resx index 852dc9a9..cc565b61 100644 --- a/OngekiFumenEditor/Properties/Resources.resx +++ b/OngekiFumenEditor/Properties/Resources.resx @@ -1570,7 +1570,7 @@ Mirror lane colors - x + (No Limit) Generate a preview image for a chart @@ -1996,6 +1996,18 @@ Change type of dockable lane - + Please select a dockable lane + + + Allow variable speed music playback (requires program restart) + + + Sampling audio buffer window size + + + ms + + + The key you bind to conflicts with {0}, if you continue to bind, the conflicting key will be cleared, do you want to continue? \ No newline at end of file diff --git a/OngekiFumenEditor/Properties/Resources.zh-Hans.resx b/OngekiFumenEditor/Properties/Resources.zh-Hans.resx index 43eb8b9a..2f96810e 100644 --- a/OngekiFumenEditor/Properties/Resources.zh-Hans.resx +++ b/OngekiFumenEditor/Properties/Resources.zh-Hans.resx @@ -258,6 +258,9 @@ 子弹形状 + + 批量删除 {0} (x{1}) + 调用AcbGeneratorFuck.Generator.Generate()失败 @@ -471,6 +474,9 @@ 删除物件 + + 删除 {0} + 删除已选的子弹类型 @@ -1866,6 +1872,67 @@ 颜色Id(ColorId)值无效: {0} + + + + + + 添加并选中 + + + 红线 + + + 绿线 + + + 蓝钱 + + + 左墙 + + + 右墙 + + + Tap + + + Hold + + + Flick + + + 锁边 + + + 彩色装饰轨道 + + + + + + + + + + + + Bell + + + 剪贴板 + + + 物件 + + + 剪贴板为空 + + + 剪贴板里的内容并不支持批量操作 + 通常模式 @@ -1875,7 +1942,22 @@ 批量模式 + + + 请选择单独选择一个可击打轨道节点 + + 允许变速播放音乐 (需要重启程序) + + + 变速采样缓存时间窗口 + + + 毫秒 + + + 你绑定的键位和 {0} 冲突, 如果继续绑定则清空对方冲突的键位, 是否继续? + \ No newline at end of file