More work on Find/Replace

This commit is contained in:
niksedk 2023-04-16 20:46:02 +02:00
parent 5c824f5855
commit 5fb8a93418
9 changed files with 116 additions and 50 deletions

View File

@ -47,7 +47,12 @@ namespace Nikse.SubtitleEdit.Forms
{ {
get get
{ {
var result = new ReplaceType(); var result = new ReplaceType
{
SearchOriginal = true,
SearchTranslation = true
};
if (radioButtonNormal.Checked) if (radioButtonNormal.Checked)
{ {
result.FindType = FindType.Normal; result.FindType = FindType.Normal;
@ -136,12 +141,12 @@ namespace Nikse.SubtitleEdit.Forms
else if (radioButtonNormal.Checked) else if (radioButtonNormal.Checked)
{ {
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
_findAndReplaceMethods.FindDialogFind(FindText); _findAndReplaceMethods.FindDialogFind(FindText, FindReplaceType);
} }
else if (radioButtonCaseSensitive.Checked) else if (radioButtonCaseSensitive.Checked)
{ {
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
_findAndReplaceMethods.FindDialogFind(FindText); _findAndReplaceMethods.FindDialogFind(FindText, FindReplaceType);
} }
else if (radioButtonRegEx.Checked) else if (radioButtonRegEx.Checked)
{ {
@ -149,7 +154,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
_regEx = new Regex(RegexUtils.FixNewLine(searchText), RegexOptions.Compiled, TimeSpan.FromSeconds(5)); _regEx = new Regex(RegexUtils.FixNewLine(searchText), RegexOptions.Compiled, TimeSpan.FromSeconds(5));
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
_findAndReplaceMethods.FindDialogFind(FindText); _findAndReplaceMethods.FindDialogFind(FindText, FindReplaceType);
} }
catch (Exception exception) catch (Exception exception)
{ {

View File

@ -6246,6 +6246,8 @@ namespace Nikse.SubtitleEdit.Forms
if (_findHelper != null) if (_findHelper != null)
{ {
_findHelper.InProgress = false; _findHelper.InProgress = false;
_findHelper.MatchInOriginal = false;
_findHelper.SelectedPosition = -1;
} }
Focus(); Focus();
@ -6259,11 +6261,16 @@ namespace Nikse.SubtitleEdit.Forms
FindPrevious(); FindPrevious();
} }
public void FindDialogFind(string findText) public void FindDialogFind(string findText, ReplaceType findReplaceType)
{ {
_findHelper = _findHelper ?? _findDialog.GetFindDialogHelper(_subtitleListViewIndex); _findHelper = _findHelper ?? _findDialog.GetFindDialogHelper(_subtitleListViewIndex);
_findHelper.FindText = findText; _findHelper.FindText = findText;
_findHelper.FindTextLength = findText.Length; _findHelper.FindTextLength = findText.Length;
_findHelper.FindReplaceType = findReplaceType;
if (findReplaceType.FindType == FindType.RegEx)
{
}
DialogFind(_findHelper); DialogFind(_findHelper);
} }
@ -6471,8 +6478,24 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
public void ReplaceDialogFind() public void ReplaceDialogFind(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
_findHelper = findReplaceDialogHelper;
if (_findHelper != null)
{
if (_findHelper.SelectedLineIndex != _subtitleListViewIndex)
{
_findHelper.SelectedLineIndex = _subtitleListViewIndex;
_findHelper.SelectedPosition = -1;
_findHelper.MatchInOriginal = false;
_findHelper.ReplaceFromPosition = 0;
}
DialogFind(_findHelper);
return;
}
DialogFind(_replaceDialog.GetFindDialogHelper(_subtitleListViewIndex)); DialogFind(_replaceDialog.GetFindDialogHelper(_subtitleListViewIndex));
} }
@ -6507,6 +6530,11 @@ namespace Nikse.SubtitleEdit.Forms
if (found) if (found)
{ {
SelectListViewIndexAndEnsureVisible(_findHelper.SelectedLineIndex); SelectListViewIndexAndEnsureVisible(_findHelper.SelectedLineIndex);
textBoxListViewText.SelectionStart = 0;
textBoxListViewText.SelectionLength = 0;
textBoxListViewTextOriginal.SelectionStart = 0;
textBoxListViewTextOriginal.SelectionLength = 0;
tb.SelectionLength = 0;
tb.Focus(); tb.Focus();
tb.SelectionStart = _findHelper.SelectedPosition; tb.SelectionStart = _findHelper.SelectedPosition;
tb.SelectionLength = _findHelper.FindTextLength; tb.SelectionLength = _findHelper.FindTextLength;
@ -6534,7 +6562,7 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
public void ReplaceDialogReplace() public void ReplaceDialogReplace(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
if (InListView) if (InListView)
{ {
@ -6589,6 +6617,10 @@ namespace Nikse.SubtitleEdit.Forms
if (_findHelper.FindNext(_subtitle, _subtitleOriginal, _findHelper.SelectedLineIndex, _findHelper.SelectedPosition, Configuration.Settings.General.AllowEditOfOriginalSubtitle)) if (_findHelper.FindNext(_subtitle, _subtitleOriginal, _findHelper.SelectedLineIndex, _findHelper.SelectedPosition, Configuration.Settings.General.AllowEditOfOriginalSubtitle))
{ {
SelectListViewIndexAndEnsureVisible(_findHelper.SelectedLineIndex); SelectListViewIndexAndEnsureVisible(_findHelper.SelectedLineIndex);
textBoxListViewText.SelectionStart = 0;
textBoxListViewText.SelectionLength = 0;
textBoxListViewTextOriginal.SelectionStart = 0;
textBoxListViewTextOriginal.SelectionLength = 0;
tb = GetFindReplaceTextBox(); tb = GetFindReplaceTextBox();
tb.Focus(); tb.Focus();
tb.SelectionStart = _findHelper.SelectedPosition; tb.SelectionStart = _findHelper.SelectedPosition;
@ -6702,7 +6734,7 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
public void ReplaceDialogReplaceAll() public void ReplaceDialogReplaceAll(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
_findHelper = _replaceDialog.GetFindDialogHelper(_subtitleListViewIndex); _findHelper = _replaceDialog.GetFindDialogHelper(_subtitleListViewIndex);
ShowStatus(string.Format(_language.SearchingForXFromLineY, _findHelper.FindText, _subtitleListViewIndex + 1)); ShowStatus(string.Format(_language.SearchingForXFromLineY, _findHelper.FindText, _subtitleListViewIndex + 1));
@ -6724,6 +6756,13 @@ namespace Nikse.SubtitleEdit.Forms
RestartHistory(); RestartHistory();
} }
if (_findHelper != null)
{
_findHelper.InProgress = false;
_findHelper.MatchInOriginal = false;
_findHelper.SelectedPosition = -1;
}
Focus(); Focus();
} }

View File

@ -26,6 +26,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml; using System.Xml;
using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Forms.Ocr namespace Nikse.SubtitleEdit.Forms.Ocr
{ {
@ -9783,11 +9784,12 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
Configuration.Settings.Tools.OcrGoogleCloudVisionSeHandlesTextMerge = checkBoxSeHandlesTextMerge.Checked; Configuration.Settings.Tools.OcrGoogleCloudVisionSeHandlesTextMerge = checkBoxSeHandlesTextMerge.Checked;
} }
public void FindDialogFind(string findText) public void FindDialogFind(string findText, ReplaceType findReplaceType)
{ {
_findHelper = _findHelper ?? _findDialog.GetFindDialogHelper(_selectedIndex); _findHelper = _findHelper ?? _findDialog.GetFindDialogHelper(_selectedIndex);
_findHelper.FindText = findText; _findHelper.FindText = findText;
_findHelper.FindTextLength = findText.Length; _findHelper.FindTextLength = findText.Length;
_findHelper.FindReplaceType = findReplaceType;
_findHelper.InProgress = true; _findHelper.InProgress = true;
if (!string.IsNullOrWhiteSpace(_findHelper.FindText)) if (!string.IsNullOrWhiteSpace(_findHelper.FindText))
{ {
@ -9875,17 +9877,17 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
_findHelper.InProgress = false; _findHelper.InProgress = false;
} }
public void ReplaceDialogFind() public void ReplaceDialogFind(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void ReplaceDialogReplace() public void ReplaceDialogReplace(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void ReplaceDialogReplaceAll() public void ReplaceDialogReplaceAll(FindReplaceDialogHelper findReplaceDialogHelper)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -50,7 +50,7 @@
this.radioButtonRegEx.Location = new System.Drawing.Point(15, 235); this.radioButtonRegEx.Location = new System.Drawing.Point(15, 235);
this.radioButtonRegEx.Name = "radioButtonRegEx"; this.radioButtonRegEx.Name = "radioButtonRegEx";
this.radioButtonRegEx.Size = new System.Drawing.Size(56, 17); this.radioButtonRegEx.Size = new System.Drawing.Size(56, 17);
this.radioButtonRegEx.TabIndex = 5; this.radioButtonRegEx.TabIndex = 70;
this.radioButtonRegEx.Text = "RegEx"; this.radioButtonRegEx.Text = "RegEx";
this.radioButtonRegEx.UseVisualStyleBackColor = true; this.radioButtonRegEx.UseVisualStyleBackColor = true;
this.radioButtonRegEx.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged); this.radioButtonRegEx.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
@ -62,7 +62,7 @@
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(15, 212); this.radioButtonCaseSensitive.Location = new System.Drawing.Point(15, 212);
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive"; this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
this.radioButtonCaseSensitive.Size = new System.Drawing.Size(94, 17); this.radioButtonCaseSensitive.Size = new System.Drawing.Size(94, 17);
this.radioButtonCaseSensitive.TabIndex = 4; this.radioButtonCaseSensitive.TabIndex = 60;
this.radioButtonCaseSensitive.Text = "Case sensitive"; this.radioButtonCaseSensitive.Text = "Case sensitive";
this.radioButtonCaseSensitive.UseVisualStyleBackColor = true; this.radioButtonCaseSensitive.UseVisualStyleBackColor = true;
this.radioButtonCaseSensitive.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged); this.radioButtonCaseSensitive.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
@ -75,7 +75,7 @@
this.radioButtonNormal.Location = new System.Drawing.Point(15, 189); this.radioButtonNormal.Location = new System.Drawing.Point(15, 189);
this.radioButtonNormal.Name = "radioButtonNormal"; this.radioButtonNormal.Name = "radioButtonNormal";
this.radioButtonNormal.Size = new System.Drawing.Size(58, 17); this.radioButtonNormal.Size = new System.Drawing.Size(58, 17);
this.radioButtonNormal.TabIndex = 3; this.radioButtonNormal.TabIndex = 50;
this.radioButtonNormal.TabStop = true; this.radioButtonNormal.TabStop = true;
this.radioButtonNormal.Text = "Normal"; this.radioButtonNormal.Text = "Normal";
this.radioButtonNormal.UseVisualStyleBackColor = true; this.radioButtonNormal.UseVisualStyleBackColor = true;
@ -87,7 +87,7 @@
this.buttonReplace.Location = new System.Drawing.Point(266, 54); this.buttonReplace.Location = new System.Drawing.Point(266, 54);
this.buttonReplace.Name = "buttonReplace"; this.buttonReplace.Name = "buttonReplace";
this.buttonReplace.Size = new System.Drawing.Size(119, 23); this.buttonReplace.Size = new System.Drawing.Size(119, 23);
this.buttonReplace.TabIndex = 7; this.buttonReplace.TabIndex = 88;
this.buttonReplace.Text = "Replace"; this.buttonReplace.Text = "Replace";
this.buttonReplace.UseVisualStyleBackColor = true; this.buttonReplace.UseVisualStyleBackColor = true;
this.buttonReplace.Click += new System.EventHandler(this.ButtonReplaceClick); this.buttonReplace.Click += new System.EventHandler(this.ButtonReplaceClick);
@ -107,7 +107,7 @@
this.buttonReplaceAll.Location = new System.Drawing.Point(266, 83); this.buttonReplaceAll.Location = new System.Drawing.Point(266, 83);
this.buttonReplaceAll.Name = "buttonReplaceAll"; this.buttonReplaceAll.Name = "buttonReplaceAll";
this.buttonReplaceAll.Size = new System.Drawing.Size(119, 23); this.buttonReplaceAll.Size = new System.Drawing.Size(119, 23);
this.buttonReplaceAll.TabIndex = 8; this.buttonReplaceAll.TabIndex = 92;
this.buttonReplaceAll.Text = "Replace all"; this.buttonReplaceAll.Text = "Replace all";
this.buttonReplaceAll.UseVisualStyleBackColor = true; this.buttonReplaceAll.UseVisualStyleBackColor = true;
this.buttonReplaceAll.Click += new System.EventHandler(this.ButtonReplaceAllClick); this.buttonReplaceAll.Click += new System.EventHandler(this.ButtonReplaceAllClick);
@ -117,7 +117,7 @@
this.textBoxReplace.Location = new System.Drawing.Point(15, 71); this.textBoxReplace.Location = new System.Drawing.Point(15, 71);
this.textBoxReplace.Name = "textBoxReplace"; this.textBoxReplace.Name = "textBoxReplace";
this.textBoxReplace.Size = new System.Drawing.Size(232, 21); this.textBoxReplace.Size = new System.Drawing.Size(232, 21);
this.textBoxReplace.TabIndex = 1; this.textBoxReplace.TabIndex = 10;
this.textBoxReplace.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown); this.textBoxReplace.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown);
// //
// labelReplaceWith // labelReplaceWith
@ -144,7 +144,7 @@
this.buttonFind.Location = new System.Drawing.Point(266, 25); this.buttonFind.Location = new System.Drawing.Point(266, 25);
this.buttonFind.Name = "buttonFind"; this.buttonFind.Name = "buttonFind";
this.buttonFind.Size = new System.Drawing.Size(119, 23); this.buttonFind.Size = new System.Drawing.Size(119, 23);
this.buttonFind.TabIndex = 6; this.buttonFind.TabIndex = 80;
this.buttonFind.Text = "Find"; this.buttonFind.Text = "Find";
this.buttonFind.UseVisualStyleBackColor = true; this.buttonFind.UseVisualStyleBackColor = true;
this.buttonFind.Click += new System.EventHandler(this.ButtonFindClick); this.buttonFind.Click += new System.EventHandler(this.ButtonFindClick);
@ -156,7 +156,7 @@
this.checkBoxWholeWord.Location = new System.Drawing.Point(15, 159); this.checkBoxWholeWord.Location = new System.Drawing.Point(15, 159);
this.checkBoxWholeWord.Name = "checkBoxWholeWord"; this.checkBoxWholeWord.Name = "checkBoxWholeWord";
this.checkBoxWholeWord.Size = new System.Drawing.Size(83, 17); this.checkBoxWholeWord.Size = new System.Drawing.Size(83, 17);
this.checkBoxWholeWord.TabIndex = 2; this.checkBoxWholeWord.TabIndex = 30;
this.checkBoxWholeWord.Text = "Whole word"; this.checkBoxWholeWord.Text = "Whole word";
this.checkBoxWholeWord.UseVisualStyleBackColor = true; this.checkBoxWholeWord.UseVisualStyleBackColor = true;
// //
@ -167,7 +167,7 @@
this.comboBoxFindReplaceIn.Location = new System.Drawing.Point(15, 120); this.comboBoxFindReplaceIn.Location = new System.Drawing.Point(15, 120);
this.comboBoxFindReplaceIn.Name = "comboBoxFindReplaceIn"; this.comboBoxFindReplaceIn.Name = "comboBoxFindReplaceIn";
this.comboBoxFindReplaceIn.Size = new System.Drawing.Size(232, 21); this.comboBoxFindReplaceIn.Size = new System.Drawing.Size(232, 21);
this.comboBoxFindReplaceIn.TabIndex = 15; this.comboBoxFindReplaceIn.TabIndex = 20;
// //
// labelFindReplaceIn // labelFindReplaceIn
// //

View File

@ -45,9 +45,9 @@ namespace Nikse.SubtitleEdit.Forms
_findNextShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditFindNext); _findNextShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditFindNext);
comboBoxFindReplaceIn.Items.Clear(); comboBoxFindReplaceIn.Items.Clear();
comboBoxFindReplaceIn.Items.Add("Translation and original"); comboBoxFindReplaceIn.Items.Add(LanguageSettings.Current.ReplaceDialog.TranslationAndOriginal);
comboBoxFindReplaceIn.Items.Add("Translation only"); comboBoxFindReplaceIn.Items.Add(LanguageSettings.Current.ReplaceDialog.TranslationOnly);
comboBoxFindReplaceIn.Items.Add("Original only"); comboBoxFindReplaceIn.Items.Add(LanguageSettings.Current.ReplaceDialog.OriginalOnly);
comboBoxFindReplaceIn.SelectedIndex = 0; comboBoxFindReplaceIn.SelectedIndex = 0;
} }
@ -79,6 +79,7 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxFindReplaceIn.SelectedIndex == 1; comboBoxFindReplaceIn.SelectedIndex == 1;
result.WholeWord = checkBoxWholeWord.Checked; result.WholeWord = checkBoxWholeWord.Checked;
return result; return result;
} }
@ -150,8 +151,8 @@ namespace Nikse.SubtitleEdit.Forms
Validate(textBoxFind.Text); Validate(textBoxFind.Text);
if (DialogResult == DialogResult.OK) if (DialogResult == DialogResult.OK)
{ {
var findType = GetFindType(); UpdateFindHelper();
_findAndReplaceMethods.ReplaceDialogReplace(); _findAndReplaceMethods.ReplaceDialogReplace(_findHelper);
} }
buttonReplace.Focus(); buttonReplace.Focus();
@ -165,8 +166,8 @@ namespace Nikse.SubtitleEdit.Forms
Validate(textBoxFind.Text); Validate(textBoxFind.Text);
if (DialogResult == DialogResult.OK) if (DialogResult == DialogResult.OK)
{ {
var findType = GetFindType(); UpdateFindHelper();
_findAndReplaceMethods.ReplaceDialogReplaceAll(); _findAndReplaceMethods.ReplaceDialogReplaceAll(_findHelper);
} }
buttonReplaceAll.Focus(); buttonReplaceAll.Focus();
@ -216,27 +217,36 @@ namespace Nikse.SubtitleEdit.Forms
_findHelper.ReplaceFromPosition++; _findHelper.ReplaceFromPosition++;
} }
UpdateFindHelper();
ReplaceAll = false; ReplaceAll = false;
FindOnly = true; FindOnly = true;
Validate(textBoxFind.Text); Validate(textBoxFind.Text);
if (DialogResult == DialogResult.OK) if (DialogResult == DialogResult.OK)
{ {
var findType = GetFindType(); _findAndReplaceMethods.ReplaceDialogFind(_findHelper);
_findAndReplaceMethods.ReplaceDialogFind();
} }
} }
private void UpdateFindHelper()
{
if (_findHelper == null)
{
return;
}
_findHelper.FindReplaceType = GetFindType();
_findHelper.FindText = textBoxFind.Text;
_findHelper.FindTextLength = textBoxFind.Text.Length;
}
private void RadioButtonCheckedChanged(object sender, EventArgs e) private void RadioButtonCheckedChanged(object sender, EventArgs e)
{ {
if (sender == radioButtonRegEx) textBoxFind.ContextMenuStrip = sender == radioButtonRegEx
{ ? FindReplaceDialogHelper.GetRegExContextMenu(textBoxFind)
textBoxFind.ContextMenuStrip = FindReplaceDialogHelper.GetRegExContextMenu(textBoxFind); : null;
}
else
{
textBoxFind.ContextMenuStrip = null;
}
checkBoxWholeWord.Enabled = !radioButtonRegEx.Checked; checkBoxWholeWord.Enabled = !radioButtonRegEx.Checked;
} }

