diff --git a/idea/resources/messages/KotlinVersionBundle.properties b/idea/resources/messages/KotlinVersionBundle.properties new file mode 100644 index 00000000000..70b8234c20c --- /dev/null +++ b/idea/resources/messages/KotlinVersionBundle.properties @@ -0,0 +1,3 @@ +title.no.runtime.found=No Runtime Found +dialog.message.is.not.found.make.sure.plugin.is.properly.installed={0} is not found. Make sure plugin is properly installed. +message.is.deprecated.since.1.2.0.and.should.be.replaced.with={0} is deprecated since 1.2.0 and should be replaced with {1} \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt index f5a69830284..17c8af6e2b6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt +++ b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt @@ -183,8 +183,8 @@ private fun getLibraryRootsWithAbiIncompatibleVersion( fun showRuntimeJarNotFoundDialog(project: Project, jarName: String) { Messages.showErrorDialog( project, - jarName + " is not found. Make sure plugin is properly installed.", - "No Runtime Found" + KotlinVersionBundle.message("dialog.message.is.not.found.make.sure.plugin.is.properly.installed", jarName), + KotlinVersionBundle.message("title.no.runtime.found") ) } @@ -293,13 +293,21 @@ val DEPRECATED_LIBRARIES_INFORMATION = listOf( oldGroupId = "org.jetbrains.kotlin", oldName = PathUtil.KOTLIN_JAVA_RUNTIME_JRE7_NAME, newName = PathUtil.KOTLIN_JAVA_RUNTIME_JDK7_NAME, outdatedAfterVersion = "1.2.0-rc-39", - message = "${PathUtil.KOTLIN_JAVA_RUNTIME_JRE7_NAME} is deprecated since 1.2.0 and should be replaced with ${PathUtil.KOTLIN_JAVA_RUNTIME_JDK7_NAME}" + message = KotlinVersionBundle.message( + "message.is.deprecated.since.1.2.0.and.should.be.replaced.with", + PathUtil.KOTLIN_JAVA_RUNTIME_JRE7_NAME, + PathUtil.KOTLIN_JAVA_RUNTIME_JDK7_NAME + ) ), deprecatedLib( oldGroupId = "org.jetbrains.kotlin", oldName = PathUtil.KOTLIN_JAVA_RUNTIME_JRE8_NAME, newName = PathUtil.KOTLIN_JAVA_RUNTIME_JDK8_NAME, outdatedAfterVersion = "1.2.0-rc-39", - message = "${PathUtil.KOTLIN_JAVA_RUNTIME_JRE8_NAME} is deprecated since 1.2.0 and should be replaced with ${PathUtil.KOTLIN_JAVA_RUNTIME_JDK8_NAME}" + message = KotlinVersionBundle.message( + "message.is.deprecated.since.1.2.0.and.should.be.replaced.with", + PathUtil.KOTLIN_JAVA_RUNTIME_JRE8_NAME, + PathUtil.KOTLIN_JAVA_RUNTIME_JDK8_NAME + ) ) ) \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinVersionBundle.kt b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinVersionBundle.kt new file mode 100644 index 00000000000..df08a75d272 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinVersionBundle.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.versions + +import org.jetbrains.annotations.NonNls +import org.jetbrains.annotations.PropertyKey +import org.jetbrains.kotlin.util.AbstractKotlinBundle + +@NonNls +private const val BUNDLE = "messages.KotlinVersionBundle" + +object KotlinVersionBundle : AbstractKotlinBundle(BUNDLE) { + @JvmStatic + fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params) +}