From 900dab28de4b2be81b1a39819fc0cc571e0840a1 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 11 Feb 2024 17:56:34 +0100 Subject: [PATCH 1/3] Improve Macedonia language auto detect - thx Aco :) --- src/libse/Common/LanguageAutoDetect.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/libse/Common/LanguageAutoDetect.cs b/src/libse/Common/LanguageAutoDetect.cs index e484dff14..d6eab299f 100644 --- a/src/libse/Common/LanguageAutoDetect.cs +++ b/src/libse/Common/LanguageAutoDetect.cs @@ -194,9 +194,9 @@ namespace Nikse.SubtitleEdit.Core.Common private static readonly string[] AutoDetectWordsHebrew = { - "אתה", "אולי", "הוא", "בסדר", "יודע", "טוב", "אֶת", "שֶׁל", "עַל", "הוּא", + "אתה", "אולי", "הוא", "בסדר", "יודע", "טוב", "אֶת", "שֶׁל", "עַל", "הוּא", "אֲשֶׁר", "הִיא", "הַמְלֶט", "נָסִיךְ", "הֲלֹא", "עוֹד", "אֵין", "אֲנִי", "זֹאת", "וְלֹא", - "כָּךְ", "הִנֵּה", "מְאֹד", "אֲדוֹנִי", + "כָּךְ", "הִנֵּה", "מְאֹד", "אֲדוֹנִי", }; private static readonly string[] AutoDetectWordsVietnamese = @@ -270,7 +270,8 @@ namespace Nikse.SubtitleEdit.Core.Common { "господине", "Нема", "господине", "работа", "вселената", "Може", "треба", "Треба", "слетување", "капсулата", "време", "Френдшип", "Прием", "Добро", "пресметки", "Благодарам", "нешто", "Благодарам", "орбитата", "инженер", "Харисон", "Фала", "тоалет", "орбита", "знаеме", "Супервизор", "жени", "Добра", "требаат", "што", "дeкa", "eшe", "кучe", "Руиз", "кучeто", "кучињa", "Бјути", "имa", "многу", "кучињaтa", "AДЗЖ", "Животни", "моЖe", "мaчe", - "мecто", "имaмe", "мaчињa", "пpвото", "пpaвaт", "нeшто", "колку" + "мecто", "имaмe", "мaчињa", "пpвото", "пpaвaт", "нeшто", "колку", + "што", "тоа", "дека", "Што", "Дали", "треба", "беше", "таму" }; private static readonly string[] AutoDetectWordsFinnish = @@ -530,13 +531,19 @@ namespace Nikse.SubtitleEdit.Core.Common { var bulgarianCount = GetCount(text, AutoDetectWordsBulgarian); var ukrainianCount = GetCount(text, AutoDetectWordsUkrainian); + var macedonianCount = GetCount(text, AutoDetectWordsMacedonian); if (bulgarianCount > count) { - if (ukrainianCount > bulgarianCount) + if (ukrainianCount > bulgarianCount && ukrainianCount > macedonianCount) { return "uk"; // Ukrainian } + if (macedonianCount > bulgarianCount && macedonianCount > ukrainianCount) + { + return "mk"; // Macedonian + } + return "bg"; // Bulgarian } @@ -569,6 +576,12 @@ namespace Nikse.SubtitleEdit.Core.Common count = GetCount(text, AutoDetectWordsBulgarian); if (count > bestCount) { + var macedonianCount = GetCount(text, AutoDetectWordsMacedonian); + if (macedonianCount > count) + { + return "mk"; + } + return "bg"; // Bulgarian } From dcd411a793b1d436d27deb5807702d49811ed4b0 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 11 Feb 2024 18:10:28 +0100 Subject: [PATCH 2/3] Update dictionaries --- Dictionaries/en_US_se.xml | 1 + Dictionaries/en_names.xml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Dictionaries/en_US_se.xml b/Dictionaries/en_US_se.xml index de08a79b6..181eb3fbe 100644 --- a/Dictionaries/en_US_se.xml +++ b/Dictionaries/en_US_se.xml @@ -970,4 +970,5 @@ councillor luminol scotoma + unironically \ No newline at end of file diff --git a/Dictionaries/en_names.xml b/Dictionaries/en_names.xml index 096369748..a715cd525 100644 --- a/Dictionaries/en_names.xml +++ b/Dictionaries/en_names.xml @@ -1932,4 +1932,8 @@ Damián Salamanca Vázquez + Radisson + Maddie + Hallander + McGrath \ No newline at end of file From b6892bc235607f16d252aeeaa13ab2c98672fd25 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 11 Feb 2024 18:41:04 +0100 Subject: [PATCH 3/3] Add default icon for layout - thx PaulVeld :) Fix #7899 --- src/ui/Forms/Main.Designer.cs | 19 +++++++++-------- src/ui/Forms/Main.resx | 4 ++-- src/ui/Properties/Resources.Designer.cs | 10 +++++++++ src/ui/Properties/Resources.resx | 27 +++++++++++++----------- src/ui/Resources/Layout.png | Bin 0 -> 2498 bytes src/ui/SubtitleEdit.csproj | 1 + 6 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 src/ui/Resources/Layout.png diff --git a/src/ui/Forms/Main.Designer.cs b/src/ui/Forms/Main.Designer.cs index a1f786e6d..569b2a500 100644 --- a/src/ui/Forms/Main.Designer.cs +++ b/src/ui/Forms/Main.Designer.cs @@ -349,6 +349,7 @@ namespace Nikse.SubtitleEdit.Forms this.genericTranslateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemUnbreakLines = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemAutoBreakLines = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemEvenlyDistributeLines = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemSaveSelectedLines = new System.Windows.Forms.ToolStripMenuItem(); this.typeEffectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.karaokeEffectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -576,7 +577,6 @@ namespace Nikse.SubtitleEdit.Forms this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components); this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemEvenlyDistributeLines = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -996,10 +996,11 @@ namespace Nikse.SubtitleEdit.Forms // this.toolStripButtonLayout.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonLayout.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.toolStripButtonLayout.Image = global::Nikse.SubtitleEdit.Properties.Resources.Layout; this.toolStripButtonLayout.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.toolStripButtonLayout.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonLayout.Name = "toolStripButtonLayout"; - this.toolStripButtonLayout.Size = new System.Drawing.Size(23, 37); + this.toolStripButtonLayout.Size = new System.Drawing.Size(36, 37); this.toolStripButtonLayout.Text = "Show/hide waveform"; this.toolStripButtonLayout.Click += new System.EventHandler(this.ToolStripButtonLayoutChooseClick); // @@ -3226,6 +3227,13 @@ namespace Nikse.SubtitleEdit.Forms this.toolStripMenuItemAutoBreakLines.Text = "Auto balance selected lines..."; this.toolStripMenuItemAutoBreakLines.Click += new System.EventHandler(this.ToolStripMenuItemAutoBreakLinesClick); // + // toolStripMenuItemEvenlyDistributeLines + // + this.toolStripMenuItemEvenlyDistributeLines.Name = "toolStripMenuItemEvenlyDistributeLines"; + this.toolStripMenuItemEvenlyDistributeLines.Size = new System.Drawing.Size(275, 22); + this.toolStripMenuItemEvenlyDistributeLines.Text = "Evenly distribute lines (CPS)..."; + this.toolStripMenuItemEvenlyDistributeLines.Click += new System.EventHandler(this.ToolStripMenuItemEvenlyDistributeLinesClick); + // // toolStripMenuItemSaveSelectedLines // this.toolStripMenuItemSaveSelectedLines.Name = "toolStripMenuItemSaveSelectedLines"; @@ -5847,13 +5855,6 @@ namespace Nikse.SubtitleEdit.Forms this.toolStripMenuItemShowVideoControls.Text = "Show video controls"; this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.ToolStripMenuItemShowVideoControlsClick); // - // toolStripMenuItemEvenlyDistributeLines - // - this.toolStripMenuItemEvenlyDistributeLines.Name = "toolStripMenuItemEvenlyDistributeLines"; - this.toolStripMenuItemEvenlyDistributeLines.Size = new System.Drawing.Size(275, 22); - this.toolStripMenuItemEvenlyDistributeLines.Text = "Evenly distribute lines (CPS)..."; - this.toolStripMenuItemEvenlyDistributeLines.Click += new System.EventHandler(this.ToolStripMenuItemEvenlyDistributeLinesClick); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/src/ui/Forms/Main.resx b/src/ui/Forms/Main.resx index c24bd088c..00439894c 100644 --- a/src/ui/Forms/Main.resx +++ b/src/ui/Forms/Main.resx @@ -730,9 +730,9 @@ iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhLYxjioPT6M4aKawVQHvEApAekFydIv/6bofx6 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhLYxjioPT6M4aKawVQHvEApAekFydIu/6bofx6 A5RHPADpAenFCbAZXHk1ACi2nqHi6n44BokhA5INrrpiwFBx/T9Q7DxYHILPg8VAcjBAssEgNsgQdACx - DFXdqMFgMGowlDdqMCUG0yxLgwCowEEugEAFEsWFELGAoME0K+gHP2BgAADj1Bh2gurMTQAAAABJRU5E + DFXdqMFgMGowlDdqMCUG0yxLgwCowEEugEAFEsWFELGAoME0K+gHP2BgAABpZBhW3VPvKwAAAABJRU5E rkJggg== diff --git a/src/ui/Properties/Resources.Designer.cs b/src/ui/Properties/Resources.Designer.cs index 9b17d3945..2a5c7e6f5 100644 --- a/src/ui/Properties/Resources.Designer.cs +++ b/src/ui/Properties/Resources.Designer.cs @@ -280,6 +280,16 @@ namespace Nikse.SubtitleEdit.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Layout { + get { + object obj = ResourceManager.GetObject("Layout", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/ui/Properties/Resources.resx b/src/ui/Properties/Resources.resx index 34b18653b..098d605fd 100644 --- a/src/ui/Properties/Resources.resx +++ b/src/ui/Properties/Resources.resx @@ -118,15 +118,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\L2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\L3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\L1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\webvtt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -142,6 +136,9 @@ ..\Icons\Settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\L7.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\color-picker-small2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -154,12 +151,15 @@ ..\Resources\Error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\L8.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\L2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\bookmark22dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\L11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ebu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -196,8 +196,11 @@ ..\Resources\SE.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\L7.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\L8.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\L1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Help32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -205,7 +208,7 @@ ..\Resources\Information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\L11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Layout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/src/ui/Resources/Layout.png b/src/ui/Resources/Layout.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ad93747c9a44e2a0f0b8121d86228878c44e30 GIT binary patch literal 2498 zcmbVO3se(l8XZ6ZQCfNEveqNBL#u#JX7Yd}1L2_oc{CuHE_7|TPG%+$NircbK!PB_ zx)v01TY(~?AhlZ-UmV%21wpauS_=h>N2$wVb!|lvq-wQTq}>UR)VB6}EJ^(QD zoJN_-rYc^<2wKO(Nm@nmOgaOH27u6TlL03(C>B&vX&Su@8aZ|X0yU%zN(oY+3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>DQL8n`tI9+p)7(uDn+}uz(m&sE;dovu4A$UsQg+y7lfio(=zg|8G{H z?)1HalbxMxov+c?XZ{0a!!yH98~?Cd)zs9q((}%<13l-k#(8g?CpK&-+_hd@vwV4n zpSZlBueteA%B;P;&i;qe_x4elnT7B6R&4&We2;TtlxsgPOY!Vqo7usGH8SQv-Rlrj z@tvC`p!?MC4&^_}L)?~(BOg~iANGZLR2-0mI5O?=B^SOao$vN|=3~8OPNgH(9n)IG c`?C8xtw$)(ee%dr+gDa>RD%4_^0gcP2TO#tlK=n! literal 0 HcmV?d00001 diff --git a/src/ui/SubtitleEdit.csproj b/src/ui/SubtitleEdit.csproj index e37155f06..5975ec30c 100644 --- a/src/ui/SubtitleEdit.csproj +++ b/src/ui/SubtitleEdit.csproj @@ -2597,6 +2597,7 @@ + Designer