Skip to content

Commit

Permalink
fix: int dict to localedictionary (#1934)
Browse files Browse the repository at this point in the history
* int dict to localedictionary

* swap exception for fallback string
  • Loading branch information
lodicolo authored Oct 8, 2023
1 parent 94fd969 commit 890e24b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public override string Format(Type stringsType, object value)

if (!intKeyDictionary.TryGetValue(key, out var localizedString))
{
throw new ArgumentOutOfRangeException($"Key missing: {key}");
localizedString = $"KEY_MISSING=\"{key}\"";
}

return localizedString;
Expand Down
10 changes: 5 additions & 5 deletions Intersect.Editor/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4121,12 +4121,12 @@ public partial struct MapList

public partial struct Mapping
{
public static Dictionary<int, LocalizedString> InstanceTypes = new Dictionary<int, LocalizedString>()
public static LocaleDictionary<MapInstanceType, LocalizedString> InstanceTypes = new LocaleDictionary<MapInstanceType, LocalizedString>()
{
{(int)MapInstanceType.Overworld, @"Overworld"},
{(int)MapInstanceType.Personal, @"Personal"},
{(int)MapInstanceType.Guild, @"Guild"},
{(int)MapInstanceType.Shared, @"Shared"},
{MapInstanceType.Overworld, @"Overworld"},
{MapInstanceType.Personal, @"Personal"},
{MapInstanceType.Guild, @"Guild"},
{MapInstanceType.Shared, @"Shared"},
};

public static LocalizedString createmap = @"Create new map.";
Expand Down

0 comments on commit 890e24b

Please sign in to comment.