Skip to content

Commit

Permalink
Remove obsolete types
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Dec 15, 2024
1 parent 9f41adf commit ff874de
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 372 deletions.
24 changes: 0 additions & 24 deletions JL.Core/Dicts/DictType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,9 @@ public enum DictType
[Description("Pitch Accent Dictionary (Yomichan)")] PitchAccentYomichan,
[Description("Nonspecific Dictionary (Yomichan)")] NonspecificYomichan,

[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Kenkyuusha (Yomichan)")] Kenkyuusha,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Daijisen (Yomichan)")] Daijisen,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Daijirin (Yomichan)")] Daijirin,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Koujien (Yomichan)")] Koujien,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Meikyou (Yomichan)")] Meikyou,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Gakken (Yomichan)")] Gakken,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Kotowaza (Yomichan)")] Kotowaza,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Iwanami (Yomichan)")] IwanamiYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Jitsuyou (Yomichan)")] JitsuyouYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Shinmeikai (Yomichan)")] ShinmeikaiYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Nikkoku (Yomichan)")] NikkokuYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Shinjirin (Yomichan)")] ShinjirinYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Oubunsha (Yomichan)")] OubunshaYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Zokugo (Yomichan)")] ZokugoYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Weblio Kogo (Yomichan)")] WeblioKogoYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Gakken Yojijukugo (Yomichan)")] GakkenYojijukugoYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Shinmeikai Yojijukugo (Yomichan)")] ShinmeikaiYojijukugoYomichan,
[Obsolete("Will be replaced by NonspecificWordYomichan")][Description("Kirei Cake (Yomichan)")] KireiCakeYomichan,
[Obsolete("Will be replaced by NonspecificKanjiWithWordSchemaYomichan")][Description("Kanjigen (Yomichan)")] KanjigenYomichan,

// Nazeka Epwing Converter
[Description("Word Dictionary (Nazeka)")] NonspecificWordNazeka,
[Description("Kanji Dictionary (Nazeka)")] NonspecificKanjiNazeka,
[Description("Name Dictionary (Nazeka)")] NonspecificNameNazeka,
[Description("Nonspecific Dictionary (Nazeka)")] NonspecificNazeka,

[Obsolete("Will be replaced by NonspecificWordNazeka")][Description("Kenkyuusha (Nazeka)")] KenkyuushaNazeka,
[Obsolete("Will be replaced by NonspecificWordNazeka")][Description("Daijirin (Nazeka)")] DaijirinNazeka,
[Obsolete("Will be replaced by NonspecificWordNazeka")][Description("Shinmeikai (Nazeka)")] ShinmeikaiNazeka
}
91 changes: 0 additions & 91 deletions JL.Core/Dicts/DictUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1253,32 +1253,6 @@ dict.Type is DictType.CustomNameDictionary

break;

#pragma warning disable CS0618 // Type or member is obsolete
case DictType.Kenkyuusha:
case DictType.Daijisen:
case DictType.Daijirin:
case DictType.Koujien:
case DictType.Meikyou:
case DictType.Gakken:
case DictType.Kotowaza:
case DictType.IwanamiYomichan:
case DictType.JitsuyouYomichan:
case DictType.ShinmeikaiYomichan:
case DictType.NikkokuYomichan:
case DictType.ShinjirinYomichan:
case DictType.OubunshaYomichan:
case DictType.ZokugoYomichan:
case DictType.WeblioKogoYomichan:
case DictType.GakkenYojijukugoYomichan:
case DictType.ShinmeikaiYojijukugoYomichan:
case DictType.KireiCakeYomichan:
case DictType.KanjigenYomichan:
case DictType.DaijirinNazeka:
case DictType.ShinmeikaiNazeka:
case DictType.KenkyuushaNazeka:
throw new ArgumentOutOfRangeException(null, dict.Type, "Obsolete dict type");
#pragma warning restore CS0618 // Type or member is obsolete

default:
throw new ArgumentOutOfRangeException(null, dict.Type, "Invalid dict type");
}
Expand Down Expand Up @@ -1441,10 +1415,6 @@ or DictType.JMnedict
{
SingleDictTypeDicts[dict.Type] = dict;
}
else
{
MigrateDictType(dict);
}

InitDictOptions(dict);

Expand All @@ -1460,67 +1430,6 @@ or DictType.JMnedict
}
}

private static void MigrateDictType(Dict dict)
{
switch (dict.Type)
{
#pragma warning disable CS0618 // Type or member is obsolete
case DictType.Kenkyuusha:
case DictType.Daijisen:
case DictType.Daijirin:
case DictType.Koujien:
case DictType.Meikyou:
case DictType.Gakken:
case DictType.Kotowaza:
case DictType.IwanamiYomichan:
case DictType.JitsuyouYomichan:
case DictType.ShinmeikaiYomichan:
case DictType.NikkokuYomichan:
case DictType.ShinjirinYomichan:
case DictType.OubunshaYomichan:
case DictType.ZokugoYomichan:
case DictType.WeblioKogoYomichan:
case DictType.GakkenYojijukugoYomichan:
case DictType.ShinmeikaiYojijukugoYomichan:
case DictType.KireiCakeYomichan:
dict.Type = DictType.NonspecificWordYomichan;
break;

case DictType.KanjigenYomichan:
dict.Type = DictType.NonspecificKanjiWithWordSchemaYomichan;
break;

case DictType.KenkyuushaNazeka:
case DictType.DaijirinNazeka:
case DictType.ShinmeikaiNazeka:
dict.Type = DictType.NonspecificWordNazeka;
break;
#pragma warning restore CS0618 // Type or member is obsolete

case DictType.JMdict:
case DictType.JMnedict:
case DictType.Kanjidic:
case DictType.CustomWordDictionary:
case DictType.CustomNameDictionary:
case DictType.ProfileCustomWordDictionary:
case DictType.ProfileCustomNameDictionary:
case DictType.NonspecificWordYomichan:
case DictType.NonspecificKanjiYomichan:
case DictType.NonspecificKanjiWithWordSchemaYomichan:
case DictType.NonspecificNameYomichan:
case DictType.PitchAccentYomichan:
case DictType.NonspecificYomichan:
case DictType.NonspecificWordNazeka:
case DictType.NonspecificKanjiNazeka:
case DictType.NonspecificNameNazeka:
case DictType.NonspecificNazeka:
break;

default:
break;
}
}

