Skip to content

Commit

Permalink
chore: add missing localisations
Browse files Browse the repository at this point in the history
  • Loading branch information
Blooym committed Oct 31, 2024
1 parent dd2c5cd commit 9bff9bc
Show file tree
Hide file tree
Showing 10 changed files with 351 additions and 40 deletions.
4 changes: 4 additions & 0 deletions Wholist/Game/BlockedCharacterHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ private enum BlockResultType

public BlockedCharacterHandler() => Services.GameInteropProvider.InitializeFromAttributes(this);

/// <summary>
/// Whether a character or service account has been blocked by the local player.
/// </summary>
/// <exception cref="InvalidOperationException"></exception>
public bool IsCharacterBlocked(BattleChara* chara)
{
if (this.getBlockResultType == null)
Expand Down
204 changes: 204 additions & 0 deletions Wholist/Resources/Localization/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 102 additions & 0 deletions Wholist/Resources/Localization/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,106 @@
<data name="UserInterface_NearbyPlayers_Players_Distance" xml:space="preserve">
<value>Distance</value>
</data>
<data name="UserInterface_Settings_Visibility_Heading" xml:space="preserve">
<value>Visibility</value>
</data>
<data name="UserInterface_Settings_Positional_Heading" xml:space="preserve">
<value>Positional</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_SettingsTip" xml:space="preserve">
<value>Settings</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_DonateTip" xml:space="preserve">
<value>Donate</value>
</data>
<data name="UserInterface_NearbyPlayers_Players_Submenu_FocusTarget" xml:space="preserve">
<value>Focus Target</value>
</data>
<data name="UserInterface_Settings_Display_Heading" xml:space="preserve">
<value>Display</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_ShowSearchbar" xml:space="preserve">
<value>Show Searchbar</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_ShowSearchbar_Description" xml:space="preserve">
<value>Show the searchbar from the nearby players list.</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Paladin" xml:space="preserve">
<value>Paladin</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Warrior" xml:space="preserve">
<value>Warrior</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_DarkKnight" xml:space="preserve">
<value>Dark Knight</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Gunbreaker" xml:space="preserve">
<value>Gunbreaker</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_WhiteMage" xml:space="preserve">
<value>White Mage</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Scholar" xml:space="preserve">
<value>Scholar</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Astrologian" xml:space="preserve">
<value>Astrologian</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Sage" xml:space="preserve">
<value>Sage</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Monk" xml:space="preserve">
<value>Monk</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Dragoon" xml:space="preserve">
<value>Dragoon</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Ninja" xml:space="preserve">
<value>Ninja</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Samurai" xml:space="preserve">
<value>Samurai</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Reaper" xml:space="preserve">
<value>Reaper</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Viper" xml:space="preserve">
<value>Viper</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Bard" xml:space="preserve">
<value>Bard</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Machinist" xml:space="preserve">
<value>Machinist</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Dancer" xml:space="preserve">
<value>Dancer</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_BlackMage" xml:space="preserve">
<value>Black Mage</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Summoner" xml:space="preserve">
<value>Summoner</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_RedMage" xml:space="preserve">
<value>Red Mage</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Pictomancer" xml:space="preserve">
<value>Pictomancer</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_BlueMage" xml:space="preserve">
<value>Blue Mage</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Job_Other" xml:space="preserve">
<value>Other</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_LodestoneRegion" xml:space="preserve">
<value>Lodestone Region</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_LodestoneRegion_Description" xml:space="preserve">
<value>The region to perform Lodestone player lookups in.</value>
</data>
<data name="UserInterface_Settings_NearbyPlayers_Behaviour" xml:space="preserve">
<value>Behaviour</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ internal static ImGuiWindowFlags ApplyFlagConfiguration(ImGuiWindowFlags current
/// <inheritdoc cref="PluginConfiguration" />
internal static PluginConfiguration Configuration => Services.Configuration;

/// <inheritdoc cref="Dalamud.Game.ClientState.Conditions.ICondition" />
/// <inheritdoc cref="Condition" />
internal static ICondition Condition => Services.Condition;

/// <inheritdoc cref="ClientState.IsPvP" />
internal static bool IsPvP => Services.ClientState.IsPvP;

/// <summary>
/// Whether or not the window should be closed when the escape key is pressed.
/// Whether the window should be closed when the escape key is pressed.
/// </summary>
internal static bool ShouldDisableEscClose => Configuration.NearbyPlayers.LockPosition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ internal NearbyPlayersWindow() : base(Strings.Windows_Who_Title)
new()
{
Icon = FontAwesomeIcon.Cog,
ShowTooltip = () => SiGui.AddTooltip("Settings"),
ShowTooltip = () => SiGui.AddTooltip(Strings.UserInterface_Settings_NearbyPlayers_SettingsTip),
Click = (btn) => Services.WindowManager.ToggleConfigWindow()
},
new()
{
Icon = FontAwesomeIcon.Heart,
ShowTooltip = () => SiGui.AddTooltip("Donate"),
ShowTooltip = () => SiGui.AddTooltip(Strings.UserInterface_Settings_NearbyPlayers_DonateTip),
Click = (btn) => Util.OpenLink(Constants.KoFiLink)
}
];
Expand Down Expand Up @@ -187,7 +187,7 @@ private static void DrawPlayerContextMenu(PlayerInfoSlim obj)
}

// Focus target.
if (ImGui.Selectable("Focus Target"))
if (ImGui.Selectable(Strings.UserInterface_NearbyPlayers_Players_Submenu_FocusTarget))
{
obj.FocusTarget();
}
Expand Down
7 changes: 4 additions & 3 deletions Wholist/UserInterface/Windows/Settings/Settings.logic.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Wholist.Common;
using Wholist.Configuration;
using Wholist.Resources.Localization;

namespace Wholist.UserInterface.Windows.Settings
{
Expand All @@ -13,9 +14,9 @@ internal sealed class SettingsLogic
/// <returns>The localized name of the tab.</returns>
internal static string ConfigTabName(ConfigurationTabs tab) => tab switch
{
ConfigurationTabs.Window => "Window",
ConfigurationTabs.Appearance => "Appearance",
ConfigurationTabs.Behaviour => "Behaviour",
ConfigurationTabs.Window => Strings.UserInterface_Settings_NearbyPlayers_Window,
ConfigurationTabs.Appearance => Strings.UserInterface_Settings_NearbyPlayers_Appearance,
ConfigurationTabs.Behaviour => Strings.UserInterface_Settings_NearbyPlayers_Behaviour,
_ => throw new ArgumentOutOfRangeException(nameof(tab), tab, null),
};

Expand Down
Loading

0 comments on commit 9bff9bc

Please sign in to comment.