Add Czech to word lists window

This commit is contained in:
niksedk 2023-06-10 11:25:41 +02:00
parent 017cf8026e
commit 05510ff485
2 changed files with 16 additions and 2 deletions

11
Dictionaries/cs_names.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This list contains names with specific casing - and specific to Czech only -->
<names>
<name>Václav</name>
<name>Novák</name>
<name>Svoboda</name>
<name>Novotný</name>
<name>Natálie</name>
<name>Tereza</name>
<name>Eliška</name>
</names>

View File

@ -65,7 +65,9 @@ namespace Nikse.SubtitleEdit.Forms.Options
// Specific culture e.g: en-US, en-GB... // Specific culture e.g: en-US, en-GB...
foreach (var culture in CultureInfo.GetCultures(CultureTypes.SpecificCultures)) foreach (var culture in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
{ {
if (File.Exists(Path.Combine(dir, culture.Name.Replace('-', '_') + "_user.xml"))) var seFile = Path.Combine(dir, culture.Name.Replace('-', '_') + "_se.xml");
var userFile = Path.Combine(dir, culture.Name.Replace('-', '_') + "_user.xml");
if (File.Exists(seFile) || File.Exists(userFile))
{ {
if (!cultures.Contains(culture)) if (!cultures.Contains(culture))
{ {
@ -80,7 +82,8 @@ namespace Nikse.SubtitleEdit.Forms.Options
var ocrFixGeneralFile = Path.Combine(dir, culture.GetThreeLetterIsoLanguageName() + "_OCRFixReplaceList.xml"); var ocrFixGeneralFile = Path.Combine(dir, culture.GetThreeLetterIsoLanguageName() + "_OCRFixReplaceList.xml");
var ocrFixUserFile = Path.Combine(dir, culture.GetThreeLetterIsoLanguageName() + "_OCRFixReplaceList_User.xml"); var ocrFixUserFile = Path.Combine(dir, culture.GetThreeLetterIsoLanguageName() + "_OCRFixReplaceList_User.xml");
var namesFile = Path.Combine(dir, culture.TwoLetterISOLanguageName + "_names.xml"); var namesFile = Path.Combine(dir, culture.TwoLetterISOLanguageName + "_names.xml");
if (File.Exists(ocrFixGeneralFile) || File.Exists(ocrFixUserFile) || File.Exists(namesFile)) var seFile = Path.Combine(dir, culture.Name.Replace('-', '_') + "_se.xml");
if (File.Exists(ocrFixGeneralFile) || File.Exists(ocrFixUserFile) || File.Exists(namesFile) || File.Exists(seFile))
{ {
var alreadyInList = false; var alreadyInList = false;
foreach (var ci in cultures) foreach (var ci in cultures)