View File

@ -89,6 +89,7 @@ namespace Nikse.SubtitleEdit.Logic
Match match; Match match;
try try
{ {
_regEx = new Regex(FindText, RegexOptions.None, TimeSpan.FromSeconds(5));
match = _regEx.Match(text, startIndex); match = _regEx.Match(text, startIndex);
} }
catch (RegexMatchTimeoutException exception) catch (RegexMatchTimeoutException exception)
@ -131,6 +132,7 @@ namespace Nikse.SubtitleEdit.Logic
if (!first) if (!first)
{ {
position = 0; position = 0;
MatchInOriginal = false;
} }
int pos; int pos;
@ -147,11 +149,11 @@ namespace Nikse.SubtitleEdit.Logic
return true; return true;
} }
position = 0; position = 0;
}
if (index < subtitle.Paragraphs.Count - 1) if (index < subtitle.Paragraphs.Count - 1)
{ {
MatchInOriginal = false; MatchInOriginal = false;
}
} }
if (originalSubtitle != null && allowEditOfOriginalSubtitle && FindReplaceType.SearchOriginal) if (originalSubtitle != null && allowEditOfOriginalSubtitle && FindReplaceType.SearchOriginal)
@ -171,8 +173,10 @@ namespace Nikse.SubtitleEdit.Logic
} }
} }
} }
first = false; first = false;
} }
index++; index++;
} }
@ -182,8 +186,6 @@ namespace Nikse.SubtitleEdit.Logic
public bool FindPrevious(Subtitle subtitle, Subtitle originalSubtitle, int startIndex, int position, bool allowEditOfOriginalSubtitle) public bool FindPrevious(Subtitle subtitle, Subtitle originalSubtitle, int startIndex, int position, bool allowEditOfOriginalSubtitle)
{ {
//TODO: us whole word //TODO: us whole word
Success = false; Success = false;
var index = startIndex; var index = startIndex;
var first = true; var first = true;

View File

@ -1,14 +1,16 @@
namespace Nikse.SubtitleEdit.Logic using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Logic
{ {
public interface IFindAndReplace public interface IFindAndReplace
{ {
void FindDialogFind(string findText); void FindDialogFind(string findText, ReplaceType findReplaceType);
void FindDialogFindPrevious(string findText); void FindDialogFindPrevious(string findText);
void FindDialogClose(); void FindDialogClose();
void ReplaceDialogFind(); void ReplaceDialogFind(FindReplaceDialogHelper findReplaceDialogHelper);
void ReplaceDialogReplace(); void ReplaceDialogReplace(FindReplaceDialogHelper findReplaceDialogHelper);
void ReplaceDialogReplaceAll(); void ReplaceDialogReplaceAll(FindReplaceDialogHelper findReplaceDialogHelper);
void ReplaceDialogClose(); void ReplaceDialogClose();
} }
} }

View File

@ -2425,6 +2425,9 @@ can edit in same subtitle file (collaboration)",
Find = "&Find", Find = "&Find",
Replace = "&Replace", Replace = "&Replace",
ReplaceAll = "Replace &all", ReplaceAll = "Replace &all",
TranslationAndOriginal = "Translation and original",
TranslationOnly = "Translation only",
OriginalOnly = "Original only",
}; };
RestoreAutoBackup = new LanguageStructure.RestoreAutoBackup RestoreAutoBackup = new LanguageStructure.RestoreAutoBackup

View File

@ -2272,6 +2272,9 @@ namespace Nikse.SubtitleEdit.Logic
public string Find { get; set; } public string Find { get; set; }
public string Replace { get; set; } public string Replace { get; set; }
public string ReplaceAll { get; set; } public string ReplaceAll { get; set; }
public string TranslationAndOriginal { get; set; }
public string TranslationOnly { get; set; }
public string OriginalOnly { get; set; }
} }
public class RestoreAutoBackup public class RestoreAutoBackup