diff --git a/LanguageMaster.xml b/LanguageMaster.xml index 423d743ca..4bf93c539 100644 --- a/LanguageMaster.xml +++ b/LanguageMaster.xml @@ -758,6 +758,7 @@ Go to "Options -> Settings -> Tools" to enter your Google translate API ke Text files Preview - subtitles modified: {0} Time codes + Split at end chars Interjections @@ -2016,8 +2017,6 @@ can edit in same subtitle file (collaboration) Selection to uppercase Toggle auto duration Auto break text - Auto break text early after ",.?!:'" at - % of max. length Unbreak text Save all Misc. diff --git a/libse/Language.cs b/libse/Language.cs index 25d974401..84eeae224 100644 --- a/libse/Language.cs +++ b/libse/Language.cs @@ -967,6 +967,7 @@ namespace Nikse.SubtitleEdit.Core TextFiles = "Text files", PreviewLinesModifiedX = "Preview - subtitles modified: {0}", TimeCodes = "Time codes", + SplitAtEndChars = "Split at end chars" }; Interjections = new LanguageStructure.Interjections @@ -2306,8 +2307,6 @@ can edit in same subtitle file (collaboration)", MainTextBoxSelectionToUpper = "Selection to uppercase", MainTextBoxToggleAutoDuration = "Toggle auto duration", MainTextBoxAutoBreak = "Auto break text", - MainTextBoxAutoBreakEarly1 = "Auto break text early after \",.?!:'\" at", - MainTextBoxAutoBreakEarly2 = "% of max. length", MainTextBoxUnbreak = "Unbreak text", MainFileSaveAll = "Save all", Miscellaneous = "Misc.", diff --git a/libse/LanguageDeserializer.cs b/libse/LanguageDeserializer.cs index 81013cfe4..f13ec0405 100644 --- a/libse/LanguageDeserializer.cs +++ b/libse/LanguageDeserializer.cs @@ -1981,6 +1981,9 @@ namespace Nikse.SubtitleEdit.Core case "ImportText/TimeCodes": language.ImportText.TimeCodes = reader.Value; break; + case "ImportText/SplitAtEndChars": + language.ImportText.SplitAtEndChars = reader.Value; + break; case "Interjections/Title": language.Interjections.Title = reader.Value; break; @@ -5473,12 +5476,6 @@ namespace Nikse.SubtitleEdit.Core case "Settings/MainTextBoxAutoBreak": language.Settings.MainTextBoxAutoBreak = reader.Value; break; - case "Settings/MainTextBoxAutoBreakEarly1": - language.Settings.MainTextBoxAutoBreakEarly1 = reader.Value; - break; - case "Settings/MainTextBoxAutoBreakEarly2": - language.Settings.MainTextBoxAutoBreakEarly2 = reader.Value; - break; case "Settings/MainTextBoxUnbreak": language.Settings.MainTextBoxUnbreak = reader.Value; break; diff --git a/libse/LanguageStructure.cs b/libse/LanguageStructure.cs index 42e9dcf98..3bd518b44 100644 --- a/libse/LanguageStructure.cs +++ b/libse/LanguageStructure.cs @@ -836,6 +836,7 @@ public string TextFiles { get; set; } public string PreviewLinesModifiedX { get; set; } public string TimeCodes { get; set; } + public string SplitAtEndChars { get; set; } } public class Interjections @@ -2181,8 +2182,6 @@ public string MainTextBoxSelectionToUpper { get; set; } public string MainTextBoxToggleAutoDuration { get; set; } public string MainTextBoxAutoBreak { get; set; } - public string MainTextBoxAutoBreakEarly1 { get; set; } - public string MainTextBoxAutoBreakEarly2 { get; set; } public string MainTextBoxUnbreak { get; set; } public string MainFileSaveAll { get; set; } public string Miscellaneous { get; set; } diff --git a/libse/Utilities.cs b/libse/Utilities.cs index de15337fd..871ad2cde 100644 --- a/libse/Utilities.cs +++ b/libse/Utilities.cs @@ -661,7 +661,7 @@ namespace Nikse.SubtitleEdit.Core { var lines = text.SplitToLines(); if (lines.Count == 1) - return text; + return lines[0]; var singleLine = string.Join(" ", lines); while (singleLine.Contains(" ")) diff --git a/src/Forms/ImportText.Designer.cs b/src/Forms/ImportText.Designer.cs index 01adc12a3..821c94fa1 100644 --- a/src/Forms/ImportText.Designer.cs +++ b/src/Forms/ImportText.Designer.cs @@ -50,6 +50,7 @@ this.labelAutoSplitNumberOfLines = new System.Windows.Forms.Label(); this.checkBoxAutoBreak = new System.Windows.Forms.CheckBox(); this.checkBoxGenerateTimeCodes = new System.Windows.Forms.CheckBox(); + this.buttonRefresh = new System.Windows.Forms.Button(); this.groupBoxTimeCodes = new System.Windows.Forms.GroupBox(); this.labelGapBetweenSubtitles = new System.Windows.Forms.Label(); this.numericUpDownGapBetweenLines = new System.Windows.Forms.NumericUpDown(); @@ -57,7 +58,6 @@ this.numericUpDownDurationFixed = new System.Windows.Forms.NumericUpDown(); this.radioButtonDurationFixed = new System.Windows.Forms.RadioButton(); this.radioButtonDurationAuto = new System.Windows.Forms.RadioButton(); - this.buttonRefresh = new System.Windows.Forms.Button(); this.checkBoxMergeShortLines = new System.Windows.Forms.CheckBox(); this.checkBoxRemoveLinesWithoutLetters = new System.Windows.Forms.CheckBox(); this.groupBoxSplitting = new System.Windows.Forms.GroupBox(); @@ -69,12 +69,12 @@ this.radioButtonLineMode = new System.Windows.Forms.RadioButton(); this.checkBoxRemoveEmptyLines = new System.Windows.Forms.CheckBox(); this.groupBoxImportResult = new System.Windows.Forms.GroupBox(); - this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView(); this.contextMenuStripPreview = new System.Windows.Forms.ContextMenuStrip(this.components); this.startNumberingFromToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); + this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView(); this.groupBoxImportText.SuspendLayout(); this.contextMenuStripListView.SuspendLayout(); this.groupBoxImportOptions.SuspendLayout(); @@ -96,7 +96,7 @@ this.buttonOpenText.Location = new System.Drawing.Point(475, 19); this.buttonOpenText.Name = "buttonOpenText"; this.buttonOpenText.Size = new System.Drawing.Size(143, 21); - this.buttonOpenText.TabIndex = 0; + this.buttonOpenText.TabIndex = 4; this.buttonOpenText.Text = "Open file..."; this.buttonOpenText.UseVisualStyleBackColor = true; this.buttonOpenText.Click += new System.EventHandler(this.ButtonOpenTextClick); @@ -123,7 +123,7 @@ this.checkBoxMultipleFiles.Location = new System.Drawing.Point(271, 22); this.checkBoxMultipleFiles.Name = "checkBoxMultipleFiles"; this.checkBoxMultipleFiles.Size = new System.Drawing.Size(198, 17); - this.checkBoxMultipleFiles.TabIndex = 5; + this.checkBoxMultipleFiles.TabIndex = 2; this.checkBoxMultipleFiles.Text = "Multiple files - one file is one subtitle"; this.checkBoxMultipleFiles.UseVisualStyleBackColor = true; this.checkBoxMultipleFiles.CheckedChanged += new System.EventHandler(this.checkBoxMultipleFiles_CheckedChanged); @@ -220,7 +220,7 @@ this.groupBoxAutoSplitSettings.Location = new System.Drawing.Point(6, 91); this.groupBoxAutoSplitSettings.Name = "groupBoxAutoSplitSettings"; this.groupBoxAutoSplitSettings.Size = new System.Drawing.Size(390, 153); - this.groupBoxAutoSplitSettings.TabIndex = 6; + this.groupBoxAutoSplitSettings.TabIndex = 1; this.groupBoxAutoSplitSettings.TabStop = false; this.groupBoxAutoSplitSettings.Text = "Auto split text settings"; // @@ -232,7 +232,7 @@ this.checkBoxAutoSplitAtEnd.Location = new System.Drawing.Point(6, 119); this.checkBoxAutoSplitAtEnd.Name = "checkBoxAutoSplitAtEnd"; this.checkBoxAutoSplitAtEnd.Size = new System.Drawing.Size(109, 17); - this.checkBoxAutoSplitAtEnd.TabIndex = 41; + this.checkBoxAutoSplitAtEnd.TabIndex = 50; this.checkBoxAutoSplitAtEnd.Text = "Split at end chars"; this.checkBoxAutoSplitAtEnd.UseVisualStyleBackColor = true; this.checkBoxAutoSplitAtEnd.CheckedChanged += new System.EventHandler(this.checkBoxAutoSplitAtEnd_CheckedChanged); @@ -275,7 +275,7 @@ this.textBoxAsEnd.MaxLength = 5; this.textBoxAsEnd.Name = "textBoxAsEnd"; this.textBoxAsEnd.Size = new System.Drawing.Size(50, 21); - this.textBoxAsEnd.TabIndex = 16; + this.textBoxAsEnd.TabIndex = 51; this.textBoxAsEnd.TextChanged += new System.EventHandler(this.textBoxAsEnd1_TextChanged); this.textBoxAsEnd.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxAsEnd1_KeyPress); // @@ -359,12 +359,22 @@ this.checkBoxGenerateTimeCodes.UseVisualStyleBackColor = true; this.checkBoxGenerateTimeCodes.CheckedChanged += new System.EventHandler(this.checkBoxGenerateTimeCodes_CheckedChanged); // + // buttonRefresh + // + this.buttonRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRefresh.Location = new System.Drawing.Point(774, 735); + this.buttonRefresh.Name = "buttonRefresh"; + this.buttonRefresh.Size = new System.Drawing.Size(102, 21); + this.buttonRefresh.TabIndex = 103; + this.buttonRefresh.Text = "Refresh"; + this.buttonRefresh.UseVisualStyleBackColor = true; + this.buttonRefresh.Click += new System.EventHandler(this.ButtonRefreshClick); + // // groupBoxTimeCodes // this.groupBoxTimeCodes.Controls.Add(this.labelGapBetweenSubtitles); this.groupBoxTimeCodes.Controls.Add(this.numericUpDownGapBetweenLines); this.groupBoxTimeCodes.Controls.Add(this.groupBoxDuration); - this.groupBoxTimeCodes.Controls.Add(this.buttonRefresh); this.groupBoxTimeCodes.Enabled = false; this.groupBoxTimeCodes.Location = new System.Drawing.Point(6, 273); this.groupBoxTimeCodes.Name = "groupBoxTimeCodes"; @@ -454,17 +464,6 @@ this.radioButtonDurationAuto.UseVisualStyleBackColor = true; this.radioButtonDurationAuto.CheckedChanged += new System.EventHandler(this.RadioButtonDurationAutoCheckedChanged); // - // buttonRefresh - // - this.buttonRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonRefresh.Location = new System.Drawing.Point(282, 96); - this.buttonRefresh.Name = "buttonRefresh"; - this.buttonRefresh.Size = new System.Drawing.Size(102, 21); - this.buttonRefresh.TabIndex = 6; - this.buttonRefresh.Text = "Refresh"; - this.buttonRefresh.UseVisualStyleBackColor = true; - this.buttonRefresh.Click += new System.EventHandler(this.ButtonRefreshClick); - // // checkBoxMergeShortLines // this.checkBoxMergeShortLines.AutoSize = true; @@ -602,6 +601,48 @@ this.groupBoxImportResult.TabStop = false; this.groupBoxImportResult.Text = "Preview"; // + // contextMenuStripPreview + // + this.contextMenuStripPreview.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.startNumberingFromToolStripMenuItem}); + this.contextMenuStripPreview.Name = "contextMenuStripPreview"; + this.contextMenuStripPreview.Size = new System.Drawing.Size(199, 26); + // + // startNumberingFromToolStripMenuItem + // + this.startNumberingFromToolStripMenuItem.Name = "startNumberingFromToolStripMenuItem"; + this.startNumberingFromToolStripMenuItem.Size = new System.Drawing.Size(198, 22); + this.startNumberingFromToolStripMenuItem.Text = "Start numbering from..."; + this.startNumberingFromToolStripMenuItem.Click += new System.EventHandler(this.startNumberingFromToolStripMenuItem_Click); + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonCancel.Location = new System.Drawing.Point(963, 735); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 21); + this.buttonCancel.TabIndex = 105; + this.buttonCancel.Text = "C&ancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonOK.Location = new System.Drawing.Point(882, 735); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 21); + this.buttonOK.TabIndex = 104; + this.buttonOK.Text = "&Next >"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick); + // // SubtitleListview1 // this.SubtitleListview1.AllowColumnReorder = true; @@ -629,54 +670,13 @@ this.SubtitleListview1.UseSyntaxColoring = true; this.SubtitleListview1.View = System.Windows.Forms.View.Details; // - // contextMenuStripPreview - // - this.contextMenuStripPreview.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.startNumberingFromToolStripMenuItem}); - this.contextMenuStripPreview.Name = "contextMenuStripPreview"; - this.contextMenuStripPreview.Size = new System.Drawing.Size(199, 26); - // - // startNumberingFromToolStripMenuItem - // - this.startNumberingFromToolStripMenuItem.Name = "startNumberingFromToolStripMenuItem"; - this.startNumberingFromToolStripMenuItem.Size = new System.Drawing.Size(198, 22); - this.startNumberingFromToolStripMenuItem.Text = "Start numbering from..."; - this.startNumberingFromToolStripMenuItem.Click += new System.EventHandler(this.startNumberingFromToolStripMenuItem_Click); - // - // openFileDialog1 - // - this.openFileDialog1.FileName = "openFileDialog1"; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonCancel.Location = new System.Drawing.Point(963, 735); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 21); - this.buttonCancel.TabIndex = 4; - this.buttonCancel.Text = "C&ancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonOK.Location = new System.Drawing.Point(882, 735); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 21); - this.buttonOK.TabIndex = 3; - this.buttonOK.Text = "&Next >"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick); - // // ImportText // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1056, 772); this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonRefresh); this.Controls.Add(this.buttonOK); this.Controls.Add(this.groupBoxImportResult); this.Controls.Add(this.groupBoxImportOptions); diff --git a/src/Forms/ImportText.cs b/src/Forms/ImportText.cs index d64408326..065d7e184 100644 --- a/src/Forms/ImportText.cs +++ b/src/Forms/ImportText.cs @@ -93,7 +93,13 @@ namespace Nikse.SubtitleEdit.Forms checkBoxAutoBreak.Checked = Configuration.Settings.Tools.ImportTextAutoBreak; textBoxAsEnd.Text = Configuration.Settings.Tools.ImportTextAutoBreakAtEndMarkerText.Replace(" ", string.Empty); checkBoxAutoSplitAtEnd.Checked = Configuration.Settings.Tools.ImportTextAutoBreakAtEnd; + checkBoxAutoSplitAtEnd.Text = Configuration.Settings.Language.ImportText.SplitAtEndChars; + textBoxAsEnd.Left = checkBoxAutoSplitAtEnd.Left + checkBoxAutoSplitAtEnd.Width; + checkBoxAutoSplitAtBlankLines.Text = Configuration.Settings.Language.ImportText.SplitAtBlankLines; + groupBoxAutoSplitSettings.Text = Configuration.Settings.Language.Settings.Title; + labelSubMaxLen.Text = Configuration.Settings.Language.Settings.MaximumLines; + numericUpDownSubtitleLineMaximumLength.Left = labelSubMaxLen.Left + labelSubMaxLen.Width + 3; numericUpDownSubtitleLineMaximumLength.Value = Configuration.Settings.General.SubtitleLineMaximumLength; if (Configuration.Settings.Tools.ImportTextAutoSplitNumberOfLines >= numericUpDownAutoSplitMaxLines.Minimum && @@ -211,15 +217,9 @@ namespace Nikse.SubtitleEdit.Forms { groupBoxAutoSplitSettings.Visible = true; groupBoxAutoSplitSettings.BringToFront(); - checkBoxMergeShortLines.Enabled = false; checkBoxRemoveEmptyLines.Enabled = false; - checkBoxAutoBreak.Enabled = true; - checkBoxAutoBreak.Text = Configuration.Settings.Language.Settings.MainTextBoxAutoBreakEarly1; - //numericUpDownAutoBreakPercent.Left = checkBoxAutoBreak.Left + checkBoxAutoBreak.Width + 2; - //labelAutoBreakPercent2.Text = Configuration.Settings.Language.Settings.MainTextBoxAutoBreakEarly2; - //labelAutoBreakPercent2.Left = numericUpDownAutoBreakPercent.Left + numericUpDownAutoBreakPercent.Width + 2; } if (_refreshTimer.Enabled) diff --git a/src/Languages/da-DK.xml b/src/Languages/da-DK.xml index 0a6695fdb..63a2c0805 100644 --- a/src/Languages/da-DK.xml +++ b/src/Languages/da-DK.xml @@ -5,8 +5,7 @@ 3.5.7 Oversat til dansk af Nikse (mailto:nikse.dk@gmail.com) da-DK - - + &OK &Fortryd Anvend @@ -185,6 +184,10 @@ Bemærk: Kontroller ledig diskplads. Fejl Konverteret Indstillinger + Fix RTL + Fix RTL via Unicode tags + Fjern RTL unicode tags + Ombyt RTL start/slut Split lange linjer Auto-balancer linjer Scan mappe... @@ -551,6 +554,7 @@ Bemærk: Kontroller ledig diskplads. Fjernede tom linje Fjernede tom linje øverst Fjernede tom linje i bunden + Fjernede tom linje i midten Fjern tomme linjer/ubrugte linjeskift Tomme linjer fjernet: {0} Ret overlappende visningstider @@ -684,6 +688,13 @@ Bemærk: Kontroller ledig diskplads. Vent venligst... dette kan tage et stykke tid Powered by Google Translate Powered by Microsoft Bing Translate + Der kræver en Bing "client secret" from Microsoft for at benytte Bing Translate. + +Go to "Indstillinger -> Indstillinger -> Værktøj" for at indtaste din Bing "client secret". + Sorry, you need an API key from Google to use the latest Google Translate. + +Go to "Indstillinger -> Indstillinger -> Værktøj" for at indtaste din Google translate API nøgle. + Forsøger at oversætte uden API nøgle... (langsomt/begrænser/risiko for fejl) Google vs Microsoft oversætter @@ -730,6 +741,7 @@ Bemærk: Kontroller ledig diskplads. Opdeling Auto split tekst En linje er en undertekst + To linjer er en undertekst Linjeskift Split ved blanke linjer Flet kort linjer med fortsættelsen @@ -916,6 +928,7 @@ Bemærk: Kontroller ledig diskplads. Advanced Sub Station Alpha egenskaber... Sub Station Alpha egenskaber... EBU egenskaber... + DVD Studio Pro egenskaber... PAC egenskaber... Åbn original undertekst (oversætter mode)... Gem original @@ -1133,6 +1146,7 @@ Bemærk: Kontroller ledig diskplads. Flet med linjen efter Normal Understregning + Boks Farve... Font navn... Justering... @@ -1871,6 +1885,7 @@ kan redigere i samme undertekst fil (fælles online projekt) Alt Shift Key + Listevistning og tekstboks Listevisning Tekstboks Opdater @@ -1905,6 +1920,15 @@ kan redigere i samme undertekst fil (fælles online projekt) Toggle dialog tankestreger Skift musik symboler Justering (valgte linier) + Justering bund venstre left - {\an1} + Justering bund midt - {\an2} + Justering bund højre - {\an3} + Justering midt venstre - {\an4} + Justering midt midt - {\an5} + Justering midt højre - {\an6} + Justering top venstre - {\an7} + Justering top midt - {\an8} + Justering top højre- {\an9} Kopier kun tekst til klippe-bord (valgte linier) Kopier tekst fra original Auto-varighed (valgte linjer) @@ -1988,6 +2012,8 @@ kan redigere i samme undertekst fil (fælles online projekt) Markering til store bogstaver Toggle auto varighed Auto-ombryd tekst + + Fjern linjeskift Gem alle Diverse @@ -1995,7 +2021,6 @@ kan redigere i samme undertekst fil (fælles online projekt) Benyt skift-ikke-efter-liste (for auto-ombrydning) Microsoft Bing Translator Sådan tilmelder du dig - Google oversæt url Nøgle Bemærk: Disse skrifttypeindstillinger er kun til undertekst Rediger brugergrænsefladen. Indstilling af en skrifttype til en undertekst udføres normalt i videospiller, men det kan også gøres ved brug af et undertekstformat med indbygget skriftinformation som f.eks. @@ -2328,6 +2353,8 @@ Indstilling af en skrifttype til en undertekst udføres normalt i videospiller, Kassér ændringer i OCR? Ønsker du at kassere ændringer i nuværende OCR-session? Min. linje højde (split) + Falder tilbage til {0} + Billede pre-processering... VobSub - Manual billede til tekst