- Add missing auto translates for the symbols
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.34.0</Version>
|
<Version>1.34.1</Version>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
|||||||
@@ -1486,7 +1486,7 @@ public sealed class ChatLogWindow : Window
|
|||||||
var entry = AutoCompleteList[i];
|
var entry = AutoCompleteList[i];
|
||||||
|
|
||||||
var highlight = AutoCompleteSelection == i;
|
var highlight = AutoCompleteSelection == i;
|
||||||
var clicked = ImGui.Selectable($"{entry.String}##{entry.Group}/{entry.Row}", highlight) || selected == i;
|
var clicked = ImGui.Selectable($"{entry.Text}##{entry.Group}/{entry.Row}", highlight) || selected == i;
|
||||||
if (i < 10)
|
if (i < 10)
|
||||||
{
|
{
|
||||||
var button = (i + 1) % 10;
|
var button = (i + 1) % 10;
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ public class SeStringDebugger : Window
|
|||||||
RenderMetadataDictionary("Link AutoTranslatePayload", new Dictionary<string, string?>
|
RenderMetadataDictionary("Link AutoTranslatePayload", new Dictionary<string, string?>
|
||||||
{
|
{
|
||||||
{ "Text", at.Text },
|
{ "Text", at.Text },
|
||||||
|
{ "Key/Group", $"{at.Key}/{at.Group}" },
|
||||||
{ "Data", string.Join(" ", at.Encode().Select(b => b.ToString("X2"))) },
|
{ "Data", string.Join(" ", at.Encode().Select(b => b.ToString("X2"))) },
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -144,11 +144,9 @@ internal static class AutoTranslate
|
|||||||
foreach (var col in columns)
|
foreach (var col in columns)
|
||||||
{
|
{
|
||||||
var rawName = rowParser.ReadStringColumn(col);
|
var rawName = rowParser.ReadStringColumn(col);
|
||||||
var name = rawName.ToDalamudString();
|
if (!rawName.IsEmpty)
|
||||||
var text = name.TextValue;
|
|
||||||
if (text.Length > 0)
|
|
||||||
{
|
{
|
||||||
list.Add(new AutoTranslateEntry(row.Group, (uint)i, text, name));
|
list.Add(new AutoTranslateEntry(row.Group, (uint)i, rawName.ToString(), string.Empty));
|
||||||
|
|
||||||
if (shouldAdd)
|
if (shouldAdd)
|
||||||
ValidEntries.Add((row.Group, (uint)i));
|
ValidEntries.Add((row.Group, (uint)i));
|
||||||
@@ -159,8 +157,7 @@ internal static class AutoTranslate
|
|||||||
}
|
}
|
||||||
else if (lookup is not "@")
|
else if (lookup is not "@")
|
||||||
{
|
{
|
||||||
var text = row.Text.ToDalamudString();
|
list.Add(new AutoTranslateEntry(row.Group, row.RowId, row.Text.ToString(), row.GroupTitle.ToString()));
|
||||||
list.Add(new AutoTranslateEntry(row.Group, row.RowId, text.TextValue, text));
|
|
||||||
|
|
||||||
if (shouldAdd)
|
if (shouldAdd)
|
||||||
ValidEntries.Add((row.Group, row.RowId));
|
ValidEntries.Add((row.Group, row.RowId));
|
||||||
@@ -183,19 +180,34 @@ internal static class AutoTranslate
|
|||||||
var otherMatches = new List<AutoTranslateEntry>();
|
var otherMatches = new List<AutoTranslateEntry>();
|
||||||
foreach (var entry in AllEntries())
|
foreach (var entry in AllEntries())
|
||||||
{
|
{
|
||||||
if (entry.String.Equals(prefix, StringComparison.OrdinalIgnoreCase))
|
if (entry.Text.Equals(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
wholeMatches.Add(entry);
|
wholeMatches.Add(entry);
|
||||||
else if (entry.String.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
|
}
|
||||||
|
else if (entry.Text.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
prefixMatches.Add(entry);
|
prefixMatches.Add(entry);
|
||||||
else if (entry.String.Contains(prefix, StringComparison.OrdinalIgnoreCase))
|
}
|
||||||
|
else if (entry.Text.Contains(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
otherMatches.Add(entry);
|
otherMatches.Add(entry);
|
||||||
|
}
|
||||||
|
else if (entry.Title.Length > 0)
|
||||||
|
{
|
||||||
|
if (entry.Title.Equals(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
wholeMatches.Add(entry);
|
||||||
|
else if (entry.Title.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
prefixMatches.Add(entry);
|
||||||
|
else if (entry.Title.Contains(prefix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
otherMatches.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sort)
|
if (sort)
|
||||||
{
|
{
|
||||||
return wholeMatches.OrderBy(entry => entry.String, StringComparer.OrdinalIgnoreCase)
|
return wholeMatches.OrderBy(entry => entry.Text, StringComparer.OrdinalIgnoreCase)
|
||||||
.Concat(prefixMatches.OrderBy(entry => entry.String, StringComparer.OrdinalIgnoreCase))
|
.Concat(prefixMatches.OrderBy(entry => entry.Text, StringComparer.OrdinalIgnoreCase))
|
||||||
.Concat(otherMatches.OrderBy(entry => entry.String, StringComparer.OrdinalIgnoreCase))
|
.Concat(otherMatches.OrderBy(entry => entry.Text, StringComparer.OrdinalIgnoreCase))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,14 +305,14 @@ internal class AutoTranslateEntry
|
|||||||
{
|
{
|
||||||
internal uint Group { get; }
|
internal uint Group { get; }
|
||||||
internal uint Row { get; }
|
internal uint Row { get; }
|
||||||
internal string String { get; }
|
internal string Text { get; }
|
||||||
internal SeString SeString { get; }
|
internal string Title { get; }
|
||||||
|
|
||||||
public AutoTranslateEntry(uint group, uint row, string str, SeString seStr)
|
public AutoTranslateEntry(uint group, uint row, string str, string title)
|
||||||
{
|
{
|
||||||
Group = group;
|
Group = group;
|
||||||
Row = row;
|
Row = row;
|
||||||
String = str;
|
Text = str;
|
||||||
SeString = seStr;
|
Title = title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user