diff --git a/OverlayPlugin.Core/Integration/FFXIVRepository.cs b/OverlayPlugin.Core/Integration/FFXIVRepository.cs index 40a970e55..62537d97c 100644 --- a/OverlayPlugin.Core/Integration/FFXIVRepository.cs +++ b/OverlayPlugin.Core/Integration/FFXIVRepository.cs @@ -246,7 +246,10 @@ public Language GetLanguage() { var repo = GetRepository(); if (repo == null) - return Language.Unknown; + { + // Defaults to English + return Language.English; + } return repo.GetSelectedLanguageID(); } diff --git a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcess.cs b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcess.cs index 3f1bc8cd2..eae250e9d 100644 --- a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcess.cs +++ b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcess.cs @@ -133,6 +133,13 @@ static internal bool IsCrafter(EntityJob job) job == EntityJob.CUL; } + static internal string ToProperCase(string name) + { + System.Globalization.CultureInfo cultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture; + System.Globalization.TextInfo textInfo = cultureInfo.TextInfo; + return textInfo.ToTitleCase(name); + } + [Serializable] public class EntityData { diff --git a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessCn.cs b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessCn.cs index 97cea5235..c0492662f 100644 --- a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessCn.cs +++ b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessCn.cs @@ -180,10 +180,9 @@ public unsafe override EntityData GetEntityDataFromByteArray(byte[] source) { // dump '\0' string terminators var memoryName = System.Text.Encoding.UTF8.GetString(mem.Name, EntityMemory.nameBytes).Split(new[] { '\0' }, 2)[0]; - var capitalizedName = FFXIV_ACT_Plugin.Common.StringHelper.ToProperCase(memoryName); EntityData entity = new EntityData() { - name = capitalizedName, + name = memoryName, id = mem.id, type = mem.type, distance = mem.distance, diff --git a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessIntl.cs b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessIntl.cs index 12168625d..d2280423c 100644 --- a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessIntl.cs +++ b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessIntl.cs @@ -178,10 +178,9 @@ public unsafe override EntityData GetEntityDataFromByteArray(byte[] source) { // dump '\0' string terminators var memoryName = System.Text.Encoding.UTF8.GetString(mem.Name, EntityMemory.nameBytes).Split(new[] { '\0' }, 2)[0]; - var capitalizedName = FFXIV_ACT_Plugin.Common.StringHelper.ToProperCase(memoryName); EntityData entity = new EntityData() { - name = capitalizedName, + name = memoryName, id = mem.id, type = mem.type, distance = mem.distance, diff --git a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessKo.cs b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessKo.cs index d5a00a1fd..5dcd72ab1 100644 --- a/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessKo.cs +++ b/OverlayPlugin.Core/MemoryProcessors/FFXIVProcessKo.cs @@ -167,7 +167,7 @@ public unsafe override EntityData GetEntityDataFromByteArray(byte[] source) { // dump '\0' string terminators var memoryName = System.Text.Encoding.UTF8.GetString(mem.Name, EntityMemory.nameBytes).Split(new[] { '\0' }, 2)[0]; - var capitalizedName = FFXIV_ACT_Plugin.Common.StringHelper.ToProperCase(memoryName); + var capitalizedName = ToProperCase(memoryName); EntityData entity = new EntityData() { name = capitalizedName,