fix(settings): show the translations the channels tab already had
Twenty resource keys existed, were translated into all 25 languages, and were reachable from no line of code. The tab drew hardcoded English literals instead, so a German player read "Enable auto-tell tabs" while the German string sat in the plugin unused. This is the same defect as the three unreachable settings earlier in this cycle, one level down: the work was done, the wiring was not. The literals were also worse than the strings they shadowed. "Enable auto-tell tabs" against "Automatically open a tab per conversation partner for every /tell", and every setting had a written description that had never been shown at all, so nothing in the section explained what it did. Two of those are worth more than the labels. The conflict hint names the one setting in another plugin that silently stops auto-tell tabs from ever opening, which is not something a user works out alone; it is on screen now. The sidebar width description explains what the 44px default actually means. The keys carry stale prefixes from the old eight-tab layout -- the preload one still says Privacy_ though the setting lives here. Renaming them would touch 25 files per key, so they keep their names and the strings go on screen now.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using HellionChat.Resources;
|
||||
using HellionChat.Util;
|
||||
|
||||
namespace HellionChat.Ui.Components.Settings.Tabs;
|
||||
|
||||
@@ -15,42 +17,64 @@ internal sealed class ChannelsTab
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (ImGui.CollapsingHeader("Tab management", ImGuiTreeNodeFlags.DefaultOpen))
|
||||
if (
|
||||
ImGui.CollapsingHeader(
|
||||
HellionStrings.Settings_Section_AutoTellTabs,
|
||||
ImGuiTreeNodeFlags.DefaultOpen
|
||||
)
|
||||
)
|
||||
{
|
||||
_w.Toggle(
|
||||
"Enable auto-tell tabs",
|
||||
HellionStrings.ChatLog_AutoTellTabs_Enable_Name,
|
||||
() => Plugin.Config.EnableAutoTellTabs,
|
||||
v => Plugin.Config.EnableAutoTellTabs = v
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_Enable_Description);
|
||||
|
||||
_w.SliderInt(
|
||||
"Auto-tell tabs limit",
|
||||
HellionStrings.ChatLog_AutoTellTabs_Limit_Name,
|
||||
() => Plugin.Config.AutoTellTabsLimit,
|
||||
v => Plugin.Config.AutoTellTabsLimit = v,
|
||||
1,
|
||||
50
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_Limit_Description);
|
||||
|
||||
_w.Toggle(
|
||||
"Compact display",
|
||||
HellionStrings.ChatLog_AutoTellTabs_Compact_Name,
|
||||
() => Plugin.Config.AutoTellTabsCompactDisplay,
|
||||
v => Plugin.Config.AutoTellTabsCompactDisplay = v
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_Compact_Description);
|
||||
|
||||
_w.SliderInt(
|
||||
"History preload",
|
||||
HellionStrings.Privacy_AutoTellTabs_Preload_Name,
|
||||
() => Plugin.Config.AutoTellTabsHistoryPreload,
|
||||
v => Plugin.Config.AutoTellTabsHistoryPreload = v,
|
||||
0,
|
||||
200
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.Privacy_AutoTellTabs_Preload_Description);
|
||||
|
||||
_w.Toggle(
|
||||
"Show greeted toggle",
|
||||
HellionStrings.ChatLog_AutoTellTabs_GreetedToggle_Name,
|
||||
() => Plugin.Config.AutoTellTabsShowGreetedToggle,
|
||||
v => Plugin.Config.AutoTellTabsShowGreetedToggle = v
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_GreetedToggle_Description);
|
||||
|
||||
_w.Toggle(
|
||||
"Open as popout",
|
||||
HellionStrings.ChatLog_AutoTellTabs_OpenAsPopout_Name,
|
||||
() => Plugin.Config.AutoTellTabsOpenAsPopout,
|
||||
v => Plugin.Config.AutoTellTabsOpenAsPopout = v
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_OpenAsPopout_Description);
|
||||
|
||||
// Written for this screen and never shown until now. It names the
|
||||
// one setting in a third-party plugin that silently stops auto-tell
|
||||
// tabs from ever opening, which is not something a user guesses.
|
||||
ImGui.Spacing();
|
||||
ImGui.TextWrapped(HellionStrings.ChatLog_AutoTellTabs_ConflictHint);
|
||||
}
|
||||
|
||||
if (ImGui.CollapsingHeader("Tell auto-open mode", ImGuiTreeNodeFlags.DefaultOpen))
|
||||
@@ -75,12 +99,13 @@ internal sealed class ChannelsTab
|
||||
// The stored value is unscaled; display scaling is applied where the
|
||||
// sidebar is drawn.
|
||||
_w.SliderInt(
|
||||
"Sidebar width",
|
||||
HellionStrings.Settings_ThemeAndLayout_SidebarWidth_Name,
|
||||
() => Plugin.Config.SidebarWidth,
|
||||
v => Plugin.Config.SidebarWidth = v,
|
||||
(int)Sidebar.MinSidebarWidth,
|
||||
(int)Sidebar.MaxSidebarWidth
|
||||
);
|
||||
ImGuiUtil.HelpMarker(HellionStrings.Settings_ThemeAndLayout_SidebarWidth_Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user