diff --git a/java/execution/impl/src/com/intellij/execution/ui/DefaultJreSelector.kt b/java/execution/impl/src/com/intellij/execution/ui/DefaultJreSelector.kt index 440e93f66c12..e127c71c34ee 100644 --- a/java/execution/impl/src/com/intellij/execution/ui/DefaultJreSelector.kt +++ b/java/execution/impl/src/com/intellij/execution/ui/DefaultJreSelector.kt @@ -4,6 +4,7 @@ package com.intellij.execution.ui import com.intellij.application.options.ModuleDescriptionsComboBox import com.intellij.application.options.ModulesComboBox +import com.intellij.execution.ExecutionBundle import com.intellij.execution.configurations.JavaParameters import com.intellij.execution.util.JavaParametersUtil import com.intellij.java.JavaBundle @@ -70,18 +71,19 @@ abstract class DefaultJreSelector { open class SdkFromModuleDependencies>(val moduleComboBox: T, val getSelectedModule: (T) -> Module?, val productionOnly: () -> Boolean): DefaultJreSelector() { override fun getNameAndDescription(): Pair { - val module = getSelectedModule(moduleComboBox) ?: return Pair.create(null, "module not specified") + val moduleNotSpecified = ExecutionBundle.message("module.not.specified") + val module = getSelectedModule(moduleComboBox) ?: return Pair.create(null, moduleNotSpecified) val productionOnly = productionOnly() val jdkToRun = JavaParameters.getJdkToRunModule(module, productionOnly) val moduleJdk = ModuleRootManager.getInstance(module).sdk if (moduleJdk == null || jdkToRun == null) { - return Pair.create(null, "module not specified") + return Pair.create(null, moduleNotSpecified) } if (moduleJdk.homeDirectory == jdkToRun.homeDirectory) { - return Pair.create(moduleJdk.name, "SDK of '${module.name}' module") + return Pair.create(moduleJdk.name, ExecutionBundle.message("sdk.of.0.module", module.name)) } - return Pair.create(jdkToRun.name, "newest SDK from '${module.name}' module${if (productionOnly) "" else " test"} dependencies") + return Pair.create(jdkToRun.name, ExecutionBundle.message("newest.sdk.from.0.module.1.choice.0.1.test.dependencies", module.name, if (productionOnly) 0 else 1)) } override fun getVersion(): String? { diff --git a/platform/lang-api/resources/messages/ExecutionBundle.properties b/platform/lang-api/resources/messages/ExecutionBundle.properties index 0f8519addc99..39c6bd283b16 100644 --- a/platform/lang-api/resources/messages/ExecutionBundle.properties +++ b/platform/lang-api/resources/messages/ExecutionBundle.properties @@ -590,4 +590,7 @@ state.widget.active.processes.text={0} active processes state.widget.debug=Debugging state.widget.run=Running state.widget.stop.action.item.name={0}: {1} -state.widget.stop.process.action.item.name=Stop {0} \ No newline at end of file +state.widget.stop.process.action.item.name=Stop {0} +module.not.specified=module not specified +sdk.of.0.module=SDK of ''{0}'' module +newest.sdk.from.0.module.1.choice.0.1.test.dependencies=newest SDK from ''{0}'' module{1, choice, 0#|1# test} dependencies \ No newline at end of file