mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge branch 'refs/heads/master' into apiX
This commit is contained in:
commit
fb4d9c5ac7
1 changed files with 13 additions and 6 deletions
|
|
@ -365,7 +365,7 @@ internal class AutoUpdateManager : IServiceType
|
||||||
var notification = this.GetBaseNotification(new Notification
|
var notification = this.GetBaseNotification(new Notification
|
||||||
{
|
{
|
||||||
Title = Locs.NotificationTitleUpdatesAvailable,
|
Title = Locs.NotificationTitleUpdatesAvailable,
|
||||||
Content = Locs.NotificationContentUpdatesAvailable(updatablePlugins.Count),
|
Content = Locs.NotificationContentUpdatesAvailable(updatablePlugins),
|
||||||
MinimizedText = Locs.NotificationContentUpdatesAvailableMinimized(updatablePlugins.Count),
|
MinimizedText = Locs.NotificationContentUpdatesAvailableMinimized(updatablePlugins.Count),
|
||||||
Type = NotificationType.Info,
|
Type = NotificationType.Info,
|
||||||
InitialDuration = TimeSpan.MaxValue,
|
InitialDuration = TimeSpan.MaxValue,
|
||||||
|
|
@ -470,11 +470,18 @@ internal class AutoUpdateManager : IServiceType
|
||||||
public static string NotificationContentUpdatesFailed => Loc.Localize("AutoUpdateUpdatesFailedContent", "Some plugins failed to update. Please check the plugin installer for more information.");
|
public static string NotificationContentUpdatesFailed => Loc.Localize("AutoUpdateUpdatesFailedContent", "Some plugins failed to update. Please check the plugin installer for more information.");
|
||||||
|
|
||||||
public static string NotificationContentUpdatesFailedMinimized => Loc.Localize("AutoUpdateUpdatesFailedContentMinimized", "Plugins failed to update.");
|
public static string NotificationContentUpdatesFailedMinimized => Loc.Localize("AutoUpdateUpdatesFailedContentMinimized", "Plugins failed to update.");
|
||||||
|
|
||||||
public static string NotificationContentUpdatesAvailable(int numUpdates)
|
public static string NotificationContentUpdatesAvailable(ICollection<AvailablePluginUpdate> updatablePlugins)
|
||||||
=> numUpdates == 1 ?
|
=> (updatablePlugins.Count == 1
|
||||||
Loc.Localize("AutoUpdateUpdatesAvailableContentSingular", "There is a plugin that can be updated.") :
|
? Loc.Localize(
|
||||||
string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContentPlural", "There are {0} plugins that can be updated."), numUpdates);
|
"AutoUpdateUpdatesAvailableContentSingular",
|
||||||
|
"There is a plugin that can be updated:")
|
||||||
|
: string.Format(
|
||||||
|
Loc.Localize(
|
||||||
|
"AutoUpdateUpdatesAvailableContentPlural",
|
||||||
|
"There are {0} plugins that can be updated:"),
|
||||||
|
updatablePlugins.Count))
|
||||||
|
+ "\n\n" + string.Join(",", updatablePlugins.Select(x => x.InstalledPlugin.Manifest.Name));
|
||||||
|
|
||||||
public static string NotificationContentUpdatesAvailableMinimized(int numUpdates)
|
public static string NotificationContentUpdatesAvailableMinimized(int numUpdates)
|
||||||
=> numUpdates == 1 ?
|
=> numUpdates == 1 ?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue