From c58bb79e78ada38e60c019ddc44ae628326c607a Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 19 May 2024 17:20:21 +0200 Subject: [PATCH] Add a few missing translations - thx domddol :) --- LanguageBaseEnglish.xml | 11 +++------ src/ui/Forms/GenerateVideoWithHardSubs.cs | 2 ++ .../Forms/Translate/AutoTranslateSettings.cs | 2 +- src/ui/Logic/Language.cs | 10 +++----- src/ui/Logic/LanguageDeserializer.cs | 24 +++++++------------ src/ui/Logic/LanguageStructure.cs | 8 +++---- 6 files changed, 21 insertions(+), 36 deletions(-) diff --git a/LanguageBaseEnglish.xml b/LanguageBaseEnglish.xml index 201703d07..47df9b665 100644 --- a/LanguageBaseEnglish.xml +++ b/LanguageBaseEnglish.xml @@ -18,6 +18,7 @@ Preview Show preview Hide preview + Subtitle file Subtitle files All files Video files @@ -1022,6 +1023,7 @@ We leverage the intrinsic rhythm of the image. Get end position Use source Use source resolution + Output file/folder... Generate video with added/removed embedded subtitles @@ -1061,15 +1063,7 @@ We leverage the intrinsic rhythm of the image. To: Translate Please wait... this may take a while - Powered by Google translate - Powered by Microsoft translate Powered by {0} - Sorry, you need a Cognitive Services 'Translator Text' key from Microsoft to use the latest Microsoft Translator. - -Go to "Options -> Settings -> Auto-translate" to enter your key. - Trying to translate without API key... (slow and limited data). -To use an API key, go to "Options -> Settings -> Auto-translate" to enter your Google translate API key. - Service: Line merge: Merge max two lines Merge sentences @@ -1096,6 +1090,7 @@ To use an API key, go to "Options -> Settings -> Auto-translate" to enter Delay between server calls Maximum bytes in each server call Prompt for {0} + Translate each line separately Google vs Microsoft translate diff --git a/src/ui/Forms/GenerateVideoWithHardSubs.cs b/src/ui/Forms/GenerateVideoWithHardSubs.cs index e3bb7af56..080c3f26c 100644 --- a/src/ui/Forms/GenerateVideoWithHardSubs.cs +++ b/src/ui/Forms/GenerateVideoWithHardSubs.cs @@ -89,6 +89,7 @@ namespace Nikse.SubtitleEdit.Forms checkBoxFontBold.Text = LanguageSettings.Current.General.Bold; numericUpDownOutline.Text = LanguageSettings.Current.SubStationAlphaStyles.Outline; labelSubtitleFont.Text = LanguageSettings.Current.ExportPngXml.FontFamily; + buttonOutlineColor.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.OutputSettings; buttonCancel.Text = LanguageSettings.Current.General.Cancel; labelAudioEnc.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.Encoding; labelVideoEncoding.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.Encoding; @@ -114,6 +115,7 @@ namespace Nikse.SubtitleEdit.Forms columnHeaderResolution.Text = LanguageSettings.Current.SubStationAlphaProperties.Resolution; columnHeaderSize.Text = LanguageSettings.Current.General.Size; columnHeaderStatus.Text = LanguageSettings.Current.BatchConvert.Status; + columnHeaderSubtitleFile.Text = LanguageSettings.Current.General.SubtitleFile; progressBar1.Visible = false; labelPleaseWait.Visible = false; diff --git a/src/ui/Forms/Translate/AutoTranslateSettings.cs b/src/ui/Forms/Translate/AutoTranslateSettings.cs index a3965fa90..4369f7519 100644 --- a/src/ui/Forms/Translate/AutoTranslateSettings.cs +++ b/src/ui/Forms/Translate/AutoTranslateSettings.cs @@ -78,7 +78,7 @@ namespace Nikse.SubtitleEdit.Forms.Translate comboBoxParagraphHandling.Items.Clear(); comboBoxParagraphHandling.Items.Add(LanguageSettings.Current.GenerateVideoWithEmbeddedSubs.Default); - comboBoxParagraphHandling.Items.Add("Translate each line separately"); + comboBoxParagraphHandling.Items.Add(LanguageSettings.Current.GoogleTranslate.TranslateLinesSeparately); comboBoxParagraphHandling.SelectedIndex = 0; if (Enum.TryParse(Configuration.Settings.Tools.AutoTranslateStrategy, out var ts) && ts == TranslateStrategy.TranslateEachLineSeparately) diff --git a/src/ui/Logic/Language.cs b/src/ui/Logic/Language.cs index 6e20ce573..d10d3536d 100644 --- a/src/ui/Logic/Language.cs +++ b/src/ui/Logic/Language.cs @@ -156,6 +156,7 @@ namespace Nikse.SubtitleEdit.Logic Preview = "Preview", ShowPreview = "Show preview", HidePreview = "Hide preview", + SubtitleFile = "Subtitle file", SubtitleFiles = "Subtitle files", AllFiles = "All files", VideoFiles = "Video files", @@ -1277,6 +1278,7 @@ namespace Nikse.SubtitleEdit.Logic GetEndPosition = "Get end position", UseSource = "Use source", UseSourceResolution = "Use source resolution", + OutputSettings = "Output file/folder...", }; GenerateVideoWithEmbeddedSubs = new LanguageStructure.GenerateVideoWithEmbeddedSubs @@ -1324,14 +1326,7 @@ namespace Nikse.SubtitleEdit.Logic To = "To:", Translate = "Translate", PleaseWait = "Please wait... this may take a while", - PoweredByGoogleTranslate = "Powered by Google translate", - PoweredByMicrosoftTranslate = "Powered by Microsoft translate", PoweredByX = "Powered by {0}", - MsClientSecretNeeded = "Sorry, you need a Cognitive Services 'Translator Text' key from Microsoft to use the latest Microsoft Translator." + Environment.NewLine + - Environment.NewLine + - "Go to \"Options -> Settings -> Auto-translate\" to enter your key.", - GoogleNoApiKeyWarning = "Trying to translate without API key... (slow and limited data). " + Environment.NewLine + "To use an API key, go to \"Options -> Settings -> Auto-translate\" to enter your Google translate API key.", - Service = "Service:", LineMergeHandling = "Line merge:", ProcessorMergeNext = "Merge max two lines", ProcessorSentence = "Merge sentences", @@ -1357,6 +1352,7 @@ namespace Nikse.SubtitleEdit.Logic MaxBytes = "Maximum bytes in each server call", MergeSplitStrategy = "Split/merge handling", PromptX = "Prompt for {0}", + TranslateLinesSeparately = "Translate each line separately", }; GoogleOrMicrosoftTranslate = new LanguageStructure.GoogleOrMicrosoftTranslate diff --git a/src/ui/Logic/LanguageDeserializer.cs b/src/ui/Logic/LanguageDeserializer.cs index a836ccbb4..4fda603aa 100644 --- a/src/ui/Logic/LanguageDeserializer.cs +++ b/src/ui/Logic/LanguageDeserializer.cs @@ -109,6 +109,9 @@ namespace Nikse.SubtitleEdit.Logic case "General/HidePreview": language.General.HidePreview = reader.Value; break; + case "General/SubtitleFile": + language.General.SubtitleFile = reader.Value; + break; case "General/SubtitleFiles": language.General.SubtitleFiles = reader.Value; break; @@ -2707,6 +2710,9 @@ namespace Nikse.SubtitleEdit.Logic case "GenerateVideoWithBurnedInSubs/UseSourceResolution": language.GenerateVideoWithBurnedInSubs.UseSourceResolution = reader.Value; break; + case "GenerateVideoWithBurnedInSubs/OutputSettings": + language.GenerateVideoWithBurnedInSubs.OutputSettings = reader.Value; + break; case "GenerateVideoWithEmbeddedSubs/Title": language.GenerateVideoWithEmbeddedSubs.Title = reader.Value; break; @@ -2800,24 +2806,9 @@ namespace Nikse.SubtitleEdit.Logic case "GoogleTranslate/PleaseWait": language.GoogleTranslate.PleaseWait = reader.Value; break; - case "GoogleTranslate/PoweredByGoogleTranslate": - language.GoogleTranslate.PoweredByGoogleTranslate = reader.Value; - break; - case "GoogleTranslate/PoweredByMicrosoftTranslate": - language.GoogleTranslate.PoweredByMicrosoftTranslate = reader.Value; - break; case "GoogleTranslate/PoweredByX": language.GoogleTranslate.PoweredByX = reader.Value; break; - case "GoogleTranslate/MsClientSecretNeeded": - language.GoogleTranslate.MsClientSecretNeeded = reader.Value; - break; - case "GoogleTranslate/GoogleNoApiKeyWarning": - language.GoogleTranslate.GoogleNoApiKeyWarning = reader.Value; - break; - case "GoogleTranslate/Service": - language.GoogleTranslate.Service = reader.Value; - break; case "GoogleTranslate/LineMergeHandling": language.GoogleTranslate.LineMergeHandling = reader.Value; break; @@ -2893,6 +2884,9 @@ namespace Nikse.SubtitleEdit.Logic case "GoogleTranslate/PromptX": language.GoogleTranslate.PromptX = reader.Value; break; + case "GoogleTranslate/TranslateLinesSeparately": + language.GoogleTranslate.TranslateLinesSeparately = reader.Value; + break; case "GoogleOrMicrosoftTranslate/Title": language.GoogleOrMicrosoftTranslate.Title = reader.Value; break; diff --git a/src/ui/Logic/LanguageStructure.cs b/src/ui/Logic/LanguageStructure.cs index 2b6838fa5..dc14290af 100644 --- a/src/ui/Logic/LanguageStructure.cs +++ b/src/ui/Logic/LanguageStructure.cs @@ -22,6 +22,7 @@ public string Preview { get; set; } public string ShowPreview { get; set; } public string HidePreview { get; set; } + public string SubtitleFile { get; set; } public string SubtitleFiles { get; set; } public string AllFiles { get; set; } public string VideoFiles { get; set; } @@ -1097,6 +1098,7 @@ public string GetEndPosition { get; set; } public string UseSource { get; set; } public string UseSourceResolution { get; set; } + public string OutputSettings { get; set; } } public class GenerateVideoWithEmbeddedSubs @@ -1144,12 +1146,7 @@ public string To { get; set; } public string Translate { get; set; } public string PleaseWait { get; set; } - public string PoweredByGoogleTranslate { get; set; } - public string PoweredByMicrosoftTranslate { get; set; } public string PoweredByX { get; set; } - public string MsClientSecretNeeded { get; set; } - public string GoogleNoApiKeyWarning { get; set; } - public string Service { get; set; } public string LineMergeHandling { get; set; } public string ProcessorMergeNext { get; set; } public string ProcessorSentence { get; set; } @@ -1175,6 +1172,7 @@ public string Delay { get; set; } public string MaxBytes { get; set; } public string PromptX { get; set; } + public string TranslateLinesSeparately { get; set; } } public class GoogleOrMicrosoftTranslate