mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Improve language auto-detect regarding serb-cy - thx Xy :)
This commit is contained in:
parent
d9505014bc
commit
ddb7fda846
@ -155,7 +155,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
private static readonly string[] AutoDetectWordsSerbianCyrillic =
|
||||
{
|
||||
"сам", "али", "није", "само", "ово", "како", "добро", "све", "тако", "ће", "могу", "ћу",
|
||||
"зашто", "нешто", "за", "шта", "овде", "бити", "чини", "учениче", "побегне", "остати"
|
||||
"зашто", "нешто", "за", "шта", "овде", "бити", "чини", "учениче", "побегне", "остати", "Један", "Назад", "Молим"
|
||||
};
|
||||
|
||||
private static readonly string[] AutoDetectWordsIndonesian = { "yang", "tahu", "bisa", "akan", "tahun", "tapi", "dengan", "untuk", "rumah", "dalam", "sudah", "bertemu" };
|
||||
@ -950,6 +950,11 @@ namespace Nikse.SubtitleEdit.Core
|
||||
return russianEncoding;
|
||||
}
|
||||
|
||||
if (GetCount(russianEncoding.GetString(buffer), AutoDetectWordsSerbianCyrillic) > buffer.Length / 1500)
|
||||
{
|
||||
return russianEncoding;
|
||||
}
|
||||
|
||||
if (GetCount(russianEncoding.GetString(buffer), "Какво", "тук", "може", "Как", "Ваше", "какво") > 5) // Bulgarian
|
||||
{
|
||||
return russianEncoding;
|
||||
@ -1094,6 +1099,11 @@ namespace Nikse.SubtitleEdit.Core
|
||||
return russianEncoding;
|
||||
}
|
||||
|
||||
if (GetCount(russianEncoding.GetString(buffer), AutoDetectWordsSerbianCyrillic) > buffer.Length / 1500)
|
||||
{
|
||||
return russianEncoding;
|
||||
}
|
||||
|
||||
if (GetCount(russianEncoding.GetString(buffer), "Какво", "тук", "може", "Как", "Ваше", "какво") > 5) // Bulgarian
|
||||
{
|
||||
return russianEncoding;
|
||||
|
Loading…
Reference in New Issue
Block a user