mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
SeStringEvaluator: Fix HeadAll not capitalizing correctly (#2240)
* Fix obsoletes * Fix HeadAll not capitalizing correctly * Fix incorrect denoun cases in SeString Creator * Implement Utf8String.ToUpper in C# * Handle characters with accents too * Add remarks to ToUpper functions
This commit is contained in:
parent
f96e2ae37c
commit
499952b3d2
6 changed files with 138 additions and 9 deletions
|
|
@ -9,6 +9,7 @@ using Dalamud.Game.Text.Noun.Enums;
|
|||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using ImGuiNET;
|
||||
|
||||
using Lumina.Data;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
|
@ -21,7 +22,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class NounProcessorWidget : IDataWindowWidget
|
||||
{
|
||||
/// <summary>A list of German grammatical cases.</summary>
|
||||
internal static readonly string[] GermanCases = ["Nominative", "Genitive", "Dative", "Accusative"];
|
||||
internal static readonly string[] GermanCases = [string.Empty, "Nominative", "Genitive", "Dative", "Accusative"];
|
||||
|
||||
private static readonly Type[] NounSheets = [
|
||||
typeof(Aetheryte),
|
||||
|
|
@ -156,7 +157,7 @@ internal class NounProcessorWidget : IDataWindowWidget
|
|||
GrammaticalCase = grammaticalCase,
|
||||
};
|
||||
var output = nounProcessor.ProcessNoun(nounParams).ExtractText().Replace("\"", "\\\"");
|
||||
var caseParam = language == ClientLanguage.German ? $"(int)GermanCases.{GermanCases[grammaticalCase]}" : "1";
|
||||
var caseParam = language == ClientLanguage.German ? $"(int)GermanCases.{GermanCases[grammaticalCase + 1]}" : "1";
|
||||
sb.AppendLine($"new(nameof(LSheets.{sheetType.Name}), {this.rowId}, ClientLanguage.{language}, {this.amount}, (int){articleTypeEnumType.Name}.{Enum.GetName(articleTypeEnumType, articleType)}, {caseParam}, \"{output}\"),");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue