mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-01-31 13:01:39 +01:00
[NamesList] - Remove postfix Etc in method name.
This commit is contained in:
parent
ad91f17127
commit
91fa8d59c5
@ -244,7 +244,7 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsInNamesEtcMultiWordList(string text, string word)
|
||||
public bool IsInNamesMultiWordList(string text, string word)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
return false;
|
||||
|
@ -299,7 +299,7 @@ namespace Nikse.SubtitleEdit.Core.SpellCheck
|
||||
|
||||
public bool HasNameExtended(string word, string text)
|
||||
{
|
||||
return _namesEtcListUppercase.Contains(word) || _namesEtcListWithApostrophe.Contains(word) || _namesList.IsInNamesEtcMultiWordList(text, word);
|
||||
return _namesEtcListUppercase.Contains(word) || _namesEtcListWithApostrophe.Contains(word) || _namesList.IsInNamesMultiWordList(text, word);
|
||||
}
|
||||
|
||||
public bool HasUserWord(string word)
|
||||
|
@ -1388,7 +1388,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
if (word.Length > 2 && _namesEtcListWithApostrophe.Contains(word))
|
||||
return true;
|
||||
|
||||
if (_namesList != null && _namesList.IsInNamesEtcMultiWordList(line, word))
|
||||
if (_namesList != null && _namesList.IsInNamesMultiWordList(line, word))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -43,7 +43,7 @@ namespace Test.Logic.Dictionaries
|
||||
|
||||
// Act
|
||||
namesList.Add("Charlie Parker123");
|
||||
var exists = namesList.IsInNamesEtcMultiWordList("This is Charlie Parker123!", "Charlie Parker123");
|
||||
var exists = namesList.IsInNamesMultiWordList("This is Charlie Parker123!", "Charlie Parker123");
|
||||
|
||||
// Assert
|
||||
Assert.IsTrue(exists);
|
||||
|
Loading…
x
Reference in New Issue
Block a user