private static void InitDictOptions(Dict dict)
{
if (dict.Type is DictType.JMdict)
Expand Down
52 changes: 0 additions & 52 deletions JL.Core/Lookup/LookupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,32 +334,6 @@ public static class LookupUtils
case DictType.PitchAccentYomichan:
break;

#pragma warning disable CS0618 // Type or member is obsolete
case DictType.Kenkyuusha:
case DictType.Daijisen:
case DictType.Daijirin:
case DictType.Koujien:
case DictType.Meikyou:
case DictType.Gakken:
case DictType.Kotowaza:
case DictType.IwanamiYomichan:
case DictType.JitsuyouYomichan:
case DictType.ShinmeikaiYomichan:
case DictType.NikkokuYomichan:
case DictType.ShinjirinYomichan:
case DictType.OubunshaYomichan:
case DictType.ZokugoYomichan:
case DictType.WeblioKogoYomichan:
case DictType.GakkenYojijukugoYomichan:
case DictType.ShinmeikaiYojijukugoYomichan:
case DictType.KireiCakeYomichan:
case DictType.KanjigenYomichan:
case DictType.DaijirinNazeka:
case DictType.ShinmeikaiNazeka:
case DictType.KenkyuushaNazeka:
#pragma warning restore CS0618 // Type or member is obsolete
throw new ArgumentOutOfRangeException(null, dict.Type, "Obsolete DictType");

default:
throw new ArgumentOutOfRangeException(null, dict.Type, "Invalid DictType");
}
Expand Down Expand Up @@ -675,32 +649,6 @@ private static List<IDictRecord> GetValidDeconjugatedResults(Dict dict, Form dec
case DictType.ProfileCustomNameDictionary:
break;

#pragma warning disable CS0618 // Type or member is obsolete
case DictType.Daijisen:
case DictType.Kenkyuusha:
case DictType.Daijirin:
case DictType.Koujien:
case DictType.Meikyou:
case DictType.Gakken:
case DictType.Kotowaza:
case DictType.IwanamiYomichan:
case DictType.JitsuyouYomichan:
case DictType.ShinmeikaiYomichan:
case DictType.NikkokuYomichan:
case DictType.ShinjirinYomichan:
case DictType.OubunshaYomichan:
case DictType.ZokugoYomichan:
case DictType.WeblioKogoYomichan:
case DictType.GakkenYojijukugoYomichan:
case DictType.ShinmeikaiYojijukugoYomichan:
case DictType.KireiCakeYomichan:
case DictType.KanjigenYomichan:
case DictType.DaijirinNazeka:
case DictType.ShinmeikaiNazeka:
case DictType.KenkyuushaNazeka:
#pragma warning restore CS0618 // Type or member is obsolete
throw new ArgumentOutOfRangeException(null, dict.Type, "Obsolete DictType");

default:
throw new ArgumentOutOfRangeException(null, dict.Type, "Invalid DictType");
}
Expand Down
148 changes: 0 additions & 148 deletions JL.Windows/ConfigMigrationManager.cs

This file was deleted.

26 changes: 0 additions & 26 deletions JL.Windows/GUI/AddDictionaryWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,32 +189,6 @@ private void BrowsePathButton_OnClick(object sender, RoutedEventArgs e)
case DictType.ProfileCustomNameDictionary:
break;

#pragma warning disable CS0618 // Type or member is obsolete
case DictType.Kenkyuusha:
case DictType.Daijisen:
case DictType.Daijirin:
case DictType.Koujien:
case DictType.Meikyou:
case DictType.Gakken:
case DictType.Kotowaza:
case DictType.IwanamiYomichan:
case DictType.JitsuyouYomichan:
case DictType.ShinmeikaiYomichan:
case DictType.NikkokuYomichan:
case DictType.ShinjirinYomichan:
case DictType.OubunshaYomichan:
case DictType.ZokugoYomichan:
case DictType.WeblioKogoYomichan:
case DictType.GakkenYojijukugoYomichan:
case DictType.ShinmeikaiYojijukugoYomichan:
case DictType.KireiCakeYomichan:
case DictType.KanjigenYomichan:
case DictType.DaijirinNazeka:
case DictType.ShinmeikaiNazeka:
case DictType.KenkyuushaNazeka:
#pragma warning restore CS0618 // Type or member is obsolete
throw new ArgumentOutOfRangeException(null, selectedDictType, "Obsolete DictType (Add)");

default:
throw new ArgumentOutOfRangeException(null, selectedDictType, "Invalid DictType (Add)");
}
Expand Down
Loading

0 comments on commit ff874de

Please sign in to comment.