diff --git a/idea/resources/messages/KotlinReporterBundle.properties b/idea/resources/messages/KotlinReporterBundle.properties new file mode 100644 index 00000000000..5498dc367bd --- /dev/null +++ b/idea/resources/messages/KotlinReporterBundle.properties @@ -0,0 +1,5 @@ +button.text.ignore=Ignore +button.text.update=Update +message.text.you.re.running.kotlin.plugin.version=You''re running Kotlin plugin version {0}, while the latest version is {1} +text.can.t.report.exception.from.patched.plugin=Can''t report exception from patched plugin +title.update.kotlin.plugin=Update Kotlin Plugin \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReportSubmitter.kt b/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReportSubmitter.kt index 69bdaaefd61..f604837beda 100644 --- a/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReportSubmitter.kt +++ b/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReportSubmitter.kt @@ -245,7 +245,7 @@ class KotlinReportSubmitter : ITNReporterCompat() { ReportMessages.GROUP .createNotification( ReportMessages.ERROR_REPORT, - "Can't report exception from patched plugin", + KotlinReporterBundle.message("text.can.t.report.exception.from.patched.plugin"), NotificationType.INFORMATION, null ) @@ -264,10 +264,13 @@ class KotlinReportSubmitter : ITNReporterCompat() { val rc = showDialog( parentComponent, - "You're running Kotlin plugin version ${KotlinPluginUtil.getPluginVersion()}, " + - "while the latest version is ${status.pluginDescriptor.version}", - "Update Kotlin Plugin", - arrayOf("Update", "Ignore"), + KotlinReporterBundle.message( + "message.text.you.re.running.kotlin.plugin.version", + KotlinPluginUtil.getPluginVersion(), + status.pluginDescriptor.version + ), + KotlinReporterBundle.message("title.update.kotlin.plugin"), + arrayOf(KotlinReporterBundle.message("button.text.update"), KotlinReporterBundle.message("button.text.ignore")), 0, Messages.getInformationIcon() ) diff --git a/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReporterBundle.kt b/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReporterBundle.kt new file mode 100644 index 00000000000..403c2560e31 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/reporter/KotlinReporterBundle.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.reporter + +import org.jetbrains.annotations.NonNls +import org.jetbrains.annotations.PropertyKey +import org.jetbrains.kotlin.util.AbstractKotlinBundle + +@NonNls +private const val BUNDLE = "messages.KotlinReporterBundle" + +object KotlinReporterBundle : AbstractKotlinBundle(BUNDLE) { + @JvmStatic + fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params) +}