Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ShowStatus method private #8969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ui/Forms/FixCommonErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ public bool AllowFix(Paragraph p, string action)
return _allowedFixes.Contains(p.Number.ToString(CultureInfo.InvariantCulture) + "|" + action);
}

public void ShowStatus(string message)
private void ShowStatus(string message)
{
message = message.Replace(Environment.NewLine, " ");
if (message.Length > 103)
Expand Down Expand Up @@ -712,10 +712,10 @@ private void MakeSureNameListIsLoaded()
if (_nameList == null)
{
string languageTwoLetterCode = LanguageAutoDetect.AutoDetectGoogleLanguage(Subtitle);
// Will contains both one word names and multi names
// Will contains both one-word names and multi names
var namesList = new NameList(Configuration.DictionariesDirectory, languageTwoLetterCode, Configuration.Settings.WordLists.UseOnlineNames, Configuration.Settings.WordLists.NamesUrl);
_nameList = namesList.GetNames();
// Multi word names.
// Multi-word names.
foreach (var name in namesList.GetMultiNames())
{
_nameList.Add(name);
Expand Down Expand Up @@ -1474,7 +1474,7 @@ private void RefreshFixes()
listViewFixes.BeginUpdate();

// save de-selected fixes
var deSelectedFixes = new List<string>();
var deSelectedFixes = new HashSet<string>();
foreach (ListViewItem item in listViewFixes.Items)
{
if (!item.Checked)
Expand Down Expand Up @@ -1751,7 +1751,7 @@ private void SplitSelectedParagraph(double? splitSeconds)

string oldText = currentParagraph.Text;
var lines = currentParagraph.Text.SplitToLines();
if (lines.Count == 2 && (lines[0].EndsWith('.') || lines[0].EndsWith('!') || lines[0].EndsWith('?')))
if (lines.Count == 2 && lines[0].HasSentenceEnding())
{
currentParagraph.Text = Utilities.AutoBreakLine(lines[0], Language);
newParagraph.Text = Utilities.AutoBreakLine(lines[1], Language);
Expand Down