diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 39bcfb22b..d8794cc94 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -26447,7 +26447,38 @@ namespace Nikse.SubtitleEdit.Forms private void ToolStripMenuItemGoogleMicrosoftTranslateSelLineClick(object sender, EventArgs e) { + int firstSelectedIndex = FirstSelectedIndex; + if (firstSelectedIndex >= 0) + { + var p = _subtitle.GetParagraphOrDefault(firstSelectedIndex); + if (p != null) + { + string defaultFromLanguage = LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitle); + if (_subtitleOriginal != null) + { + var o = Utilities.GetOriginalParagraph(firstSelectedIndex, p, _subtitleOriginal.Paragraphs); + if (o != null) + { + p = o; + defaultFromLanguage = LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitleOriginal); + } + } + Cursor = Cursors.WaitCursor; + if (_googleOrMicrosoftTranslate == null || _googleOrMicrosoftTranslate.IsDisposed) + { + _googleOrMicrosoftTranslate = new GoogleOrMicrosoftTranslate(); + _googleOrMicrosoftTranslate.InitializeFromLanguage(defaultFromLanguage); + } + + _googleOrMicrosoftTranslate.Initialize(p); + Cursor = Cursors.Default; + if (_googleOrMicrosoftTranslate.ShowDialog() == DialogResult.OK) + { + textBoxListViewText.Text = _googleOrMicrosoftTranslate.TranslatedText; + } + } + } } private void NumericUpDownSec1ValueChanged(object sender, EventArgs e) diff --git a/src/ui/Forms/Main.resx b/src/ui/Forms/Main.resx index e629369ca..8751792f7 100644 --- a/src/ui/Forms/Main.resx +++ b/src/ui/Forms/Main.resx @@ -464,75 +464,75 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAOgSURBVFhH7VddSBVBFN7+taBCsTL0zuxuqUlSEUEQFEJE - URD0UiFEEUjive7sSiFE3J4ieughECqInjK9u2gJEdSD1VsRRigi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AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAASQBKgEkASoBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -823,6 +823,6 @@ 17, 17 - 138 + 25 \ No newline at end of file diff --git a/src/ui/Forms/Styles/SubStationAlphaStyles.cs b/src/ui/Forms/Styles/SubStationAlphaStyles.cs index cc3edcf53..7669adfa1 100644 --- a/src/ui/Forms/Styles/SubStationAlphaStyles.cs +++ b/src/ui/Forms/Styles/SubStationAlphaStyles.cs @@ -1,19 +1,18 @@ -using Nikse.SubtitleEdit.Core; -using Nikse.SubtitleEdit.Core.Common; +using Nikse.SubtitleEdit.Core.Common; using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Logic; +using Nikse.SubtitleEdit.Logic.VideoPlayers; using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Drawing.Text; using System.Globalization; +using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; -using Nikse.SubtitleEdit.Logic.VideoPlayers; -using System.IO; namespace Nikse.SubtitleEdit.Forms.Styles { @@ -312,17 +311,9 @@ namespace Nikse.SubtitleEdit.Forms.Styles private void ResetHeader() { - SubtitleFormat format; - if (_isSubStationAlpha) - { - format = new SubStationAlpha(); - } - else - { - format = new AdvancedSubStationAlpha(); - } + var format = _isSubStationAlpha ? (SubtitleFormat)new SubStationAlpha() : new AdvancedSubStationAlpha(); var sub = new Subtitle(); - string text = format.ToText(sub, string.Empty); + var text = format.ToText(sub, string.Empty); var lines = text.SplitToLines(); format.LoadSubtitle(sub, lines, string.Empty); _header = sub.Header; @@ -2498,6 +2489,12 @@ namespace Nikse.SubtitleEdit.Forms.Styles _currentCategory.Styles.RemoveAt(idx); _currentCategory.Styles.Insert(idx - 1, style); } + else + { + var style = _currentFileStyles[idx]; + _currentFileStyles.RemoveAt(idx); + _currentFileStyles.Insert(idx - 1, style); + } idx--; listView.Items.Insert(idx, item); @@ -2525,6 +2522,12 @@ namespace Nikse.SubtitleEdit.Forms.Styles _currentCategory.Styles.RemoveAt(idx); _currentCategory.Styles.Insert(idx + 1, style); } + else + { + var style = _currentFileStyles[idx]; + _currentFileStyles.RemoveAt(idx); + _currentFileStyles.Insert(idx + 1, style); + } idx++; listView.Items.Insert(idx, item); @@ -2552,6 +2555,12 @@ namespace Nikse.SubtitleEdit.Forms.Styles _currentCategory.Styles.RemoveAt(idx); _currentCategory.Styles.Insert(0, style); } + else + { + var style = _currentFileStyles[idx]; + _currentFileStyles.RemoveAt(idx); + _currentFileStyles.Insert(0, style); + } idx = 0; listView.Items.Insert(idx, item); @@ -2579,6 +2588,12 @@ namespace Nikse.SubtitleEdit.Forms.Styles _currentCategory.Styles.RemoveAt(idx); _currentCategory.Styles.Add(style); } + else + { + var style = _currentFileStyles[idx]; + _currentFileStyles.RemoveAt(idx); + _currentFileStyles.Add(style); + } listView.Items.Add(item); UpdateSelectedIndices(listView); diff --git a/src/ui/Logic/AssaTagHelper.cs b/src/ui/Logic/AssaTagHelper.cs index 9002d7b53..05f58e7d0 100644 --- a/src/ui/Logic/AssaTagHelper.cs +++ b/src/ui/Logic/AssaTagHelper.cs @@ -132,11 +132,13 @@ namespace Nikse.SubtitleEdit.Logic new IntellisenseItem("{\\t()}", "Animated transform", false, "https://www.nikse.dk/SubtitleEdit/AssaOverrideTags#transform"), new IntellisenseItem("{\\t()}", "Animated transform", false, "https://www.nikse.dk/SubtitleEdit/AssaOverrideTags#transform"), - // Karaoke + // TODO: Karaoke // 2a&Haa --- fix //fix new IntellisenseItem("{\\k}", "Karaoke, delay in 100th of a second (10ms)", false), //fix new IntellisenseItem("{\\K}", "Karaoke right to left, delay in 100th of a second (10ms)", false), // Is this used? new IntellisenseItem("{\\2c&Hbbggrr&}", "Color for karaoke", true), + + // TODO: Drawing }; private static readonly List LastAddedTags = new List();