Update title/message and actions text.

GitOrigin-RevId: 1a24d6a2f8d2a6d7c5ab21c07126f475c846ed56
This commit is contained in:
Alexander Lobas
2020-06-01 20:50:20 +03:00
committed by intellij-monorepo-bot
parent dbd689fecb
commit 9c22edb681
2 changed files with 13 additions and 8 deletions
@@ -892,6 +892,7 @@ updates.external.ready.message={0,choice,1#Component|2#Components}: {1}
updates.external.error.message=Failed to check for updates to {0}: {1}
updates.plugins.ready.title={0} and plugin updates
updates.plugins.ready.title.available={0} and plugin updates available
updates.plugin.ready.short.title.available={0} plugin update available
updates.plugins.ready.short.title.available=Plugin updates available
updates.plugins.welcome.screen.link.message=Plugin Updates Available...
updates.no.updates.notification=No IDE or plugin updates available
@@ -913,6 +914,8 @@ updates.download.and.restart.button=Up&date and Restart
updates.apply.manually.button=Up&date Manually
updates.ignore.update.button=&Ignore This Update
updates.ignore.updates.button=&Ignore These Updates
updates.ignore.update.link=Ignore this update
updates.ignore.updates.link=Ignore these updates
updates.remind.later.button=&Remind Me Later
updates.new.version.available=<b>A new version of {0} is <a href=\"{1}\">available</a>!</b>
updates.current.version=Current version:
@@ -1382,9 +1385,9 @@ plugin.manager.tab.marketplace=Marketplace
plugin.manager.tab.installed=Installed
plugin.manager.options.command=Type / to see options
plugin.manager.repositories=Manage Plugin Repositories...
plugin.manager.update.all=Update All
plugin.manager.update.all=Update all
plugin.manager.tooltip=Manage Repositories, Configure Proxy or Install Plugin from Disk
plugin.settings.title=Plugin Settings...
plugin.settings.link.title=Plugin settings...
settings.required.plugins.title=Specify a list of plugins required for your project. {0} will notify you if a required plugin is missing or needs an update.
settings.terminal.smart.command.handling=Smart command handling
settings.terminal.project.settings=Project settings
@@ -551,10 +551,12 @@ object UpdateChecker {
ideFrame.showPluginUpdates(runnable)
}
else {
val title = IdeBundle.message("updates.plugins.ready.short.title.available")
val message = updatedPlugins.joinToString { downloader -> downloader.pluginName }
val names = updatedPlugins.joinToString { downloader -> StringUtil.wrapWithDoubleQuote(downloader.pluginName) }
val title = if (updatedPlugins.size == 1) IdeBundle.message("updates.plugin.ready.short.title.available", names)
else IdeBundle.message("updates.plugins.ready.short.title.available")
val message = if (updatedPlugins.size == 1) "" else names
showNotification(project, title, message, runnable, { notification ->
notification.actions[0].templatePresentation.text = IdeBundle.message("plugin.settings.title")
notification.actions[0].templatePresentation.text = IdeBundle.message("plugin.settings.link.title")
notification.actions.add(0, object : NotificationAction(
IdeBundle.message(if (updatedPlugins.size == 1) "plugins.configurable.update.button" else "plugin.manager.update.all")) {
override fun actionPerformed(e: AnActionEvent, notification: Notification) {
@@ -563,7 +565,7 @@ object UpdateChecker {
}
})
notification.addAction(object : NotificationAction(
IdeBundle.message(if (updatedPlugins.size == 1) "updates.ignore.update.button" else "updates.ignore.updates.button")) {
IdeBundle.message(if (updatedPlugins.size == 1) "updates.ignore.update.link" else "updates.ignore.updates.link")) {
override fun actionPerformed(e: AnActionEvent, notification: Notification) {
notification.expire()
PluginUpdateDialog.ignorePlugins(updatedPlugins.map { downloader -> downloader.descriptor })
@@ -621,8 +623,8 @@ object UpdateChecker {
action: () -> Unit,
extraBuilder: ((Notification) -> Unit)?,
notificationType: NotificationUniqueType) {
val notification = getNotificationGroup().createNotification(title, XmlStringUtil.wrapInHtml(message), NotificationType.INFORMATION,
null)
val notification = getNotificationGroup().createNotification(title, if (message.isEmpty()) "" else XmlStringUtil.wrapInHtml(message),
NotificationType.INFORMATION, null)
notification.collapseActionsDirection = Notification.CollapseActionsDirection.KEEP_LEFTMOST
notification.addAction(object : NotificationAction(IdeBundle.message("updates.notification.update.action")) {
override fun actionPerformed(e: AnActionEvent, notification: Notification) {