diff options
author | sr55 <[email protected]> | 2019-10-13 18:03:58 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-10-13 18:03:58 +0100 |
commit | 4a75f67486474b024d2264481cbe9e172a3e98f4 (patch) | |
tree | ab820962a0721273049cdee018ab5b15f4fa8c36 | |
parent | d6658751f5694e60df5d74481120098c50dff5d5 (diff) |
WinGui: Catchup some remaining strings that were not localisable. #2345
29 files changed, 749 insertions, 150 deletions
diff --git a/win/CS/HandBrake.Interop/Attributes/DisplayName.cs b/win/CS/HandBrake.Interop/Attributes/DisplayName.cs index 07512fc3a..e359a7fba 100644 --- a/win/CS/HandBrake.Interop/Attributes/DisplayName.cs +++ b/win/CS/HandBrake.Interop/Attributes/DisplayName.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// <copyright file="DisplayName.cs" company="HandBrake Project (http://handbrake.fr)"> +// <copyright file="DisplayName.cs" company="HandBrake Project (https://handbrake.fr)"> // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> diff --git a/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs new file mode 100644 index 000000000..2ef6ad204 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="Mp4BehaviourConverter.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Process Priority Converter +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class Mp4BehaviourConverter : ResourceConverterBase<Mp4Behaviour>, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs new file mode 100644 index 000000000..2ab2bac66 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="ProcessPriorityConverter.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Process Priority Converter +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class ProcessPriorityConverter : ResourceConverterBase<ProcessPriority>, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs new file mode 100644 index 000000000..3f4de9df7 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs @@ -0,0 +1,19 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="UpdateCheckConverter.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the UpdateCheckConverter type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + + public class UpdateCheckConverter : ResourceConverterBase<UpdateCheck>, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs b/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs new file mode 100644 index 000000000..36a588f59 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs @@ -0,0 +1,89 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="ResourceConverterBase.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the ResourceConverterBase type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class ResourceConverterBase<T> + { + /// <summary> + /// The convert. + /// </summary> + /// <param name="value"> + /// The value. + /// </param> + /// <param name="targetType"> + /// The target type. + /// </param> + /// <param name="parameter"> + /// The parameter. + /// </param> + /// <param name="culture"> + /// The culture. + /// </param> + /// <returns> + /// The <see cref="object"/>. + /// </returns> + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null && value.GetType() == typeof(BindingList<T>)) + { + return + new BindingList<string>( + EnumHelper<T>.GetEnumDisplayValues(typeof(T)).ToList()); + } + + if (value != null && value.GetType() == typeof(T)) + { + return EnumHelper<T>.GetDisplay((T)value); + } + + return null; + } + + /// <summary> + /// The convert back. + /// </summary> + /// <param name="value"> + /// The value. + /// </param> + /// <param name="targetType"> + /// The target type. + /// </param> + /// <param name="parameter"> + /// The parameter. + /// </param> + /// <param name="culture"> + /// The culture. + /// </param> + /// <returns> + /// The <see cref="object"/>. + /// </returns> + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + string name = value as string; + if (!string.IsNullOrEmpty(name)) + { + return EnumHelper<T>.GetValue(name); + } + + return null; + } + } +} diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index fbb3669ca..de8fd7786 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -136,6 +136,11 @@ <Compile Include="Converters\LongToIntConverter.cs" />
<Compile Include="Converters\Options\FileSizeConverter.cs" />
<Compile Include="Converters\Options\LogLevelConverter.cs" />
+ <Compile Include="Converters\Options\Mp4BehaviourConverter.cs" />
+ <Compile Include="Converters\Options\UpdateCheckConverter.cs" />
+ <Compile Include="Converters\ResourceConverterBase.cs" />
+ <Compile Include="Model\Options\Mp4Behaviour.cs" />
+ <Compile Include="Converters\Options\ProcessPriorityConverter.cs" />
<Compile Include="Converters\OptionTabConverter.cs" />
<Compile Include="Converters\PresetsMenuConverter.cs" />
<Compile Include="Converters\Queue\InlineQueueConverter.cs" />
@@ -173,14 +178,16 @@ <Compile Include="Model\Filters\FilterTune.cs" />
<Compile Include="Model\Filters\FilterPreset.cs" />
<Compile Include="Model\InterfaceLanguage.cs" />
+ <Compile Include="Model\Options\ProcessPriority.cs" />
+ <Compile Include="Model\Options\UpdateCheck.cs" />
<Compile Include="Model\Options\WhenDone.cs" />
<Compile Include="Model\Picture\PresetPictureSettingsMode.cs" />
<Compile Include="Model\Subtitles\SubtitleBurnInBehaviourModes.cs" />
<Compile Include="Model\Subtitles\SubtitleBehaviourModes.cs" />
<Compile Include="Model\Subtitles\SubtitleBehaviours.cs" />
<Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\ResourcesTooltips.Designer.cs">
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs index 9506fa0e9..ff76aee70 100644 --- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs @@ -179,15 +179,15 @@ namespace HandBrakeWPF.Helpers */
if (task.OutputFormat == OutputFormat.Mp4)
{
- switch (userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
+ switch ((Mp4Behaviour)userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
{
- case 0: // Automatic
+ case Mp4Behaviour.Auto: // Automatic
destinationFilename += task.IncludeChapterMarkers || MP4Helper.RequiresM4v(task) ? ".m4v" : ".mp4";
break;
- case 1: // Always MP4
+ case Mp4Behaviour.MP4: // Always MP4
destinationFilename += ".mp4";
break;
- case 2: // Always M4V
+ case Mp4Behaviour.M4V: // Always M4V
destinationFilename += ".m4v";
break;
}
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs index 7237c7c64..b1758c1d9 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs @@ -11,20 +11,22 @@ namespace HandBrakeWPF.Model.Audio {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// The audio behaviours.
/// </summary>
public enum AudioBehaviourModes
{
- [DisplayName("No Audio")]
+ [DisplayName(typeof(Resources), "AudioBehaviourModes_None")]
[ShortName("none")]
None = 0,
- [DisplayName("First Matching Selected Language")]
+ [DisplayName(typeof(Resources), "AudioBehaviourModes_FirstMatch")]
[ShortName("first")]
FirstMatch,
- [DisplayName("All Matching Selected Languages")]
+ [DisplayName(typeof(Resources), "AudioBehaviourModes_AllMatching")]
[ShortName("all")]
AllMatching,
}
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs index b36a31ec5..43f91da16 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs @@ -11,15 +11,17 @@ namespace HandBrakeWPF.Model.Audio {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// The audio behaviours.
/// </summary>
public enum AudioTrackDefaultsMode
{
- [DisplayName("Use First Track as template")]
+ [DisplayName(typeof(Resources), "AudioBehaviourModes_FirstTrack")]
FirstTrack = 0,
- [DisplayName("Use All Tracks as templates")]
+ [DisplayName(typeof(Resources), "AudioBehaviourModes_AllTracks")]
AllTracks,
}
}
diff --git a/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs b/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs new file mode 100644 index 000000000..9844e25de --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs @@ -0,0 +1,28 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="Mp4Behaviour.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the Mp4Behaviour type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum Mp4Behaviour + { + [DisplayName(typeof(Resources), "Mp4Behaviour_Auto")] + Auto = 0, + + [DisplayName(typeof(Resources), "Mp4Behaviour_UseMp4")] + MP4, + + [DisplayName(typeof(Resources), "Mp4Behaviour_UseM4v")] + M4V, + } +} + diff --git a/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs b/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs new file mode 100644 index 000000000..f39843d26 --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="ProcessPriority.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the ProcessPriority type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum ProcessPriority + { + [DisplayName(typeof(Resources), "ProcessPriority_High")] + High = 0, + + [DisplayName(typeof(Resources), "ProcessPriority_AboveNormal")] + AboveNormal, + + [DisplayName(typeof(Resources), "ProcessPriority_Normal")] + Normal, + + [DisplayName(typeof(Resources), "ProcessPriority_BelowNormal")] + BelowNormal, + + [DisplayName(typeof(Resources), "ProcessPriority_Low")] + Low + } +}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs b/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs new file mode 100644 index 000000000..f762f3e6f --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="UpdateCheck.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the UpdateCheck type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum UpdateCheck + { + [DisplayName(typeof(Resources), "UpdateCheck_Monthly")] + Monthly = 0, + + [DisplayName(typeof(Resources), "UpdateCheck_Weekly")] + Weekly, + } +} diff --git a/win/CS/HandBrakeWPF/Model/OptionsTab.cs b/win/CS/HandBrakeWPF/Model/OptionsTab.cs index 1ca93ca10..bcdcb4e99 100644 --- a/win/CS/HandBrakeWPF/Model/OptionsTab.cs +++ b/win/CS/HandBrakeWPF/Model/OptionsTab.cs @@ -11,30 +11,32 @@ namespace HandBrakeWPF.Model {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// A enum representing each tab on the options screen.
/// </summary>
public enum OptionsTab
{
- [DisplayName("General")]
+ [DisplayName(typeof(Resources), "Options_General")]
General = 0,
- [DisplayName("Output Files")]
+ [DisplayName(typeof(Resources), "Options_OutputFiles")]
OutputFiles,
- [DisplayName("When Done")]
+ [DisplayName(typeof(Resources), "Options_WhenDone")]
WhenDone,
- [DisplayName("Video")]
+ [DisplayName(typeof(Resources), "Options_Video")]
Video,
- [DisplayName("Advanced")]
+ [DisplayName(typeof(Resources), "Options_Advanced")]
Advanced,
- [DisplayName("Updates")]
+ [DisplayName(typeof(Resources), "Options_Updates")]
Updates,
- [DisplayName("About HandBrake")]
+ [DisplayName(typeof(Resources), "Options_About")]
About,
}
}
diff --git a/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs b/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs index 7db70c79c..517da08ee 100644 --- a/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs +++ b/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs @@ -11,16 +11,20 @@ namespace HandBrakeWPF.Model.Picture {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// Picture Settings Mode when adding presets
/// </summary>
public enum PresetPictureSettingsMode
{
- [DisplayName("None")]
+ [DisplayName(typeof(Resources), "PresetPictureSettingsMode_None")]
None = 0,
- [DisplayName("Custom")]
+
+ [DisplayName(typeof(Resources), "PresetPictureSettingsMode_Custom")]
Custom = 1,
- [DisplayName("Always use Source Resolution")]
+
+ [DisplayName(typeof(Resources), "PresetPictureSettingsMode_SourceMaximum")]
SourceMaximum = 2,
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs index efdffc2aa..bbb98ee9c 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs @@ -11,20 +11,22 @@ namespace HandBrakeWPF.Model.Subtitles {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// The subtitle behaviours modes.
/// </summary>
public enum SubtitleBehaviourModes
{
- [DisplayName("None")]
+ [DisplayName(typeof(Resources), "SubtitleBehaviourModes_None")]
[ShortName("none")]
None = 0,
- [DisplayName("First Matching Selected Language")]
+ [DisplayName(typeof(Resources), "SubtitleBehaviourModes_FirstMatching")]
[ShortName("first")]
FirstMatch,
- [DisplayName("All Matching Selected Languages")]
+ [DisplayName(typeof(Resources), "SubtitleBehaviourModes_AllMatching")]
[ShortName("all")]
AllMatching,
}
diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs index 37088a4cb..ee846a248 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs @@ -11,24 +11,26 @@ namespace HandBrakeWPF.Model.Subtitles {
using HandBrake.Interop.Attributes;
+ using HandBrakeWPF.Properties;
+
/// <summary>
/// The subtitle behaviours modes.
/// </summary>
public enum SubtitleBurnInBehaviourModes
{
- [DisplayName("None")]
+ [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_None")]
[ShortName("none")]
None = 0,
- [DisplayName("Foreign Audio Track")]
+ [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_ForeignAudioTrack")]
[ShortName("foreign")]
ForeignAudio,
- [DisplayName("First Track")]
+ [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_FirstTrack")]
[ShortName("first")]
FirstTrack,
- [DisplayName("Foreign Audio Preferred, else First")]
+ [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst")]
[ShortName("foreign_first")]
ForeignAudioPreferred,
}
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 8e4931c68..e6b1887b1 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -221,6 +221,51 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to All Matching Selected Languages. + /// </summary> + public static string AudioBehaviourModes_AllMatching { + get { + return ResourceManager.GetString("AudioBehaviourModes_AllMatching", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Use All Tracks as templates. + /// </summary> + public static string AudioBehaviourModes_AllTracks { + get { + return ResourceManager.GetString("AudioBehaviourModes_AllTracks", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to First Matching Selected Language. + /// </summary> + public static string AudioBehaviourModes_FirstMatch { + get { + return ResourceManager.GetString("AudioBehaviourModes_FirstMatch", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Use First Track as template. + /// </summary> + public static string AudioBehaviourModes_FirstTrack { + get { + return ResourceManager.GetString("AudioBehaviourModes_FirstTrack", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to No Audio. + /// </summary> + public static string AudioBehaviourModes_None { + get { + return ResourceManager.GetString("AudioBehaviourModes_None", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Add Track. /// </summary> public static string AudioDefaultsView_AddTrack { @@ -691,6 +736,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Chapter {0}. + /// </summary> + public static string ChapterViewModel_Chapter { + get { + return ResourceManager.GetString("ChapterViewModel_Chapter", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to The system clipboard is currently unavailable.. /// </summary> public static string Clipboard_Unavailable { @@ -2594,6 +2648,33 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Automatic. + /// </summary> + public static string Mp4Behaviour_Auto { + get { + return ResourceManager.GetString("Mp4Behaviour_Auto", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Always use M4V. + /// </summary> + public static string Mp4Behaviour_UseM4v { + get { + return ResourceManager.GetString("Mp4Behaviour_UseM4v", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Always use MP4. + /// </summary> + public static string Mp4Behaviour_UseMp4 { + get { + return ResourceManager.GetString("Mp4Behaviour_UseMp4", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to No Additional Information. /// </summary> public static string NoAdditionalInformation { @@ -2950,6 +3031,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Output Files. + /// </summary> + public static string Options_OutputFiles { + get { + return ResourceManager.GetString("Options_OutputFiles", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Path: . /// </summary> public static string Options_Path { @@ -3238,7 +3328,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to &#60; Back. + /// Looks up a localized string similar to < Back. /// </summary> public static string OptionsView_BackButton { get { @@ -3755,6 +3845,42 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Chapters. + /// </summary> + public static string PointToPointMode_Chapters { + get { + return ResourceManager.GetString("PointToPointMode_Chapters", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Frames. + /// </summary> + public static string PointToPointMode_Frames { + get { + return ResourceManager.GetString("PointToPointMode_Frames", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Preview. + /// </summary> + public static string PointToPointMode_Preview { + get { + return ResourceManager.GetString("PointToPointMode_Preview", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Seconds. + /// </summary> + public static string PointToPointMode_Seconds { + get { + return ResourceManager.GetString("PointToPointMode_Seconds", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Portable Mode: Unable to read portable.ini. There may be an error in this file. Please retry using portable.ini.template as a guide.. /// </summary> public static string Portable_IniFileError { @@ -3870,6 +3996,33 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Custom. + /// </summary> + public static string PresetPictureSettingsMode_Custom { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_Custom", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to None. + /// </summary> + public static string PresetPictureSettingsMode_None { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_None", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Always use Source Resolution. + /// </summary> + public static string PresetPictureSettingsMode_SourceMaximum { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_SourceMaximum", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to HandBrake is unable to upgrade your presets file to a new version format. ///Your preset file will be archived and new one created. You will need to re-create your own presets.. /// </summary> @@ -3956,6 +4109,51 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Above Normal. + /// </summary> + public static string ProcessPriority_AboveNormal { + get { + return ResourceManager.GetString("ProcessPriority_AboveNormal", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Below Normal. + /// </summary> + public static string ProcessPriority_BelowNormal { + get { + return ResourceManager.GetString("ProcessPriority_BelowNormal", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to High. + /// </summary> + public static string ProcessPriority_High { + get { + return ResourceManager.GetString("ProcessPriority_High", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Low. + /// </summary> + public static string ProcessPriority_Low { + get { + return ResourceManager.GetString("ProcessPriority_Low", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Normal. + /// </summary> + public static string ProcessPriority_Normal { + get { + return ResourceManager.GetString("ProcessPriority_Normal", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Question. /// </summary> public static string Question { @@ -5003,6 +5201,78 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Foreign Audio Scan. + /// </summary> + public static string Subtitle_ForeignAudioScan { + get { + return ResourceManager.GetString("Subtitle_ForeignAudioScan", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to All Matching Selected Languages. + /// </summary> + public static string SubtitleBehaviourModes_AllMatching { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_AllMatching", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to First Matching Selected Language. + /// </summary> + public static string SubtitleBehaviourModes_FirstMatching { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_FirstMatching", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to None. + /// </summary> + public static string SubtitleBehaviourModes_None { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_None", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to First Track. + /// </summary> + public static string SubtitleBurnInBehaviourModes_FirstTrack { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_FirstTrack", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Foreign Audio Preferred, else First. + /// </summary> + public static string SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Foreign Audio Track. + /// </summary> + public static string SubtitleBurnInBehaviourModes_ForeignAudioTrack { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_ForeignAudioTrack", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to None. + /// </summary> + public static string SubtitleBurnInBehaviourModes_None { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_None", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to None - Only tracks where the container does not support the format will be burned in. ///Foreign Audio Track - The Foreign Audio track will be burned in if available. ///First Track - The first track will be burned in. @@ -5172,6 +5442,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Foreign Audio Search. + /// </summary> + public static string SubtitleViewModel_ForeignAudioSearch { + get { + return ResourceManager.GetString("SubtitleViewModel_ForeignAudioSearch", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Additional Audio Tracks. /// </summary> public static string SummaryView_AdditionalAudioTracks { @@ -5380,6 +5659,24 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Monthly. + /// </summary> + public static string UpdateCheck_Monthly { + get { + return ResourceManager.GetString("UpdateCheck_Monthly", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Weekly. + /// </summary> + public static string UpdateCheck_Weekly { + get { + return ResourceManager.GetString("UpdateCheck_Weekly", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Updated. /// </summary> public static string Updated { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index f5d81335b..576f10799 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -2070,9 +2070,108 @@ Where supported, any user presets will have been imported.</value> <value>Click 'Check for Updates' to check for new versions</value>
</data>
<data name="OptionsView_BackButton" xml:space="preserve">
- <value>&#60; Back</value>
+ <value>< Back</value>
</data>
<data name="QueueView_CurrentlyPaused" xml:space="preserve">
<value>Currently Paused</value>
</data>
+ <data name="Options_OutputFiles" xml:space="preserve">
+ <value>Output Files</value>
+ </data>
+ <data name="PointToPointMode_Chapters" xml:space="preserve">
+ <value>Chapters</value>
+ </data>
+ <data name="PointToPointMode_Frames" xml:space="preserve">
+ <value>Frames</value>
+ </data>
+ <data name="PointToPointMode_Preview" xml:space="preserve">
+ <value>Preview</value>
+ </data>
+ <data name="PointToPointMode_Seconds" xml:space="preserve">
+ <value>Seconds</value>
+ </data>
+ <data name="SubtitleBehaviourModes_AllMatching" xml:space="preserve">
+ <value>All Matching Selected Languages</value>
+ </data>
+ <data name="SubtitleBehaviourModes_FirstMatching" xml:space="preserve">
+ <value>First Matching Selected Language</value>
+ </data>
+ <data name="SubtitleBehaviourModes_None" xml:space="preserve">
+ <value>None</value>
+ </data>
+ <data name="SubtitleBurnInBehaviourModes_FirstTrack" xml:space="preserve">
+ <value>First Track</value>
+ </data>
+ <data name="SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst" xml:space="preserve">
+ <value>Foreign Audio Preferred, else First</value>
+ </data>
+ <data name="SubtitleBurnInBehaviourModes_ForeignAudioTrack" xml:space="preserve">
+ <value>Foreign Audio Track</value>
+ </data>
+ <data name="SubtitleBurnInBehaviourModes_None" xml:space="preserve">
+ <value>None</value>
+ </data>
+ <data name="SubtitleViewModel_ForeignAudioSearch" xml:space="preserve">
+ <value>Foreign Audio Search</value>
+ </data>
+ <data name="Subtitle_ForeignAudioScan" xml:space="preserve">
+ <value>Foreign Audio Scan</value>
+ </data>
+ <data name="AudioBehaviourModes_AllMatching" xml:space="preserve">
+ <value>All Matching Selected Languages</value>
+ </data>
+ <data name="AudioBehaviourModes_AllTracks" xml:space="preserve">
+ <value>Use All Tracks as templates</value>
+ </data>
+ <data name="AudioBehaviourModes_FirstMatch" xml:space="preserve">
+ <value>First Matching Selected Language</value>
+ </data>
+ <data name="AudioBehaviourModes_FirstTrack" xml:space="preserve">
+ <value>Use First Track as template</value>
+ </data>
+ <data name="AudioBehaviourModes_None" xml:space="preserve">
+ <value>No Audio</value>
+ </data>
+ <data name="ChapterViewModel_Chapter" xml:space="preserve">
+ <value>Chapter {0}</value>
+ </data>
+ <data name="Mp4Behaviour_Auto" xml:space="preserve">
+ <value>Automatic</value>
+ </data>
+ <data name="Mp4Behaviour_UseM4v" xml:space="preserve">
+ <value>Always use M4V</value>
+ </data>
+ <data name="Mp4Behaviour_UseMp4" xml:space="preserve">
+ <value>Always use MP4</value>
+ </data>
+ <data name="PresetPictureSettingsMode_Custom" xml:space="preserve">
+ <value>Custom</value>
+ </data>
+ <data name="PresetPictureSettingsMode_None" xml:space="preserve">
+ <value>None</value>
+ </data>
+ <data name="PresetPictureSettingsMode_SourceMaximum" xml:space="preserve">
+ <value>Always use Source Resolution</value>
+ </data>
+ <data name="ProcessPriority_AboveNormal" xml:space="preserve">
+ <value>Above Normal</value>
+ </data>
+ <data name="ProcessPriority_BelowNormal" xml:space="preserve">
+ <value>Below Normal</value>
+ </data>
+ <data name="ProcessPriority_High" xml:space="preserve">
+ <value>High</value>
+ </data>
+ <data name="ProcessPriority_Low" xml:space="preserve">
+ <value>Low</value>
+ </data>
+ <data name="ProcessPriority_Normal" xml:space="preserve">
+ <value>Normal</value>
+ </data>
+ <data name="UpdateCheck_Monthly" xml:space="preserve">
+ <value>Monthly</value>
+ </data>
+ <data name="UpdateCheck_Weekly" xml:space="preserve">
+ <value>Weekly</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs index c68f49474..b928abfe5 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs @@ -11,24 +11,26 @@ namespace HandBrakeWPF.Services.Encode.Model.Models { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// <summary> /// Point to Point Mode /// </summary> public enum PointToPointMode { - [DisplayName("Chapters")] + [DisplayName(typeof(Resources), "PointToPointMode_Chapters")] [ShortName("chapter")] Chapters = 0, - [DisplayName("Seconds")] + [DisplayName(typeof(Resources), "PointToPointMode_Seconds")] [ShortName("time")] Seconds, - [DisplayName("Frames")] + [DisplayName(typeof(Resources), "PointToPointMode_Frames")] [ShortName("frame")] Frames, - [DisplayName("Preview")] + [DisplayName(typeof(Resources), "PointToPointMode_Preview")] [ShortName("preview")] Preview, } diff --git a/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs b/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs index 1fade0311..ff3b946a9 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.Services.Scan.Model using HandBrake.Interop.Utilities; + using HandBrakeWPF.Properties; using HandBrakeWPF.Services.Encode.Model.Models; using HandBrakeWPF.Utilities; @@ -122,7 +123,7 @@ namespace HandBrakeWPF.Services.Scan.Model /// <returns>A string formatted as: {track #} {language}</returns> public override string ToString() { - return this.SubtitleType == SubtitleType.ForeignAudioSearch ? "Foreign Audio Scan" : string.Format("{0} {1}", this.TrackNumber, this.Language); + return this.SubtitleType == SubtitleType.ForeignAudioSearch ? Resources.Subtitle_ForeignAudioScan : string.Format("{0} {1}", this.TrackNumber, this.Language); } /// <summary> diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 92832a124..9c3abc470 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -48,7 +48,7 @@ namespace HandBrakeWPF public const string PreviewScanCount = "previewScanCount";
public const string Verbosity = "Verbosity";
public const string MinScanDuration = "MinTitleScanDuration";
- public const string ProcessPriority = "ProcessPriority";
+ public const string ProcessPriorityInt = "ProcessPriorityInt";
public const string SaveLogToCopyDirectory = "SaveLogToCopyDirectory";
public const string SaveLogWithVideo = "SaveLogWithVideo";
public const string SaveLogCopyDirectory = "SaveLogCopyDirectory";
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index 30efc9200..b47b9dcee 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -348,7 +348,7 @@ namespace HandBrakeWPF.ViewModels foreach (Chapter chapter in this.SourceChapterList)
{
- string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
+ string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format(Resources.ChapterViewModel_Chapter, counter) : chapter.ChapterName;
var marker = new ChapterMarker(chapter.ChapterNumber, chapterName, chapter.Duration);
this.Chapters.Add(marker);
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 6d1ce70ce..92c9c53e5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -173,21 +173,18 @@ namespace HandBrakeWPF.ViewModels this.Drives = new BindingList<SourceMenuItem>();
// Set Process Priority
- switch (this.userSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority))
+ switch ((ProcessPriority)this.userSettingService.GetUserSetting<int>(UserSettingConstants.ProcessPriorityInt))
{
- case "Realtime":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
- break;
- case "High":
+ case ProcessPriority.High:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
break;
- case "Above Normal":
+ case ProcessPriority.AboveNormal:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;
break;
- case "Normal":
+ case ProcessPriority.Normal:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;
break;
- case "Low":
+ case ProcessPriority.Low:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;
break;
default:
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index c3d407f92..bc8c241bd 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -55,8 +55,7 @@ namespace HandBrakeWPF.ViewModels private string autonameFormat;
private bool changeToTitleCase;
private bool checkForUpdates;
- private BindingList<string> checkForUpdatesFrequencies = new BindingList<string>();
- private int checkForUpdatesFrequency;
+ private UpdateCheck checkForUpdatesFrequency;
private bool clearOldOlgs;
private BindingList<string> constantQualityGranularity = new BindingList<string>();
private bool copyLogToEncodeDirectory;
@@ -66,22 +65,19 @@ namespace HandBrakeWPF.ViewModels private BindingList<int> logVerbosityOptions = new BindingList<int>();
private long minLength;
private bool minimiseToTray;
- private BindingList<string> mp4ExtensionOptions = new BindingList<string>();
private bool preventSleep;
private BindingList<int> previewPicturesToScan = new BindingList<int>();
- private BindingList<string> priorityLevelOptions = new BindingList<string>();
private bool removeUnderscores;
private string selectedGranulairty;
- private int selectedMp4Extension;
+ private Mp4Behaviour selectedMp4Extension;
private int selectedPreviewCount;
- private string selectedPriority;
+ private ProcessPriority selectedPriority;
private int selectedVerbosity;
private bool sendFileAfterEncode;
private string sendFileTo;
private string sendFileToPath;
private string vlcPath;
private WhenDone whenDone;
- private BindingList<WhenDone> whenDoneOptions = new BindingList<WhenDone>();
private bool clearQueueOnEncodeCompleted;
private OptionsTab selectedTab;
private string updateMessage;
@@ -250,24 +246,18 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets CheckForUpdatesFrequencies.
/// </summary>
- public BindingList<string> CheckForUpdatesFrequencies
+ public BindingList<UpdateCheck> CheckForUpdatesFrequencies
{
get
{
- return this.checkForUpdatesFrequencies;
- }
-
- set
- {
- this.checkForUpdatesFrequencies = value;
- this.NotifyOfPropertyChange("CheckForUpdatesFrequencies");
+ return new BindingList<UpdateCheck>(EnumHelper<UpdateCheck>.GetEnumList().ToList());
}
}
/// <summary>
/// Gets or sets a value indicating whether CheckForUpdatesFrequency.
/// </summary>
- public int CheckForUpdatesFrequency
+ public UpdateCheck CheckForUpdatesFrequency
{
get
{
@@ -277,7 +267,7 @@ namespace HandBrakeWPF.ViewModels set
{
this.checkForUpdatesFrequency = value;
- this.NotifyOfPropertyChange("CheckForUpdatesFrequency");
+ this.NotifyOfPropertyChange(() => this.CheckForUpdatesFrequency);
}
}
@@ -585,43 +575,34 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
- /// Gets or sets Mp4ExtensionOptions.
+ /// Gets or sets a value indicating whether RemoveUnderscores.
/// </summary>
- public BindingList<string> Mp4ExtensionOptions
+ public bool RemoveUnderscores
{
get
{
- return this.mp4ExtensionOptions;
+ return this.removeUnderscores;
}
set
{
- this.mp4ExtensionOptions = value;
- this.NotifyOfPropertyChange("Mp4ExtensionOptions");
+ this.removeUnderscores = value;
+ this.NotifyOfPropertyChange("RemoveUnderscores");
}
}
- /// <summary>
- /// Gets or sets a value indicating whether RemoveUnderscores.
- /// </summary>
- public bool RemoveUnderscores
+ public BindingList<Mp4Behaviour> Mp4ExtensionOptions
{
get
{
- return this.removeUnderscores;
- }
-
- set
- {
- this.removeUnderscores = value;
- this.NotifyOfPropertyChange("RemoveUnderscores");
+ return new BindingList<Mp4Behaviour>(EnumHelper<Mp4Behaviour>.GetEnumList().ToList());
}
}
/// <summary>
/// Gets or sets SelectedMp4Extension.
/// </summary>
- public int SelectedMp4Extension
+ public Mp4Behaviour SelectedMp4Extension
{
get
{
@@ -631,7 +612,7 @@ namespace HandBrakeWPF.ViewModels set
{
this.selectedMp4Extension = value;
- this.NotifyOfPropertyChange("SelectedMp4Extension");
+ this.NotifyOfPropertyChange(() => this.SelectedMp4Extension);
}
}
@@ -851,20 +832,11 @@ namespace HandBrakeWPF.ViewModels }
}
- /// <summary>
- /// Gets or sets PriorityLevelOptions.
- /// </summary>
- public BindingList<string> PriorityLevelOptions
+ public BindingList<ProcessPriority> PriorityLevelOptions
{
get
{
- return this.priorityLevelOptions;
- }
-
- set
- {
- this.priorityLevelOptions = value;
- this.NotifyOfPropertyChange("PriorityLevelOptions");
+ return new BindingList<ProcessPriority>(EnumHelper<ProcessPriority>.GetEnumList().ToList());
}
}
@@ -888,7 +860,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets SelectedPriority.
/// </summary>
- public string SelectedPriority
+ public ProcessPriority SelectedPriority
{
get
{
@@ -903,19 +875,19 @@ namespace HandBrakeWPF.ViewModels // Set the Process Priority
switch (value)
{
- case "Realtime":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
- break;
- case "High":
+ case ProcessPriority.High:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
break;
- case "Above Normal":
+ case ProcessPriority.AboveNormal:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;
break;
- case "Normal":
+ case ProcessPriority.Normal:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;
break;
- case "Low":
+ case ProcessPriority.BelowNormal:
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
+ break;
+ case ProcessPriority.Low:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;
break;
default:
@@ -1439,18 +1411,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedLanguage = InterfaceLanguageUtilities.FindInterfaceLanguage(culture);
this.CheckForUpdates = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UpdateStatus);
-
- // Days between update checks
- this.checkForUpdatesFrequencies.Clear();
- this.checkForUpdatesFrequencies.Add("Weekly");
- this.checkForUpdatesFrequencies.Add("Monthly");
-
- this.CheckForUpdatesFrequency = this.userSettingService.GetUserSetting<int>(UserSettingConstants.DaysBetweenUpdateCheck);
- if (this.CheckForUpdatesFrequency > 1)
- {
- this.CheckForUpdatesFrequency = 1;
- }
-
+ this.CheckForUpdatesFrequency = (UpdateCheck)this.userSettingService.GetUserSetting<int>(UserSettingConstants.DaysBetweenUpdateCheck);
this.ShowStatusInTitleBar = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowStatusInTitleBar);
this.ShowPreviewOnSummaryTab = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowPreviewOnSummaryTab);
this.ShowAddAllToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddAllToQueue);
@@ -1461,16 +1422,6 @@ namespace HandBrakeWPF.ViewModels // When Done
// #############################
- // On Encode Completion Action
- this.whenDoneOptions.Clear();
- this.whenDoneOptions.Add(WhenDone.DoNothing);
- this.whenDoneOptions.Add(WhenDone.Shutdown);
- this.whenDoneOptions.Add(WhenDone.Sleep);
- this.whenDoneOptions.Add(WhenDone.Hibernate);
- this.whenDoneOptions.Add(WhenDone.LockSystem);
- this.whenDoneOptions.Add(WhenDone.LogOff);
- this.whenDoneOptions.Add(WhenDone.QuickHandBrake);
-
this.WhenDone = (WhenDone)this.userSettingService.GetUserSetting<int>(UserSettingConstants.WhenCompleteAction);
if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ResetWhenDoneAction))
{
@@ -1505,11 +1456,7 @@ namespace HandBrakeWPF.ViewModels this.AutonameFormat = this.IsValidAutonameFormat(anf, true) ? anf : "{source}-{title}";
// Use iPod/iTunes friendly .m4v extension for MP4 files.
- this.mp4ExtensionOptions.Clear();
- this.mp4ExtensionOptions.Add("Automatic");
- this.mp4ExtensionOptions.Add("Always use MP4");
- this.mp4ExtensionOptions.Add("Always use M4V");
- this.SelectedMp4Extension = this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v);
+ this.SelectedMp4Extension = (Mp4Behaviour)this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v);
// Remove Underscores
this.RemoveUnderscores = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNameRemoveUnderscore);
@@ -1550,15 +1497,7 @@ namespace HandBrakeWPF.ViewModels // #############################
// CLI
// #############################
-
- // Priority level for encodes
- this.priorityLevelOptions.Clear();
- this.priorityLevelOptions.Add("High");
- this.priorityLevelOptions.Add("Above Normal");
- this.priorityLevelOptions.Add("Normal");
- this.priorityLevelOptions.Add("Below Normal");
- this.priorityLevelOptions.Add("Low");
- this.SelectedPriority = userSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority);
+ this.SelectedPriority = (ProcessPriority)userSettingService.GetUserSetting<int>(UserSettingConstants.ProcessPriorityInt);
this.PreventSleep = userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep);
this.PauseOnLowDiskspace = userSettingService.GetUserSetting<bool>(UserSettingConstants.PauseOnLowDiskspace);
@@ -1670,7 +1609,6 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenDone, this.PlaySoundWhenDone);
this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone);
this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath);
-
/* Output Files */
this.userSettingService.SetUserSetting(UserSettingConstants.AutoNaming, this.AutomaticallyNameFiles);
@@ -1697,7 +1635,7 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.EnableNvencEncoder, this.EnableNvencEncoder);
/* System and Logging */
- this.userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ProcessPriorityInt, this.SelectedPriority);
this.userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep);
this.userSettingService.SetUserSetting(UserSettingConstants.PauseOnLowDiskspace, this.PauseOnLowDiskspace);
this.userSettingService.SetUserSetting(UserSettingConstants.PauseQueueOnLowDiskspaceLevel, this.PauseOnLowDiskspaceLevel);
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 21bd11013..7ec789905 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -72,7 +72,7 @@ namespace HandBrakeWPF.ViewModels this.Langauges = LanguageUtilities.MapLanguages().Keys;
this.CharacterCodes = CharCodesUtilities.GetCharacterCodes();
- this.foreignAudioSearchTrack = new Subtitle { SubtitleType = SubtitleType.ForeignAudioSearch, Language = "Foreign Audio Search" };
+ this.foreignAudioSearchTrack = new Subtitle { SubtitleType = SubtitleType.ForeignAudioSearch, Language = Resources.SubtitleViewModel_ForeignAudioSearch };
this.SourceTracks = new List<Subtitle> { this.foreignAudioSearchTrack };
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs index 9e070e6e7..ce4e6969b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs @@ -24,6 +24,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.EventArgs; using HandBrakeWPF.Factories; using HandBrakeWPF.Helpers; + using HandBrakeWPF.Model.Options; using HandBrakeWPF.Properties; using HandBrakeWPF.Services.Encode.Model; using HandBrakeWPF.Services.Encode.Model.Models; @@ -455,15 +456,15 @@ namespace HandBrakeWPF.ViewModels // Make sure the output extension is set correctly based on the users preferences and selection. if (newExtension == ".mp4" || newExtension == ".m4v") { - switch (this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v)) + switch ((Mp4Behaviour)this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v)) { - case 0: // Auto + case Mp4Behaviour.Auto: // Auto newExtension = MP4Helper.RequiresM4v(this.Task) ? ".m4v" : ".mp4"; break; - case 1: // MP4 + case Mp4Behaviour.MP4: // MP4 newExtension = ".mp4"; break; - case 2: // M4v + case Mp4Behaviour.M4V: // M4v newExtension = ".m4v"; break; } diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index a3ce125a5..9f489a574 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -38,7 +38,9 @@ <Options:LogLevelConverter x:Key="LogLevelConverter" />
<Options:FileSizeConverter x:Key="fileSizeConverter" />
<Converters:OptionTabConverter x:Key="optionTabConverter" />
-
+ <Options:ProcessPriorityConverter x:Key="ProcessPriorityConverter" />
+ <Options:Mp4BehaviourConverter x:Key="Mp4BehaviourConverter" />
+ <Options:UpdateCheckConverter x:Key="UpdateCheckConverter" />
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
@@ -102,7 +104,7 @@ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
<CheckBox Content="{x:Static Properties:Resources.Options_CheckForUpdates}" IsChecked="{Binding CheckForUpdates}" />
- <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>
+ <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies, Converter={StaticResource UpdateCheckConverter}}" SelectedItem="{Binding CheckForUpdatesFrequency, Converter={StaticResource UpdateCheckConverter}}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>
</StackPanel>
</StackPanel>
@@ -204,7 +206,7 @@ <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<TextBlock VerticalAlignment="Center" Text="{x:Static Properties:Resources.Options_MP4FileExtension}" />
- <ComboBox Name="mp4FileExtension" Width="120" ItemsSource="{Binding Mp4ExtensionOptions}" SelectedIndex="{Binding SelectedMp4Extension}" HorizontalAlignment="Left" />
+ <ComboBox Name="mp4FileExtension" ItemsSource="{Binding Mp4ExtensionOptions, Converter={StaticResource Mp4BehaviourConverter}}" SelectedItem="{Binding SelectedMp4Extension, Converter={StaticResource Mp4BehaviourConverter}}" Width="120" HorizontalAlignment="Left" />
</StackPanel>
</StackPanel>
@@ -367,7 +369,7 @@ </StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<TextBlock Text="{x:Static Properties:Resources.Options_PriorityLevel}" Width="250" VerticalAlignment="Center" />
- <ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions}" SelectedItem="{Binding SelectedPriority}" Width="120" />
+ <ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions, Converter={StaticResource ProcessPriorityConverter}}" SelectedItem="{Binding SelectedPriority, Converter={StaticResource ProcessPriorityConverter}}" Width="120" />
</StackPanel>
</StackPanel>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml b/win/CS/HandBrakeWPF/Views/SummaryView.xaml index 3b0f13d38..a6e5081f1 100644 --- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml +++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml @@ -23,7 +23,7 @@ <!-- Column 1 --> <Grid Grid.Column="0" MinWidth="325" MaxWidth="400" > <Grid.ColumnDefinitions> - <ColumnDefinition Width="75" /> + <ColumnDefinition Width="80" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 1efd1113a..98e40d45e 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -42,10 +42,10 @@ </item>
<item>
<key>
- <string>ProcessPriority</string>
+ <string>ProcessPriorityInt</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Below Normal</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">3</anyType>
</value>
</item>
<item>
@@ -181,7 +181,7 @@ <string>daysBetweenUpdateCheck</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">1</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
</value>
</item>
<item>
|