mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: localize PluginInstallerWindow notifications
This commit is contained in:
parent
ee03864c70
commit
aba29a1e3f
1 changed files with 29 additions and 5 deletions
|
|
@ -315,11 +315,11 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
if (this.updatePluginCount > 0)
|
||||
{
|
||||
this.dalamud.PluginManager.PrintUpdatedPlugins(this.updatedPlugins, Locs.PluginUpdateHeader_Chatbox);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification($"Updates for {this.updatePluginCount} of your plugins were installed.", "Updates installed!", Notifications.Notification.Type.Success);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification(Locs.Notifications_UpdatesInstalled(this.updatePluginCount), Locs.Notifications_UpdatesInstalledTitle, Notifications.Notification.Type.Success);
|
||||
}
|
||||
else if (this.updatePluginCount == 0)
|
||||
{
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification("No updates were found.", "No updates", Notifications.Notification.Type.Info);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification(Locs.Notifications_NoUpdatesFound, Locs.Notifications_NoUpdatesFoundTitle, Notifications.Notification.Type.Info);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -691,11 +691,11 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
{
|
||||
if (task.Result.State == PluginState.Loaded)
|
||||
{
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} was successfully installed.", "Plugin installed!", Notifications.Notification.Type.Success);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification(Locs.Notifications_PluginInstalled(manifest.Name), Locs.Notifications_PluginInstalledTitle, Notifications.Notification.Type.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} failed to load.", "Plugin not installed!", Notifications.Notification.Type.Error);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification(Locs.Notifications_PluginNotInstalled(manifest.Name), Locs.Notifications_PluginNotInstalledTitle, Notifications.Notification.Type.Error);
|
||||
this.ShowErrorModal(Locs.ErrorModal_InstallFail(manifest.Name));
|
||||
}
|
||||
}
|
||||
|
|
@ -990,7 +990,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
this.dalamud.PluginManager.RemovePlugin(plugin);
|
||||
}
|
||||
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification($"'{plugin.Manifest.Name}' was disabled.", "Plugin disabled!", Notifications.Notification.Type.Success);
|
||||
this.dalamud.InterfaceManager.Notifications.AddNotification(Locs.Notifications_PluginDisabled(plugin.Manifest.Name), Locs.Notifications_PluginDisabledTitle, Notifications.Notification.Type.Success);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1628,6 +1628,30 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
|
||||
#endregion
|
||||
|
||||
#region Notifications
|
||||
|
||||
public static string Notifications_PluginInstalledTitle => Loc.Localize("NotificationsPluginInstalledTitle", "Plugin installed!");
|
||||
|
||||
public static string Notifications_PluginInstalled(string name) => Loc.Localize("NotificationsPluginInstalled", "'{0}' was successfully installed.").Format(name);
|
||||
|
||||
public static string Notifications_PluginNotInstalledTitle => Loc.Localize("NotificationsPluginNotInstalledTitle", "Plugin not installed!");
|
||||
|
||||
public static string Notifications_PluginNotInstalled(string name) => Loc.Localize("NotificationsPluginInstalled", "'{0}' failed to install.").Format(name);
|
||||
|
||||
public static string Notifications_NoUpdatesFoundTitle => Loc.Localize("NotificationsNoUpdatesFoundTitle", "No updates found!");
|
||||
|
||||
public static string Notifications_NoUpdatesFound => Loc.Localize("NotificationsNoUpdatesFound", "No updates were found.");
|
||||
|
||||
public static string Notifications_UpdatesInstalledTitle => Loc.Localize("NotificationsUpdatesInstalledTitle", "Updates installed!");
|
||||
|
||||
public static string Notifications_UpdatesInstalled(int count) => Loc.Localize("NotificationsUpdatesInstalled", "Updates for {0} of your plugins were installed.").Format(count);
|
||||
|
||||
public static string Notifications_PluginDisabledTitle => Loc.Localize("NotificationsPluginDisabledTitle", "Plugin disabled!");
|
||||
|
||||
public static string Notifications_PluginDisabled(string name) => Loc.Localize("NotificationsPluginDisabled", "'{0}' was disabled.").Format(name);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Footer
|
||||
|
||||
public static string FooterButton_UpdatePlugins => Loc.Localize("InstallerUpdatePlugins", "Update plugins");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue