diff --git a/BililiveRecorder.WPF/Controls/RoomCard.xaml b/BililiveRecorder.WPF/Controls/RoomCard.xaml index 0daf495..37b6e6a 100644 --- a/BililiveRecorder.WPF/Controls/RoomCard.xaml +++ b/BililiveRecorder.WPF/Controls/RoomCard.xaml @@ -82,7 +82,7 @@ - + diff --git a/BililiveRecorder.WPF/Controls/SettingWithDefault.xaml b/BililiveRecorder.WPF/Controls/SettingWithDefault.xaml index 625baad..d67bf10 100644 --- a/BililiveRecorder.WPF/Controls/SettingWithDefault.xaml +++ b/BililiveRecorder.WPF/Controls/SettingWithDefault.xaml @@ -6,6 +6,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ui="http://schemas.modernwpf.com/2019" + xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension" + l:LocalizeDictionary.DesignCulture="" + l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF" + l:ResxLocalizationProvider.DefaultDictionary="Strings" xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls" mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="200"> @@ -22,7 +26,7 @@ - diff --git a/BililiveRecorder.WPF/Controls/WorkDirectorySelectorDialog.xaml.cs b/BililiveRecorder.WPF/Controls/WorkDirectorySelectorDialog.xaml.cs index 3cdba84..fc60b49 100644 --- a/BililiveRecorder.WPF/Controls/WorkDirectorySelectorDialog.xaml.cs +++ b/BililiveRecorder.WPF/Controls/WorkDirectorySelectorDialog.xaml.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; using Microsoft.WindowsAPICodePack.Dialogs; +using WPFLocalizeExtension.Extensions; namespace BililiveRecorder.WPF.Controls { @@ -33,11 +34,12 @@ namespace BililiveRecorder.WPF.Controls private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { + var title = LocExtension.GetLocalizedValue("BililiveRecorder.WPF:Strings:WorkDirectorySelector_Title"); var fileDialog = new CommonOpenFileDialog() { IsFolderPicker = true, Multiselect = false, - Title = "选择录播姬工作目录路径", + Title = title, AddToMostRecentlyUsedList = false, EnsurePathExists = true, NavigateToShortcut = true, diff --git a/BililiveRecorder.WPF/NewMainWindow.xaml.cs b/BililiveRecorder.WPF/NewMainWindow.xaml.cs index c9b6085..8acde94 100644 --- a/BililiveRecorder.WPF/NewMainWindow.xaml.cs +++ b/BililiveRecorder.WPF/NewMainWindow.xaml.cs @@ -27,8 +27,6 @@ namespace BililiveRecorder.WPF this.InitializeComponent(); - // this.Title = "B站录播姬 " + BuildInfo.Version + " " + BuildInfo.HeadShaShort; - SingleInstance.NotificationReceived += this.SingleInstance_NotificationReceived; } diff --git a/BililiveRecorder.WPF/Pages/AdvancedSettingsPage.xaml b/BililiveRecorder.WPF/Pages/AdvancedSettingsPage.xaml index f4dbf63..b11c5ee 100644 --- a/BililiveRecorder.WPF/Pages/AdvancedSettingsPage.xaml +++ b/BililiveRecorder.WPF/Pages/AdvancedSettingsPage.xaml @@ -5,6 +5,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ui="http://schemas.modernwpf.com/2019" + xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension" + l:LocalizeDictionary.DesignCulture="" + l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF" + l:ResxLocalizationProvider.DefaultDictionary="Strings" xmlns:c="clr-namespace:BililiveRecorder.WPF.Controls" xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages" xmlns:config="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core" @@ -28,16 +32,16 @@ - + + - + - - - + + + diff --git a/BililiveRecorder.WPF/Pages/LogPage.xaml b/BililiveRecorder.WPF/Pages/LogPage.xaml index f1605b5..222dfc0 100644 --- a/BililiveRecorder.WPF/Pages/LogPage.xaml +++ b/BililiveRecorder.WPF/Pages/LogPage.xaml @@ -16,7 +16,7 @@ d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=models:LogModel}" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Logs,Mode=OneWay}" - Title="LogPage"> + > @@ -43,18 +43,17 @@ - + - + - + - diff --git a/BililiveRecorder.WPF/Pages/LogPage.xaml.cs b/BililiveRecorder.WPF/Pages/LogPage.xaml.cs index d8fe150..ddf6cb1 100644 --- a/BililiveRecorder.WPF/Pages/LogPage.xaml.cs +++ b/BililiveRecorder.WPF/Pages/LogPage.xaml.cs @@ -13,7 +13,7 @@ namespace BililiveRecorder.WPF.Pages public LogPage() { this.InitializeComponent(); - this.VersionTextBlock.Text = BuildInfo.Version + " " + BuildInfo.HeadShaShort; + this.VersionTextBlock.Text = " " + BuildInfo.Version + " " + BuildInfo.HeadShaShort; } private void TextBlock_MouseRightButtonUp(object sender, MouseButtonEventArgs e) diff --git a/BililiveRecorder.WPF/Pages/SettingsPage.xaml b/BililiveRecorder.WPF/Pages/SettingsPage.xaml index 27bee5a..e154686 100644 --- a/BililiveRecorder.WPF/Pages/SettingsPage.xaml +++ b/BililiveRecorder.WPF/Pages/SettingsPage.xaml @@ -5,6 +5,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ui="http://schemas.modernwpf.com/2019" + xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension" + l:LocalizeDictionary.DesignCulture="" + l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF" + l:ResxLocalizationProvider.DefaultDictionary="Strings" xmlns:c="clr-namespace:BililiveRecorder.WPF.Controls" xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages" xmlns:config="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core" @@ -21,90 +25,51 @@ - - + + - + + OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}"/> + OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}"/> + OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}"/> + OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}"/> - + - - - - + - - + + + - - - - - - - - - - - - - - - - - - - - - + - - 文件名变量说明 - - 日期: {date} - 时间: {time} - 房间号: {roomid} - 标题: {title} - 主播名: {name} - 随机数字: {random} - - 所有 { } 大括号均为英文半角括号 - 只支持 flv 格式 - + - + @@ -116,6 +81,33 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/BililiveRecorder.WPF/Properties/Strings.Designer.cs b/BililiveRecorder.WPF/Properties/Strings.Designer.cs index d8cbefd..6bef202 100644 --- a/BililiveRecorder.WPF/Properties/Strings.Designer.cs +++ b/BililiveRecorder.WPF/Properties/Strings.Designer.cs @@ -60,6 +60,33 @@ namespace BililiveRecorder.WPF.Properties { } } + /// + /// Looks up a localized string similar to 联系方式/问题反馈: . + /// + public static string About_Contact { + get { + return ResourceManager.GetString("About_Contact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to B站录播姬. + /// + public static string About_Name { + get { + return ResourceManager.GetString("About_Name", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 官网: . + /// + public static string About_Website { + get { + return ResourceManager.GetString("About_Website", resourceCulture); + } + } + /// /// Looks up a localized string similar to 确定. /// @@ -285,6 +312,15 @@ namespace BililiveRecorder.WPF.Properties { } } + /// + /// Looks up a localized string similar to 房间设置. + /// + public static string RoomCard_Menu_Settings { + get { + return ResourceManager.GetString("RoomCard_Menu_Settings", resourceCulture); + } + } + /// /// Looks up a localized string similar to 开始录制. /// @@ -312,6 +348,44 @@ namespace BililiveRecorder.WPF.Properties { } } + /// + /// Looks up a localized string similar to 弹幕连接被断开 + ///录播姬通过弹幕服务器接收开播状态推送. + /// + public static string RoomCard_Status_DanmakuConnectionTooltip_False { + get { + return ResourceManager.GetString("RoomCard_Status_DanmakuConnectionTooltip_False", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 已连接弹幕服务器 + ///实时接收开播状态和其他数据. + /// + public static string RoomCard_Status_DanmakuConnectionTooltip_True { + get { + return ResourceManager.GetString("RoomCard_Status_DanmakuConnectionTooltip_True", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 未开播. + /// + public static string RoomCard_Status_LiveStatusTooltip_False { + get { + return ResourceManager.GetString("RoomCard_Status_LiveStatusTooltip_False", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 直播中. + /// + public static string RoomCard_Status_LiveStatusTooltip_True { + get { + return ResourceManager.GetString("RoomCard_Status_LiveStatusTooltip_True", resourceCulture); + } + } + /// /// Looks up a localized string similar to 监控中. /// @@ -511,6 +585,280 @@ namespace BililiveRecorder.WPF.Properties { } } + /// + /// Looks up a localized string similar to 高级设置. + /// + public static string Settings_AdvancedPage_Title { + get { + return ResourceManager.GetString("Settings_AdvancedPage_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 注:一般用户通常不需要也不应该修改这里的设置项。 + ///对 Timing 的修改可能会导致被B站服务器屏蔽、不能及时开始录制等问题。. + /// + public static string Settings_AdvancedPage_Warning { + get { + return ResourceManager.GetString("Settings_AdvancedPage_Warning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 触发写硬盘所需弹幕个数. + /// + public static string Settings_Danmaku_FlushInterval { + get { + return ResourceManager.GetString("Settings_Danmaku_FlushInterval", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 弹幕录制. + /// + public static string Settings_Danmaku_Title { + get { + return ResourceManager.GetString("Settings_Danmaku_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存弹幕. + /// + public static string Settings_Danmaku_ToggleSwitch_Enabled { + get { + return ResourceManager.GetString("Settings_Danmaku_ToggleSwitch_Enabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存 送礼信息. + /// + public static string Settings_Danmaku_ToggleSwitch_Gift { + get { + return ResourceManager.GetString("Settings_Danmaku_ToggleSwitch_Gift", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存 舰长购买. + /// + public static string Settings_Danmaku_ToggleSwitch_Guard { + get { + return ResourceManager.GetString("Settings_Danmaku_ToggleSwitch_Guard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存 弹幕原始数据. + /// + public static string Settings_Danmaku_ToggleSwitch_Raw { + get { + return ResourceManager.GetString("Settings_Danmaku_ToggleSwitch_Raw", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存 SuperChat. + /// + public static string Settings_Danmaku_ToggleSwitch_SuperChat { + get { + return ResourceManager.GetString("Settings_Danmaku_ToggleSwitch_SuperChat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 说明. + /// + public static string Settings_FileName_Description_Text { + get { + return ResourceManager.GetString("Settings_FileName_Description_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 文件名变量说明 + /// + ///日期: {date} + ///时间: {time} + ///房间号: {roomid} + ///标题: {title} + ///主播名: {name} + ///随机数字: {random} + /// + ///所有 { } 大括号均为英文半角括号 + ///只支持 flv 格式. + /// + public static string Settings_FileName_Description_ToolTip { + get { + return ResourceManager.GetString("Settings_FileName_Description_ToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 秒. + /// + public static string Settings_RecordMode_Clip_DurationUnit { + get { + return ResourceManager.GetString("Settings_RecordMode_Clip_DurationUnit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 剪辑将来时长. + /// + public static string Settings_RecordMode_Clip_FutureDuration { + get { + return ResourceManager.GetString("Settings_RecordMode_Clip_FutureDuration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 剪辑过去时长. + /// + public static string Settings_RecordMode_Clip_PastDuration { + get { + return ResourceManager.GetString("Settings_RecordMode_Clip_PastDuration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 推荐使用 只启用录制功能 + ///即时剪辑功能会在之后的版本删除 + ///启用剪辑功能有小概率会遇到内存泄漏的问题. + /// + public static string Settings_RecordMode_Description { + get { + return ResourceManager.GetString("Settings_RecordMode_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 同时启用两个功能. + /// + public static string Settings_RecordMode_RadioButton_Both { + get { + return ResourceManager.GetString("Settings_RecordMode_RadioButton_Both", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 只启用即时剪辑功能. + /// + public static string Settings_RecordMode_RadioButton_ClipOnly { + get { + return ResourceManager.GetString("Settings_RecordMode_RadioButton_ClipOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 只启用录制功能. + /// + public static string Settings_RecordMode_RadioButton_RecordOnly { + get { + return ResourceManager.GetString("Settings_RecordMode_RadioButton_RecordOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 录制模式. + /// + public static string Settings_RecordMode_Title { + get { + return ResourceManager.GetString("Settings_RecordMode_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 设置. + /// + public static string Settings_SettingsPage_Title { + get { + return ResourceManager.GetString("Settings_SettingsPage_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 根据文件大小自动分段. + /// + public static string Settings_Splitting_RadioButton_BySize { + get { + return ResourceManager.GetString("Settings_Splitting_RadioButton_BySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 根据视频时间自动分段. + /// + public static string Settings_Splitting_RadioButton_ByTime { + get { + return ResourceManager.GetString("Settings_Splitting_RadioButton_ByTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 不自动分段. + /// + public static string Settings_Splitting_RadioButton_Disabled { + get { + return ResourceManager.GetString("Settings_Splitting_RadioButton_Disabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 每. + /// + public static string Settings_Splitting_TextBox_Left { + get { + return ResourceManager.GetString("Settings_Splitting_TextBox_Left", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存为一个文件. + /// + public static string Settings_Splitting_TextBox_Right { + get { + return ResourceManager.GetString("Settings_Splitting_TextBox_Right", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MiB. + /// + public static string Settings_Splitting_TextBox_SizeUnit { + get { + return ResourceManager.GetString("Settings_Splitting_TextBox_SizeUnit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 分. + /// + public static string Settings_Splitting_TextBox_TimeUnit { + get { + return ResourceManager.GetString("Settings_Splitting_TextBox_TimeUnit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 自动分段. + /// + public static string Settings_Splitting_Title { + get { + return ResourceManager.GetString("Settings_Splitting_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 默认. + /// + public static string SettingWithDefault_Default { + get { + return ResourceManager.GetString("SettingWithDefault_Default", resourceCulture); + } + } + /// /// Looks up a localized string similar to 打开主界面. /// diff --git a/BililiveRecorder.WPF/Properties/Strings.en.resx b/BililiveRecorder.WPF/Properties/Strings.en.resx index fc0ea6f..8bc3492 100644 --- a/BililiveRecorder.WPF/Properties/Strings.en.resx +++ b/BililiveRecorder.WPF/Properties/Strings.en.resx @@ -141,8 +141,11 @@ {0:F2} Mbps + + Recording Splitting + - BililiveRecorder {0} + BililiveRecorder (B站录播姬) {0} Browse... diff --git a/BililiveRecorder.WPF/Properties/Strings.ja.resx b/BililiveRecorder.WPF/Properties/Strings.ja.resx index ef24b59..55973ce 100644 --- a/BililiveRecorder.WPF/Properties/Strings.ja.resx +++ b/BililiveRecorder.WPF/Properties/Strings.ja.resx @@ -127,7 +127,7 @@ {0:F2} Mbps - ビリビリ録画機 {0} + ビリビリ録画機 (B站录播姬) {0} ブラウズ... diff --git a/BililiveRecorder.WPF/Properties/Strings.resx b/BililiveRecorder.WPF/Properties/Strings.resx index 245cf18..4f238a9 100644 --- a/BililiveRecorder.WPF/Properties/Strings.resx +++ b/BililiveRecorder.WPF/Properties/Strings.resx @@ -97,6 +97,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 联系方式/问题反馈: + Add a space after colon ":" + + + B站录播姬 + Add "(B站录播姬)" after translation + + + 官网: + Add a space after colon ":" + 确定 Translate as "confirm" or "add" @@ -175,6 +187,10 @@ 刷新直播间信息 + + 房间设置 + This settings is different per room + 开始录制 @@ -184,6 +200,20 @@ 操作 + + 弹幕连接被断开 +录播姬通过弹幕服务器接收开播状态推送 + + + 已连接弹幕服务器 +实时接收开播状态和其他数据 + + + 未开播 + + + 直播中 + 监控中 Short status text @@ -256,6 +286,108 @@ 设置 + + 高级设置 + + + 注:一般用户通常不需要也不应该修改这里的设置项。 +对 Timing 的修改可能会导致被B站服务器屏蔽、不能及时开始录制等问题。 + + + 触发写硬盘所需弹幕个数 + + + 弹幕录制 + + + 保存弹幕 + + + 保存 送礼信息 + + + 保存 舰长购买 + + + 保存 弹幕原始数据 + + + 保存 SuperChat + + + 说明 + + + 文件名变量说明 + +日期: {date} +时间: {time} +房间号: {roomid} +标题: {title} +主播名: {name} +随机数字: {random} + +所有 { } 大括号均为英文半角括号 +只支持 flv 格式 + + + + + + 剪辑将来时长 + + + 剪辑过去时长 + + + 推荐使用 只启用录制功能 +即时剪辑功能会在之后的版本删除 +启用剪辑功能有小概率会遇到内存泄漏的问题 + + + 同时启用两个功能 + + + 只启用即时剪辑功能 + + + 只启用录制功能 + + + 录制模式 + + + 设置 + + + 根据文件大小自动分段 + + + 根据视频时间自动分段 + + + 不自动分段 + + + + + + 保存为一个文件 + + + MiB + + + + + + 自动分段 + + + 默认 + Text of the checkbox in the reuseable control for setting items. +Will use default setting and disable user input when checked. + 打开主界面 diff --git a/BililiveRecorder.WPF/Resources/ConverterResources.xaml b/BililiveRecorder.WPF/Resources/ConverterResources.xaml index 3133928..20cd1d8 100644 --- a/BililiveRecorder.WPF/Resources/ConverterResources.xaml +++ b/BililiveRecorder.WPF/Resources/ConverterResources.xaml @@ -1,6 +1,9 @@ - + @@ -15,7 +18,14 @@ - + + + + + + + + @@ -25,7 +35,14 @@ - + + + + + + + + diff --git a/BililiveRecorder.sln b/BililiveRecorder.sln index 9c395e8..9dacde6 100644 --- a/BililiveRecorder.sln +++ b/BililiveRecorder.sln @@ -21,7 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{623A2ACC-DAC6-4E6F-9242-B4B54381AAE1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BililiveRecorder.UnitTest.Core", "test\BililiveRecorder.UnitTest.Core\BililiveRecorder.UnitTest.Core.csproj", "{521EC763-5694-45A8-B87F-6E6B7F2A3BD4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BililiveRecorder.UnitTest.Core", "test\BililiveRecorder.UnitTest.Core\BililiveRecorder.UnitTest.Core.csproj", "{521EC763-5694-45A8-B87F-6E6B7F2A3BD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -57,8 +57,9 @@ Global {521EC763-5694-45A8-B87F-6E6B7F2A3BD4} = {623A2ACC-DAC6-4E6F-9242-B4B54381AAE1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - RESX_SortFileContentOnSave = True - SolutionGuid = {F3CB8B14-077A-458F-BD8E-1747ED0F5170} + RESX_SaveFilesImmediatelyUponChange = False RESX_NeutralResourcesLanguage = zh-Hans + SolutionGuid = {F3CB8B14-077A-458F-BD8E-1747ED0F5170} + RESX_SortFileContentOnSave = True EndGlobalSection EndGlobal