fix: update some things for localisation
This commit is contained in:
parent
5161b57c51
commit
3daad60560
|
@ -4,7 +4,7 @@ using ChatTwo.Util;
|
|||
namespace ChatTwo.Code;
|
||||
|
||||
internal static class ChatTypeExt {
|
||||
internal static readonly (string, ChatType[])[] SortOrder = {
|
||||
internal static IEnumerable<(string, ChatType[])> SortOrder => new[] {
|
||||
(Language.Options_Tabs_ChannelTypes_Special, new[] {
|
||||
ChatType.Debug,
|
||||
ChatType.Urgent,
|
||||
|
|
|
@ -78,6 +78,15 @@ namespace ChatTwo.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delete tab.
|
||||
/// </summary>
|
||||
internal static string ChatLog_Tabs_Delete {
|
||||
get {
|
||||
return ResourceManager.GetString("ChatLog_Tabs_Delete", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Move down.
|
||||
/// </summary>
|
||||
|
|
|
@ -350,4 +350,7 @@
|
|||
<data name="Options_SymbolsFontSize_Description" xml:space="preserve">
|
||||
<value>The font size to use for game symbols.</value>
|
||||
</data>
|
||||
<data name="ChatLog_Tabs_Delete" xml:space="preserve">
|
||||
<value>Delete tab</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -313,7 +313,9 @@ internal sealed class ChatLog : IUiComponent {
|
|||
ImGui.SetNextWindowBgAlpha(this.Ui.Plugin.Config.WindowAlpha);
|
||||
}
|
||||
|
||||
if (!ImGui.Begin($"{this.Ui.Plugin.Name}##chat", flags)) {
|
||||
ImGui.SetNextWindowSize(new Vector2(500, 250) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
|
||||
|
||||
if (!ImGui.Begin($"{this.Ui.Plugin.Name}###chat2", flags)) {
|
||||
this._lastViewport = ImGui.GetWindowViewport().NativePtr;
|
||||
ImGui.End();
|
||||
return;
|
||||
|
@ -747,7 +749,7 @@ internal sealed class ChatLog : IUiComponent {
|
|||
anyChanged = true;
|
||||
}
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.TrashAlt, tooltip: "Delete tab")) {
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.TrashAlt, tooltip: Language.ChatLog_Tabs_Delete)) {
|
||||
tabs.RemoveAt(i);
|
||||
anyChanged = true;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ internal sealed class Settings : IUiComponent {
|
|||
|
||||
ImGui.SetNextWindowSize(new Vector2(500, 650) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
|
||||
|
||||
if (!ImGui.Begin(string.Format(Language.Settings_Title, this.Ui.Plugin.Name), ref this.Ui.SettingsVisible)) {
|
||||
var name = string.Format(Language.Settings_Title, this.Ui.Plugin.Name);
|
||||
if (!ImGui.Begin($"{name}###chat2-settings", ref this.Ui.SettingsVisible)) {
|
||||
ImGui.End();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ internal sealed class Tabs : ISettingsTab {
|
|||
ImGui.InputText(Language.Options_Tabs_Name, ref tab.Name, 512, ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
ImGui.Checkbox(Language.Options_Tabs_ShowTimestamps, ref tab.DisplayTimestamp);
|
||||
|
||||
if (ImGui.BeginCombo(Language.Options_Tabs_UnreadMode, tab.UnreadMode.ToString())) {
|
||||
if (ImGui.BeginCombo(Language.Options_Tabs_UnreadMode, tab.UnreadMode.Name())) {
|
||||
foreach (var mode in Enum.GetValues<UnreadMode>()) {
|
||||
if (ImGui.Selectable(mode.Name(), tab.UnreadMode == mode)) {
|
||||
tab.UnreadMode = mode;
|
||||
|
|
Loading…
Reference in New Issue