From c642ca45de05f2d82425fd34a0e5fd0b7bfedc19 Mon Sep 17 00:00:00 2001 From: Dmitry Gridin Date: Fri, 27 Mar 2020 14:31:39 +0700 Subject: [PATCH] i18n: update bundle in `idea-maven #KT-37483 --- .../messages/KotlinMavenBundle.properties | 30 +++++++++---------- .../maven/actions/MavenPluginSourcesSwap.kt | 4 +-- .../KotlinJavaMavenConfigurator.kt | 9 ++---- .../KotlinJavascriptMavenConfigurator.kt | 5 ++-- .../DifferentMavenStdlibVersionInspection.kt | 6 ++-- .../KotlinMavenPluginPhaseInspection.kt | 18 +++++------ .../inspections/KotlinTestJUnitInspection.kt | 2 +- 7 files changed, 34 insertions(+), 40 deletions(-) diff --git a/idea/idea-maven/resources/messages/KotlinMavenBundle.properties b/idea/idea-maven/resources/messages/KotlinMavenBundle.properties index cfa68042b44..27e5bd05399 100644 --- a/idea/idea-maven/resources/messages/KotlinMavenBundle.properties +++ b/idea/idea-maven/resources/messages/KotlinMavenBundle.properties @@ -5,9 +5,9 @@ configure.javascript.with.maven=JavaScript with Maven version.different.maven.ide=Kotlin version that is used for building with Maven ({0}) differs from the one bundled into the IDE plugin ({1}) version.different.plugin.library=Plugin version ({0}) is not the same as library version ({1}) -change.version=Change version -change.version.to=Change version to {0} -change.version.to.resolved=Change version to {0} ({1}) +fix.set.version.family=Change version +fix.set.version.name=Change version to {0} +fix.set.version.name1=Change version to {0} ({1}) error.cant.find.pom.for.module=Cannot find pom.xml for module ''{0}'' @@ -31,24 +31,24 @@ inspection.javascript.no.stdlib.dependency=Kotlin/JavaScript compiler configured inspection.configured.no.execution=You have {0} configured but no corresponding plugin execution inspection.same.execution.compile.test=It is not recommended to have both 'compile' and 'test' goals in the same execution -fix.create.execution.name="Create {0} execution -fix.create.execution.family="Create Kotlin execution +fix.add.execution.name="Create {0} execution +fix.add.execution.family="Create Kotlin execution -fix.change.phase.name=Change phase to {0} -fix.change.phase.family=Change phase +fix.execution.phase.name=Change phase to {0} +fix.execution.phase.family=Change phase -fix.configure.right.order=Configure maven-compiler-plugin executions in the right order +fix.add.java.executions.name=Configure maven-compiler-plugin executions in the right order -fix.add.dependency.name=Add ''{0}'' dependency -fix.add.dependency.family=Add dependency +fix.add.stdlib.name=Add ''{0}'' dependency +fix.add.stdlib.family=Add dependency -fix.create.execution.compiler.name=Create ''{0}'' execution of kotlin-maven-compiler -fix.create.execution.compiler.family=Create Kotlin execution +fix.configure.plugin.execution.name=Create ''{0}'' execution of kotlin-maven-compiler +fix.configure.plugin.execution.family=Create Kotlin execution fix.add.maven.dependency.name=Add Maven dependency… fix.kotlin.test.junit.is.recommended='kotlin-test-junit' is recommended -fix.kotlin.test.junit.replace=Replace with 'kotlin-test-junit' +fix.replace.to.kotlin.test.name=Replace with 'kotlin-test-junit' -fix.move.to.compile.execution=Move to 'compile' execution -fix.move.to.build.sourceDirectory.tag=Move to 'build' > 'sourceDirectory' tag \ No newline at end of file +fix.move.to.execution.family=Move to 'compile' execution +fix.move.to.build.family=Move to 'build' > 'sourceDirectory' tag \ No newline at end of file diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt index 9c669adee8b..2179dd9b7c3 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt @@ -34,7 +34,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getParentOfType import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf class MavenPluginSourcesMoveToExecutionIntention : PsiElementBaseIntentionAction() { - override fun getFamilyName() = KotlinMavenBundle.message("fix.move.to.compile.execution") + override fun getFamilyName() = KotlinMavenBundle.message("fix.move.to.execution.family") override fun getText() = familyName override fun isAvailable(project: Project, editor: Editor, element: PsiElement): Boolean { @@ -96,7 +96,7 @@ class MavenPluginSourcesMoveToExecutionIntention : PsiElementBaseIntentionAction } class MavenPluginSourcesMoveToBuild : PsiElementBaseIntentionAction() { - override fun getFamilyName() = KotlinMavenBundle.message("fix.move.to.build.sourceDirectory.tag") + override fun getFamilyName() = KotlinMavenBundle.message("fix.move.to.build.family") override fun getText() = familyName override fun isAvailable(project: Project, editor: Editor, element: PsiElement): Boolean { diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavaMavenConfigurator.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavaMavenConfigurator.kt index 0f76a447973..b3b31fb8e3a 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavaMavenConfigurator.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavaMavenConfigurator.kt @@ -30,12 +30,7 @@ import org.jetbrains.kotlin.idea.versions.getStdlibArtifactId import org.jetbrains.kotlin.platform.TargetPlatform import org.jetbrains.kotlin.platform.jvm.JvmPlatforms -class KotlinJavaMavenConfigurator : KotlinMavenConfigurator( - TEST_LIB_ID, - false, - NAME, - PRESENTABLE_TEXT -) { +class KotlinJavaMavenConfigurator : KotlinMavenConfigurator(TEST_LIB_ID, false, NAME, PRESENTABLE_TEXT) { override fun isKotlinModule(module: Module) = hasKotlinJvmRuntimeInScope(module) @@ -77,6 +72,6 @@ class KotlinJavaMavenConfigurator : KotlinMavenConfigurator( companion object { private const val NAME = "maven" const val TEST_LIB_ID = "kotlin-test" - private val PRESENTABLE_TEXT = KotlinMavenBundle.message("configure.java.with.maven") + private val PRESENTABLE_TEXT get() = KotlinMavenBundle.message("configure.java.with.maven") } } diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavascriptMavenConfigurator.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavascriptMavenConfigurator.kt index 4576c2fafc8..318a2b7acfc 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavascriptMavenConfigurator.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/configuration/KotlinJavascriptMavenConfigurator.kt @@ -25,8 +25,7 @@ import org.jetbrains.kotlin.idea.versions.MAVEN_JS_STDLIB_ID import org.jetbrains.kotlin.platform.TargetPlatform import org.jetbrains.kotlin.platform.js.JsPlatforms -class KotlinJavascriptMavenConfigurator : - KotlinMavenConfigurator(null, false, NAME, PRESENTABLE_TEXT) { +class KotlinJavascriptMavenConfigurator : KotlinMavenConfigurator(null, false, NAME, PRESENTABLE_TEXT) { override fun getStdlibArtifactId(module: Module, version: String) = MAVEN_JS_STDLIB_ID @@ -53,6 +52,6 @@ class KotlinJavascriptMavenConfigurator : companion object { private const val NAME = "js maven" - private val PRESENTABLE_TEXT = KotlinMavenBundle.message("configure.javascript.with.maven") + private val PRESENTABLE_TEXT get() = KotlinMavenBundle.message("configure.javascript.with.maven") } } diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentMavenStdlibVersionInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentMavenStdlibVersionInspection.kt index 39b0043a0d3..a2fdc29598c 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentMavenStdlibVersionInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentMavenStdlibVersionInspection.kt @@ -87,11 +87,11 @@ class DifferentMavenStdlibVersionInspection : DomElementsInspection, val newVersion: String, val versionResolved: String?) : LocalQuickFix { override fun getName() = when (versionResolved) { - null -> KotlinMavenBundle.message("change.version.to", newVersion) - else -> KotlinMavenBundle.message("change.version.to.resolved", newVersion, versionResolved) + null -> KotlinMavenBundle.message("fix.set.version.name", newVersion) + else -> KotlinMavenBundle.message("fix.set.version.name1", newVersion, versionResolved) } - override fun getFamilyName() = KotlinMavenBundle.message("change.version") + override fun getFamilyName() = KotlinMavenBundle.message("fix.set.version.family") override fun applyFix(project: Project, descriptor: ProblemDescriptor) { versionElement.value = newVersion diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt index 956593ebd7a..ddd878d1093 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt @@ -194,9 +194,9 @@ class KotlinMavenPluginPhaseInspection : DomElementsInspection(Ma } private class ReplaceToKotlinTest(val dependency: MavenDomDependency) : LocalQuickFix { - override fun getName() = KotlinMavenBundle.message("fix.kotlin.test.junit.replace") + override fun getName() = KotlinMavenBundle.message("fix.replace.to.kotlin.test.name") override fun getFamilyName() = name override fun applyFix(project: Project, descriptor: ProblemDescriptor) {