i18n: add bundle for idea/reporter

This commit is contained in:
Dmitry Gridin
2020-02-21 16:42:12 +07:00
parent e778a3fe34
commit 354c9c913a
3 changed files with 31 additions and 5 deletions
@@ -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
@@ -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()
)
@@ -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)
}