chore: use placeholders for all plugin name references

This commit is contained in:
Anna
2022-02-06 04:11:36 -05:00
parent 6966f935ee
commit 256494e858
5 changed files with 37 additions and 19 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ namespace ChatTwo;
// ReSharper disable once ClassNeverInstantiated.Global // ReSharper disable once ClassNeverInstantiated.Global
public sealed class Plugin : IDalamudPlugin { public sealed class Plugin : IDalamudPlugin {
public string Name => "Chat 2"; internal const string PluginName = "Chat 2";
public string Name => PluginName;
[PluginService] [PluginService]
internal DalamudPluginInterface Interface { get; init; } internal DalamudPluginInterface Interface { get; init; }
+6 -6
View File
@@ -277,7 +277,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to The font Chat 2 will use to display non-Japanese text.. /// Looks up a localized string similar to The font {0} will use to display non-Japanese text..
/// </summary> /// </summary>
internal static string Options_Font_Description { internal static string Options_Font_Description {
get { get {
@@ -340,7 +340,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Hide Chat 2 during cutscenes.. /// Looks up a localized string similar to Hide {0} during cutscenes..
/// </summary> /// </summary>
internal static string Options_HideDuringCutscenes_Description { internal static string Options_HideDuringCutscenes_Description {
get { get {
@@ -358,7 +358,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Hide the chat when you are not logged in to a character.. /// Looks up a localized string similar to Hide {0} when you are not logged in to a character..
/// </summary> /// </summary>
internal static string Options_HideWhenNotLoggedIn_Description { internal static string Options_HideWhenNotLoggedIn_Description {
get { get {
@@ -376,7 +376,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to The font Chat 2 will use to display Japanese text.. /// Looks up a localized string similar to The font {0} will use to display Japanese text..
/// </summary> /// </summary>
internal static string Options_JapaneseFont_Description { internal static string Options_JapaneseFont_Description {
get { get {
@@ -421,7 +421,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Show in-game item tooltips when hovering over items in Chat 2.. /// Looks up a localized string similar to Show in-game item tooltips when hovering over items in {0}..
/// </summary> /// </summary>
internal static string Options_NativeItemTooltips_Description { internal static string Options_NativeItemTooltips_Description {
get { get {
@@ -484,7 +484,7 @@ namespace ChatTwo.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Show tabs in Chat 2 as a sidebar instead of a bar at the top.. /// Looks up a localized string similar to Show tabs in {0} as a sidebar instead of a bar at the top..
/// </summary> /// </summary>
internal static string Options_SidebarTabView_Description { internal static string Options_SidebarTabView_Description {
get { get {
+6 -6
View File
@@ -132,19 +132,19 @@
<value>Hide chat during cutscenes</value> <value>Hide chat during cutscenes</value>
</data> </data>
<data name="Options_HideDuringCutscenes_Description" xml:space="preserve"> <data name="Options_HideDuringCutscenes_Description" xml:space="preserve">
<value>Hide Chat 2 during cutscenes.</value> <value>Hide {0} during cutscenes.</value>
</data> </data>
<data name="Options_NativeItemTooltips_Name" xml:space="preserve"> <data name="Options_NativeItemTooltips_Name" xml:space="preserve">
<value>Show native item tooltips</value> <value>Show native item tooltips</value>
</data> </data>
<data name="Options_NativeItemTooltips_Description" xml:space="preserve"> <data name="Options_NativeItemTooltips_Description" xml:space="preserve">
<value>Show in-game item tooltips when hovering over items in Chat 2.</value> <value>Show in-game item tooltips when hovering over items in {0}.</value>
</data> </data>
<data name="Options_SidebarTabView_Name" xml:space="preserve"> <data name="Options_SidebarTabView_Name" xml:space="preserve">
<value>Show tabs in a sidebar</value> <value>Show tabs in a sidebar</value>
</data> </data>
<data name="Options_SidebarTabView_Description" xml:space="preserve"> <data name="Options_SidebarTabView_Description" xml:space="preserve">
<value>Show tabs in Chat 2 as a sidebar instead of a bar at the top.</value> <value>Show tabs in {0} as a sidebar instead of a bar at the top.</value>
</data> </data>
<data name="Options_PrettierTimestamps_Name" xml:space="preserve"> <data name="Options_PrettierTimestamps_Name" xml:space="preserve">
<value>Use modern timestamp layout</value> <value>Use modern timestamp layout</value>
@@ -327,13 +327,13 @@
<value>Japanese font</value> <value>Japanese font</value>
</data> </data>
<data name="Options_Font_Description" xml:space="preserve"> <data name="Options_Font_Description" xml:space="preserve">
<value>The font Chat 2 will use to display non-Japanese text.</value> <value>The font {0} will use to display non-Japanese text.</value>
</data> </data>
<data name="Options_Font_Warning" xml:space="preserve"> <data name="Options_Font_Warning" xml:space="preserve">
<value>Using certain system fonts may crash your game. You have been warned.</value> <value>Using certain system fonts may crash your game. You have been warned.</value>
</data> </data>
<data name="Options_JapaneseFont_Description" xml:space="preserve"> <data name="Options_JapaneseFont_Description" xml:space="preserve">
<value>The font Chat 2 will use to display Japanese text.</value> <value>The font {0} will use to display Japanese text.</value>
</data> </data>
<data name="Options_Tabs_ChannelTypes_Special" xml:space="preserve"> <data name="Options_Tabs_ChannelTypes_Special" xml:space="preserve">
<value>Special</value> <value>Special</value>
@@ -357,6 +357,6 @@
<value>Hide when not logged in</value> <value>Hide when not logged in</value>
</data> </data>
<data name="Options_HideWhenNotLoggedIn_Description" xml:space="preserve"> <data name="Options_HideWhenNotLoggedIn_Description" xml:space="preserve">
<value>Hide the chat when you are not logged in to a character.</value> <value>Hide {0} when you are not logged in to a character.</value>
</data> </data>
</root> </root>
+20 -4
View File
@@ -19,16 +19,32 @@ internal sealed class Display : ISettingsTab {
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideChat, Language.Options_HideChat_Name, Language.Options_HideChat_Description); ImGuiUtil.OptionCheckbox(ref this.Mutable.HideChat, Language.Options_HideChat_Name, Language.Options_HideChat_Description);
ImGui.Spacing(); ImGui.Spacing();
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideDuringCutscenes, Language.Options_HideDuringCutscenes_Name, Language.Options_HideDuringCutscenes_Description); ImGuiUtil.OptionCheckbox(
ref this.Mutable.HideDuringCutscenes,
Language.Options_HideDuringCutscenes_Name,
string.Format(Language.Options_HideDuringCutscenes_Description, Plugin.PluginName)
);
ImGui.Spacing(); ImGui.Spacing();
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideWhenNotLoggedIn, Language.Options_HideWhenNotLoggedIn_Name, Language.Options_HideWhenNotLoggedIn_Description); ImGuiUtil.OptionCheckbox(
ref this.Mutable.HideWhenNotLoggedIn,
Language.Options_HideWhenNotLoggedIn_Name,
string.Format(Language.Options_HideWhenNotLoggedIn_Description, Plugin.PluginName)
);
ImGui.Spacing(); ImGui.Spacing();
ImGuiUtil.OptionCheckbox(ref this.Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, Language.Options_NativeItemTooltips_Description); ImGuiUtil.OptionCheckbox(
ref this.Mutable.NativeItemTooltips,
Language.Options_NativeItemTooltips_Name,
string.Format(Language.Options_NativeItemTooltips_Description, Plugin.PluginName)
);
ImGui.Spacing(); ImGui.Spacing();
ImGuiUtil.OptionCheckbox(ref this.Mutable.SidebarTabView, Language.Options_SidebarTabView_Name, Language.Options_SidebarTabView_Description); ImGuiUtil.OptionCheckbox(
ref this.Mutable.SidebarTabView,
Language.Options_SidebarTabView_Name,
string.Format(Language.Options_SidebarTabView_Description, Plugin.PluginName)
);
ImGui.Spacing(); ImGui.Spacing();
ImGuiUtil.OptionCheckbox(ref this.Mutable.PrettierTimestamps, Language.Options_PrettierTimestamps_Name, Language.Options_PrettierTimestamps_Description); ImGuiUtil.OptionCheckbox(ref this.Mutable.PrettierTimestamps, Language.Options_PrettierTimestamps_Name, Language.Options_PrettierTimestamps_Description);
+2 -2
View File
@@ -54,7 +54,7 @@ public class Fonts : ISettingsTab {
ImGui.EndCombo(); ImGui.EndCombo();
} }
ImGuiUtil.HelpText(Language.Options_Font_Description); ImGuiUtil.HelpText(string.Format(Language.Options_Font_Description, Plugin.PluginName));
ImGuiUtil.WarningText(Language.Options_Font_Warning); ImGuiUtil.WarningText(Language.Options_Font_Warning);
ImGui.Spacing(); ImGui.Spacing();
@@ -84,7 +84,7 @@ public class Fonts : ISettingsTab {
ImGui.EndCombo(); ImGui.EndCombo();
} }
ImGuiUtil.HelpText(Language.Options_JapaneseFont_Description); ImGuiUtil.HelpText(string.Format(Language.Options_JapaneseFont_Description, Plugin.PluginName));
ImGui.Spacing(); ImGui.Spacing();
const float speed = .0125f; const float speed = .0125f;