summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-12-29 21:06:41 +0000
committersr55 <[email protected]>2013-12-29 21:06:41 +0000
commitab24a483dcef737bcc49facd3a406b0364ab4098 (patch)
tree9131d217183d13ac3944c1c6e34c674b38fe8f97 /win/CS
parent008b3b795481e1764a1ba3e230b6aff2e018b192 (diff)
WinGui: Move a bunch of strings out to the resources file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5946 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs334
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx112
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs7
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs102
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs13
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs5
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs3
8 files changed, 516 insertions, 66 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index b3f489a54..51cf2af22 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -338,6 +338,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Are you sure?.
+ /// </summary>
+ public static string AreYouSure {
+ get {
+ return ResourceManager.GetString("AreYouSure", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Error.
/// </summary>
public static string Error {
@@ -347,6 +356,24 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to HandBrake.
+ /// </summary>
+ public static string HandBrake_Title {
+ get {
+ return ResourceManager.GetString("HandBrake_Title", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to HandBrake is already encoding..
+ /// </summary>
+ public static string Main_AlreadyEncoding {
+ get {
+ return ResourceManager.GetString("Main_AlreadyEncoding", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Warning: It is not currently possible to use this feature if you require specific subtitle or audio tracks that the automatic selection feature (see options) doesn&apos;t support! Tracks are reset with every new source / title selected..
/// </summary>
public static string Main_AutoAdd_AudioAndSubWarning {
@@ -356,6 +383,232 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Please choose a destination for the file..
+ /// </summary>
+ public static string Main_ChooseDestination {
+ get {
+ return ResourceManager.GetString("Main_ChooseDestination", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The current file already exists, do you wish to overwrite it?.
+ /// </summary>
+ public static string Main_DestinationOverwrite {
+ get {
+ return ResourceManager.GetString("Main_DestinationOverwrite", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to There are jobs on the queue with the same destination path. Please choose a different path for this job..
+ /// </summary>
+ public static string Main_DuplicateDestinationOnQueue {
+ get {
+ return ResourceManager.GetString("Main_DuplicateDestinationOnQueue", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to {0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}.
+ /// </summary>
+ public static string Main_EncodeStatusDisplay {
+ get {
+ return ResourceManager.GetString("Main_EncodeStatusDisplay", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to , Pending Jobs {5}.
+ /// </summary>
+ public static string Main_JobsPending_addon {
+ get {
+ return ResourceManager.GetString("Main_JobsPending_addon", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to New Default Preset Set: {0}.
+ /// </summary>
+ public static string Main_NewDefaultPreset {
+ get {
+ return ResourceManager.GetString("Main_NewDefaultPreset", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A New Update is Available. Goto Tools Menu &gt; Options to Install.
+ /// </summary>
+ public static string Main_NewUpdate {
+ get {
+ return ResourceManager.GetString("Main_NewUpdate", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to No Preset selected..
+ /// </summary>
+ public static string Main_NoPresetSelected {
+ get {
+ return ResourceManager.GetString("Main_NoPresetSelected", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to You can not modify built in presets. Please select one of your own presets..
+ /// </summary>
+ public static string Main_NoUpdateOfBuiltInPresets {
+ get {
+ return ResourceManager.GetString("Main_NoUpdateOfBuiltInPresets", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Please select a folder..
+ /// </summary>
+ public static string Main_PleaseSelectFolder {
+ get {
+ return ResourceManager.GetString("Main_PleaseSelectFolder", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Preparing to encode ....
+ /// </summary>
+ public static string Main_PreparingToEncode {
+ get {
+ return ResourceManager.GetString("Main_PreparingToEncode", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to You can not import a preset with the same name as a built-in preset..
+ /// </summary>
+ public static string Main_PresetErrorBuiltInName {
+ get {
+ return ResourceManager.GetString("Main_PresetErrorBuiltInName", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to This preset appears to already exist. Would you like to overwrite it?.
+ /// </summary>
+ public static string Main_PresetOverwriteWarning {
+ get {
+ return ResourceManager.GetString("Main_PresetOverwriteWarning", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Presets.
+ /// </summary>
+ public static string Main_Presets {
+ get {
+ return ResourceManager.GetString("Main_Presets", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Are you sure you wish to update the selected preset?.
+ /// </summary>
+ public static string Main_PresetUpdateConfrimation {
+ get {
+ return ResourceManager.GetString("Main_PresetUpdateConfrimation", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The Preset has now been updated with your current settings..
+ /// </summary>
+ public static string Main_PresetUpdated {
+ get {
+ return ResourceManager.GetString("Main_PresetUpdated", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to HandBrake has determined your built-in presets are out of date... These presets will now be updated.
+ ///Your custom presets have not been updated so you may have to re-create these by deleting and re-adding them..
+ /// </summary>
+ public static string Main_PresetUpdateNotification {
+ get {
+ return ResourceManager.GetString("Main_PresetUpdateNotification", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Queue Finished.
+ /// </summary>
+ public static string Main_QueueFinished {
+ get {
+ return ResourceManager.GetString("Main_QueueFinished", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scan Cancelled..
+ /// </summary>
+ public static string Main_ScanCancelled {
+ get {
+ return ResourceManager.GetString("Main_ScanCancelled", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scan Completed.
+ /// </summary>
+ public static string Main_ScanCompleted {
+ get {
+ return ResourceManager.GetString("Main_ScanCompleted", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scan failed: .
+ /// </summary>
+ public static string Main_ScanFailed_NoReason {
+ get {
+ return ResourceManager.GetString("Main_ScanFailed_NoReason", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scan Failed... See Activity Log for details..
+ /// </summary>
+ public static string Main_ScanFailled_CheckLog {
+ get {
+ return ResourceManager.GetString("Main_ScanFailled_CheckLog", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scanning source, please wait....
+ /// </summary>
+ public static string Main_ScanningPleaseWait {
+ get {
+ return ResourceManager.GetString("Main_ScanningPleaseWait", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Scanning Title {0} of {1} ({2}%).
+ /// </summary>
+ public static string Main_ScanningTitleXOfY {
+ get {
+ return ResourceManager.GetString("Main_ScanningTitleXOfY", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to You must first scan a source and setup your job before starting an encode..
+ /// </summary>
+ public static string Main_ScanSource {
+ get {
+ return ResourceManager.GetString("Main_ScanSource", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to You must first scan a source and setup your job before adding to the queue..
/// </summary>
public static string Main_ScanSourceFirst {
@@ -365,6 +618,33 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Please select a preset..
+ /// </summary>
+ public static string Main_SelectPreset {
+ get {
+ return ResourceManager.GetString("Main_SelectPreset", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Please select a preset to update..
+ /// </summary>
+ public static string Main_SelectPresetForUpdate {
+ get {
+ return ResourceManager.GetString("Main_SelectPresetForUpdate", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Select &apos;Source&apos; to continue.
+ /// </summary>
+ public static string Main_SelectSource {
+ get {
+ return ResourceManager.GetString("Main_SelectSource", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to You must turn on automatic file naming AND set a default path in preferences before you can add to the queue..
/// </summary>
public static string Main_TurnOnAutoFileNaming {
@@ -374,6 +654,33 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to {0} Encodes Pending.
+ /// </summary>
+ public static string Main_XEncodesPending {
+ get {
+ return ResourceManager.GetString("Main_XEncodesPending", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Notice.
+ /// </summary>
+ public static string Notice {
+ get {
+ return ResourceManager.GetString("Notice", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Overwrite?.
+ /// </summary>
+ public static string Overwrite {
+ get {
+ return ResourceManager.GetString("Overwrite", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to The Built-in presets have been reset..
/// </summary>
public static string Presets_ResetComplete {
@@ -392,6 +699,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Question.
+ /// </summary>
+ public static string Question {
+ get {
+ return ResourceManager.GetString("Question", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to WARNING: You do not have automatic file naming turned on. Please enable this in options..
/// </summary>
public static string QueueSelection_AutoNameWarning {
@@ -410,6 +726,24 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Read.
+ /// </summary>
+ public static string State_Ready {
+ get {
+ return ResourceManager.GetString("State_Ready", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Updated.
+ /// </summary>
+ public static string Updated {
+ get {
+ return ResourceManager.GetString("Updated", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Accelerates H.264, MPEG-4, VC1 and WMV3 only.
///This can provide a small to modest improvement on slow hardware..
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 530bedfd6..4ecd0daa9 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -377,4 +377,116 @@ In order to use the QuickSync encoder, you must:
<data name="Warning" xml:space="preserve">
<value>Warning</value>
</data>
+ <data name="AreYouSure" xml:space="preserve">
+ <value>Are you sure?</value>
+ </data>
+ <data name="HandBrake_Title" xml:space="preserve">
+ <value>HandBrake</value>
+ </data>
+ <data name="Main_AlreadyEncoding" xml:space="preserve">
+ <value>HandBrake is already encoding.</value>
+ </data>
+ <data name="Main_ChooseDestination" xml:space="preserve">
+ <value>Please choose a destination for the file.</value>
+ </data>
+ <data name="Main_DestinationOverwrite" xml:space="preserve">
+ <value>The current file already exists, do you wish to overwrite it?</value>
+ </data>
+ <data name="Main_DuplicateDestinationOnQueue" xml:space="preserve">
+ <value>There are jobs on the queue with the same destination path. Please choose a different path for this job.</value>
+ </data>
+ <data name="Main_EncodeStatusDisplay" xml:space="preserve">
+ <value>{0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}</value>
+ </data>
+ <data name="Main_JobsPending_addon" xml:space="preserve">
+ <value>, Pending Jobs {5}</value>
+ </data>
+ <data name="Main_NewDefaultPreset" xml:space="preserve">
+ <value>New Default Preset Set: {0}</value>
+ </data>
+ <data name="Main_NewUpdate" xml:space="preserve">
+ <value>A New Update is Available. Goto Tools Menu &gt; Options to Install</value>
+ </data>
+ <data name="Main_NoPresetSelected" xml:space="preserve">
+ <value>No Preset selected.</value>
+ </data>
+ <data name="Main_NoUpdateOfBuiltInPresets" xml:space="preserve">
+ <value>You can not modify built in presets. Please select one of your own presets.</value>
+ </data>
+ <data name="Main_PleaseSelectFolder" xml:space="preserve">
+ <value>Please select a folder.</value>
+ </data>
+ <data name="Main_PreparingToEncode" xml:space="preserve">
+ <value>Preparing to encode ...</value>
+ </data>
+ <data name="Main_PresetErrorBuiltInName" xml:space="preserve">
+ <value>You can not import a preset with the same name as a built-in preset.</value>
+ </data>
+ <data name="Main_PresetOverwriteWarning" xml:space="preserve">
+ <value>This preset appears to already exist. Would you like to overwrite it?</value>
+ </data>
+ <data name="Main_Presets" xml:space="preserve">
+ <value>Presets</value>
+ </data>
+ <data name="Main_PresetUpdateConfrimation" xml:space="preserve">
+ <value>Are you sure you wish to update the selected preset?</value>
+ </data>
+ <data name="Main_PresetUpdated" xml:space="preserve">
+ <value>The Preset has now been updated with your current settings.</value>
+ </data>
+ <data name="Main_PresetUpdateNotification" xml:space="preserve">
+ <value>HandBrake has determined your built-in presets are out of date... These presets will now be updated.
+Your custom presets have not been updated so you may have to re-create these by deleting and re-adding them.</value>
+ </data>
+ <data name="Main_QueueFinished" xml:space="preserve">
+ <value>Queue Finished</value>
+ </data>
+ <data name="Main_ScanCancelled" xml:space="preserve">
+ <value>Scan Cancelled.</value>
+ </data>
+ <data name="Main_ScanCompleted" xml:space="preserve">
+ <value>Scan Completed</value>
+ </data>
+ <data name="Main_ScanFailed_NoReason" xml:space="preserve">
+ <value>Scan failed: </value>
+ </data>
+ <data name="Main_ScanFailled_CheckLog" xml:space="preserve">
+ <value>Scan Failed... See Activity Log for details.</value>
+ </data>
+ <data name="Main_ScanningPleaseWait" xml:space="preserve">
+ <value>Scanning source, please wait...</value>
+ </data>
+ <data name="Main_ScanningTitleXOfY" xml:space="preserve">
+ <value>Scanning Title {0} of {1} ({2}%)</value>
+ </data>
+ <data name="Main_ScanSource" xml:space="preserve">
+ <value>You must first scan a source and setup your job before starting an encode.</value>
+ </data>
+ <data name="Main_SelectPreset" xml:space="preserve">
+ <value>Please select a preset.</value>
+ </data>
+ <data name="Main_SelectPresetForUpdate" xml:space="preserve">
+ <value>Please select a preset to update.</value>
+ </data>
+ <data name="Main_SelectSource" xml:space="preserve">
+ <value>Select 'Source' to continue</value>
+ </data>
+ <data name="Main_XEncodesPending" xml:space="preserve">
+ <value>{0} Encodes Pending</value>
+ </data>
+ <data name="Notice" xml:space="preserve">
+ <value>Notice</value>
+ </data>
+ <data name="Overwrite" xml:space="preserve">
+ <value>Overwrite?</value>
+ </data>
+ <data name="Question" xml:space="preserve">
+ <value>Question</value>
+ </data>
+ <data name="State_Ready" xml:space="preserve">
+ <value>Read</value>
+ </data>
+ <data name="Updated" xml:space="preserve">
+ <value>Updated</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
index 858f9cbda..4235a67dc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
@@ -19,6 +19,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -154,13 +155,13 @@ namespace HandBrakeWPF.ViewModels
{
if (string.IsNullOrEmpty(this.Preset.Name))
{
- this.errorService.ShowMessageBox("A Preset must have a Name. Please fill out the Preset Name field.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox("A Preset must have a Name. Please fill out the Preset Name field.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (this.presetService.CheckIfPresetExists(this.Preset.Name))
{
- MessageBoxResult result = this.errorService.ShowMessageBox("A Preset with this name already exists. Would you like to overwrite it?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Error);
+ MessageBoxResult result = this.errorService.ShowMessageBox("A Preset with this name already exists. Would you like to overwrite it?", Resources.Error, MessageBoxButton.YesNo, MessageBoxImage.Error);
if (result == MessageBoxResult.No)
{
return;
@@ -169,7 +170,7 @@ namespace HandBrakeWPF.ViewModels
if (this.SelectedPictureSettingMode == PresetPictureSettingsMode.SourceMaximum && this.selectedTitle == null)
{
- this.errorService.ShowMessageBox("You must first scan a source to use the 'Source Maximum' Option.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox("You must first scan a source to use the 'Source Maximum' Option.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs
index d27ef6694..dcaf1a7f4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs
@@ -717,7 +717,7 @@ namespace HandBrakeWPF.ViewModels
{
// if (this.queueProcessor.IsProcessing)
// {
- // this.errorService.ShowMessageBox("HandBrake is already encoding.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("HandBrake is already encoding.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
@@ -731,13 +731,13 @@ namespace HandBrakeWPF.ViewModels
//// Otherwise, perform Santiy Checking then add to the queue and start if everything is ok.
// if (this.SelectedTitle == null)
// {
- // this.errorService.ShowMessageBox("You must first scan a source.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("You must first scan a source.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
// if (string.IsNullOrEmpty(this.Destination))
// {
- // this.errorService.ShowMessageBox("The Destination field was empty.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("The Destination field was empty.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index d15fe931a..5b5b95324 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -227,7 +227,7 @@ namespace HandBrakeWPF.ViewModels
this.queueProcessor = IoC.Get<IQueueProcessor>();
// Setup Properties
- this.WindowTitle = "HandBrake";
+ this.WindowTitle = Resources.HandBrake_Title;
this.CurrentTask = new EncodeTask();
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
@@ -313,7 +313,7 @@ namespace HandBrakeWPF.ViewModels
{
get
{
- return string.IsNullOrEmpty(this.programStatusLabel) ? "Ready" : this.programStatusLabel;
+ return string.IsNullOrEmpty(this.programStatusLabel) ? Resources.State_Ready : this.programStatusLabel;
}
set
@@ -334,7 +334,7 @@ namespace HandBrakeWPF.ViewModels
{
get
{
- return string.IsNullOrEmpty(this.statusLabel) ? "Ready" : this.statusLabel;
+ return string.IsNullOrEmpty(this.statusLabel) ? Resources.State_Ready : this.statusLabel;
}
set
@@ -408,7 +408,7 @@ namespace HandBrakeWPF.ViewModels
set
{
this.scannedSource = value;
- this.NotifyOfPropertyChange("ScannedSource");
+ this.NotifyOfPropertyChange(() => ScannedSource);
}
}
@@ -425,7 +425,7 @@ namespace HandBrakeWPF.ViewModels
{
get
{
- return string.IsNullOrEmpty(this.sourceLabel) ? "Select 'Source' to continue" : this.sourceLabel;
+ return string.IsNullOrEmpty(this.sourceLabel) ? Resources.Main_SelectSource : this.sourceLabel;
}
set
@@ -433,7 +433,7 @@ namespace HandBrakeWPF.ViewModels
if (!Equals(this.sourceLabel, value))
{
this.sourceLabel = value;
- this.NotifyOfPropertyChange("SourceLabel");
+ this.NotifyOfPropertyChange(() => SourceLabel);
}
}
}
@@ -550,7 +550,7 @@ namespace HandBrakeWPF.ViewModels
set
{
duration = value;
- this.NotifyOfPropertyChange("Duration");
+ this.NotifyOfPropertyChange(() => Duration);
}
}
@@ -858,7 +858,7 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => SelectedOutputFormat);
this.NotifyOfPropertyChange(() => this.CurrentTask.OutputFormat);
this.NotifyOfPropertyChange(() => IsMkv);
- this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().Replace("av_", string.Empty).ToLower())); // TODO, tidy up
+ this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().ToLower()));
this.VideoViewModel.RefreshTask();
this.AudioViewModel.RefreshTask();
@@ -989,9 +989,8 @@ namespace HandBrakeWPF.ViewModels
this.presetService.Load();
if (this.presetService.CheckIfPresetsAreOutOfDate())
if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PresetNotification))
- this.errorService.ShowMessageBox("HandBrake has determined your built-in presets are out of date... These presets will now be updated." + Environment.NewLine +
- "Your custom presets have not been updated so you may have to re-create these by deleting and re-adding them.",
- "Preset Update", MessageBoxButton.OK, MessageBoxImage.Information);
+ this.errorService.ShowMessageBox(Resources.Main_PresetUpdateNotification,
+ Resources.Notice, MessageBoxButton.OK, MessageBoxImage.Information);
// Queue Recovery
if (!AppArguments.IsInstantHandBrake)
@@ -1132,7 +1131,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.ScannedSource == null || string.IsNullOrEmpty(this.ScannedSource.ScanPath) || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox("You must first scan a source and setup your job before adding to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1143,12 +1142,12 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- this.errorService.ShowMessageBox("There are jobs on the queue with the same destination path. Please choose a different path for this job.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ this.errorService.ShowMessageBox(Resources.Main_DuplicateDestinationOnQueue, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
if (!this.IsEncoding)
{
- this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.Count);
+ this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);
}
}
@@ -1188,13 +1187,13 @@ namespace HandBrakeWPF.ViewModels
{
if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox("You must first scan a source and setup your job before adding to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (!AutoNameHelper.IsAutonamingEnabled())
{
- this.errorService.ShowMessageBox("You must turn on automatic file naming in preferences before you can add to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_TurnOnAutoFileNaming, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1225,7 +1224,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void FolderScan()
{
- VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog { Description = "Please select a folder.", UseDescriptionForTitle = true };
+ VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog { Description = Resources.Main_PleaseSelectFolder, UseDescriptionForTitle = true };
dialog.ShowDialog();
ShowSourceSelection = false;
@@ -1261,7 +1260,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.queueProcessor.IsProcessing)
{
- this.errorService.ShowMessageBox("HandBrake is already encoding.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_AlreadyEncoding, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1275,19 +1274,19 @@ namespace HandBrakeWPF.ViewModels
// Otherwise, perform Santiy Checking then add to the queue and start if everything is ok.
if (this.SelectedTitle == null)
{
- this.errorService.ShowMessageBox("You must first scan a source.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (string.IsNullOrEmpty(this.Destination))
{
- this.errorService.ShowMessageBox("The Destination field was empty.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ChooseDestination, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (File.Exists(this.Destination))
{
- MessageBoxResult result = this.errorService.ShowMessageBox("The current file already exists, do you wish to overwrite it?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ MessageBoxResult result = this.errorService.ShowMessageBox(Resources.Main_DestinationOverwrite, Resources.Question, MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.No)
{
return;
@@ -1475,7 +1474,7 @@ namespace HandBrakeWPF.ViewModels
if (this.SelectedPreset == null)
{
this.errorService.ShowMessageBox(
- "Please select a preset to update.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Main_SelectPresetForUpdate, Resources.Main_NoPresetSelected, MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
@@ -1483,17 +1482,17 @@ namespace HandBrakeWPF.ViewModels
if (this.SelectedPreset.IsBuildIn)
{
this.errorService.ShowMessageBox(
- "You can not modify built in presets. Please select one of your own presets.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Main_NoUpdateOfBuiltInPresets, Resources.Main_NoPresetSelected, MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
- if (this.errorService.ShowMessageBox("Are you sure you wish to update the selected preset?", "Are you sure?", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+ if (this.errorService.ShowMessageBox(Resources.Main_PresetUpdateConfrimation, Resources.AreYouSure, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
this.SelectedPreset.Task = new EncodeTask(this.CurrentTask);
this.presetService.Update(this.SelectedPreset);
this.errorService.ShowMessageBox(
- "The Preset has now been updated with your current settings.", "Preset Updated", MessageBoxButton.OK, MessageBoxImage.Information);
+ Resources.Main_PresetUpdated, Resources.Updated, MessageBoxButton.OK, MessageBoxImage.Information);
}
}
@@ -1508,7 +1507,7 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1520,11 +1519,11 @@ namespace HandBrakeWPF.ViewModels
if (this.selectedPreset != null)
{
this.presetService.SetDefault(this.selectedPreset);
- MessageBox.Show(string.Format("New Default Preset Set: {0}", this.selectedPreset.Name), "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(string.Format(Resources.Main_NewDefaultPreset, this.selectedPreset.Name), Resources.Main_Presets, MessageBoxButton.OK, MessageBoxImage.Information);
}
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1547,8 +1546,8 @@ namespace HandBrakeWPF.ViewModels
if (!presetService.CanUpdatePreset(preset.Name))
{
MessageBox.Show(
- "You can not import a preset with the same name as a built-in preset.",
- "Error",
+ Resources.Main_PresetErrorBuiltInName,
+ Resources.Error,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
@@ -1556,8 +1555,8 @@ namespace HandBrakeWPF.ViewModels
MessageBoxResult result =
MessageBox.Show(
- "This preset appears to already exist. Would you like to overwrite it?",
- "Overwrite preset?",
+ Resources.Main_PresetOverwriteWarning,
+ Resources.Overwrite,
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
@@ -1603,7 +1602,7 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1613,7 +1612,7 @@ namespace HandBrakeWPF.ViewModels
public void PresetReset()
{
this.presetService.UpdateBuiltInPresets();
- this.NotifyOfPropertyChange("Presets");
+ this.NotifyOfPropertyChange(() => this.Presets);
this.SelectedPreset = this.presetService.DefaultPreset;
this.errorService.ShowMessageBox(Resources.Presets_ResetComplete, Resources.Presets_ResetHeader, MessageBoxButton.OK, MessageBoxImage.Information);
}
@@ -1699,7 +1698,7 @@ namespace HandBrakeWPF.ViewModels
// Cleanup
this.ShowStatusWindow = false;
this.SourceLabel = this.SourceName;
- this.StatusLabel = "Scan Completed";
+ this.StatusLabel = Resources.Main_ScanCompleted;
});
}
@@ -1804,7 +1803,7 @@ namespace HandBrakeWPF.ViewModels
{
if (information.NewVersionAvailable)
{
- this.ProgramStatusLabel = "A New Update is Available. Goto Tools Menu > Options to Install";
+ this.ProgramStatusLabel = Resources.Main_NewUpdate;
}
}
@@ -1822,8 +1821,8 @@ namespace HandBrakeWPF.ViewModels
/// </param>
private void ScanStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs e)
{
- this.SourceLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
- this.StatusLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
+ this.SourceLabel = string.Format(Resources.Main_ScanningTitleXOfY, e.CurrentTitle, e.Titles, e.Percentage);
+ this.StatusLabel = string.Format(Resources.Main_ScanningTitleXOfY, e.CurrentTitle, e.Titles, e.Percentage);
}
/// <summary>
@@ -1852,21 +1851,22 @@ namespace HandBrakeWPF.ViewModels
if (e.Successful)
{
this.SourceLabel = this.SourceName;
- this.StatusLabel = "Scan Completed";
+ this.StatusLabel = Resources.Main_ScanCompleted;
}
else if (e.Cancelled)
{
- this.SourceLabel = "Scan Cancelled.";
- this.StatusLabel = "Scan Cancelled.";
+ this.SourceLabel = Resources.Main_ScanCancelled;
+ this.StatusLabel = Resources.Main_ScanCancelled;
}
else if (e.Exception == null && e.ErrorInformation != null)
{
- this.SourceLabel = "Scan failed: " + e.ErrorInformation;
- this.StatusLabel = "Scan failed: " + e.ErrorInformation;
+ this.SourceLabel = Resources.Main_ScanFailed_NoReason + e.ErrorInformation;
+ this.StatusLabel = Resources.Main_ScanFailed_NoReason + e.ErrorInformation;
}
else
{
- this.SourceLabel = "Scan Failed... See Activity Log for details."; this.StatusLabel = "Scan Failed... See Activity Log for details.";
+ this.SourceLabel = Resources.Main_ScanFailled_CheckLog;
+ this.StatusLabel = Resources.Main_ScanFailled_CheckLog;
}
});
}
@@ -1885,7 +1885,7 @@ namespace HandBrakeWPF.ViewModels
Execute.OnUIThread(
() =>
{
- this.StatusLabel = "Scanning source, please wait...";
+ this.StatusLabel = Resources.Main_ScanningPleaseWait;
this.ShowStatusWindow = true;
});
}
@@ -1914,12 +1914,12 @@ namespace HandBrakeWPF.ViewModels
string josPending = string.Empty;
if (!AppArguments.IsInstantHandBrake)
{
- josPending = ", Pending Jobs {5}";
+ josPending = Resources.Main_JobsPending_addon;
}
this.ProgramStatusLabel =
string.Format(
- "{0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}" + josPending,
+ Resources.Main_EncodeStatusDisplay + josPending,
e.PercentComplete,
e.CurrentFrameRate,
e.AverageFrameRate,
@@ -1938,7 +1938,7 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- this.ProgramStatusLabel = "Queue Finished";
+ this.ProgramStatusLabel = Resources.Main_QueueFinished;
this.IsEncoding = false;
if (this.windowsSeven.IsWindowsSeven)
@@ -1963,7 +1963,7 @@ namespace HandBrakeWPF.ViewModels
Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = "Preparing to encode ...";
+ this.ProgramStatusLabel = Resources.Main_PreparingToEncode;
this.IsEncoding = true;
});
}
@@ -1984,7 +1984,7 @@ namespace HandBrakeWPF.ViewModels
Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = "Queue Finished";
+ this.ProgramStatusLabel = Resources.Main_QueueFinished;
this.IsEncoding = false;
if (this.windowsSeven.IsWindowsSeven)
@@ -2008,7 +2008,7 @@ namespace HandBrakeWPF.ViewModels
Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.Count);
+ this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);
});
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
index 5c0913a37..b398a1b5c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
@@ -23,6 +23,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Factories;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -85,7 +86,7 @@ namespace HandBrakeWPF.ViewModels
public PreviewViewModel(IErrorService errorService, IUserSettingService userSettingService)
{
// Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point
- this.encodeService = new EncodeServiceWrapper(userSettingService);
+ this.encodeService = new EncodeServiceWrapper(userSettingService);
this.errorService = errorService;
this.userSettingService = userSettingService;
@@ -262,13 +263,13 @@ namespace HandBrakeWPF.ViewModels
{
this.IsEncoding = false;
this.errorService.ShowMessageBox("Unable to delete previous preview file. You may need to restart the application.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
}
if (this.Task == null || string.IsNullOrEmpty(Task.Source))
{
this.errorService.ShowMessageBox("You must first scan a source and setup your encode before creating a perview.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -348,7 +349,7 @@ namespace HandBrakeWPF.ViewModels
else
{
this.errorService.ShowMessageBox("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\")",
- "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -362,7 +363,7 @@ namespace HandBrakeWPF.ViewModels
else
{
this.errorService.ShowMessageBox("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
}
@@ -379,7 +380,7 @@ namespace HandBrakeWPF.ViewModels
if (encodeService.IsEncoding)
{
this.errorService.ShowMessageBox("Handbrake is already encoding a video! Only one file can be encoded at any one time.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index 3347cfddd..c7ddac82c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -19,6 +19,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -259,7 +260,7 @@ namespace HandBrakeWPF.ViewModels
MessageBoxResult result =
this.errorService.ShowMessageBox(
"This encode is currently in progress. If you delete it, the encode will be stopped. Are you sure you wish to proceed?",
- "Warning",
+ Resources.Warning,
MessageBoxButton.YesNo,
MessageBoxImage.Question);
@@ -296,7 +297,7 @@ namespace HandBrakeWPF.ViewModels
if (this.queueProcessor.Count == 0)
{
this.errorService.ShowMessageBox(
- "There are no pending jobs.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ "There are no pending jobs.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
index 162898f68..d933a6afb 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
@@ -16,6 +16,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -198,7 +199,7 @@ namespace HandBrakeWPF.ViewModels
MessageBoxResult result =
errorService.ShowMessageBox(
"An Encode is currently running. Exiting HandBrake will stop this encode.\nAre you sure you wish to continue?",
- "Warning",
+ Resources.Warning,
MessageBoxButton.YesNo,
MessageBoxImage.Warning);