diff --git a/idea/resources/inspectionDescriptions/ConvertInitializedValToNonNullTypeInspection.html b/idea/resources-en/inspectionDescriptions/ConvertInitializedValToNonNullType.html similarity index 100% rename from idea/resources/inspectionDescriptions/ConvertInitializedValToNonNullTypeInspection.html rename to idea/resources-en/inspectionDescriptions/ConvertInitializedValToNonNullType.html diff --git a/idea/resources-en/messages/KotlinBundle.properties b/idea/resources-en/messages/KotlinBundle.properties index deee2af6205..b97b28e5fdb 100644 --- a/idea/resources-en/messages/KotlinBundle.properties +++ b/idea/resources-en/messages/KotlinBundle.properties @@ -1359,6 +1359,8 @@ condition.is.always.0=Condition is always ''{0}'' remove.fix.text=Delete expression simplify.fix.text=Simplify expression 0.has.empty.body=''{0}'' has empty body +initialized.val.should.be.converted.to.non.null.type=Initialized ''val'' should be converted to non-null type +convert.initialized.val.to.non.null.type.quick.fix.text=Convert initialized ''val'' to non-null type convert.na.n.equality.quick.fix.text=Replace with 'isNaN()' equality.check.with.nan.should.be.replaced.with.isnan=Equality check with NaN should be replaced with 'isNaN()' convert.pair.constructor.to.to.fix.text=Convert to 'to' @@ -1999,7 +2001,6 @@ action.ConfigureKotlinJsInProject.text=Configure Kotlin (JavaScript) in Project action.ConfigureKotlinInProject.text=Configure Kotlin in Project action.KotlinConsoleREPL.text=Kotlin REPL action.LibraryToSourceDependencySupportToggleAction.text=Toggle library to source dependency support - inspection.convert.initialized.val.to.non.null.type.display.name=Convert initialized 'val' to non-null type inspection.unused.unary.operator.display.name=Unused unary operator inspection.incomplete.destructuring.declaration.display.name=Incomplete destructuring declaration diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/ConvertInitializedValToNonNullTypeInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/ConvertInitializedValToNonNullTypeInspection.kt index 76fee41d613..52fe4282f65 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/ConvertInitializedValToNonNullTypeInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/ConvertInitializedValToNonNullTypeInspection.kt @@ -10,6 +10,7 @@ import com.intellij.codeInspection.ProblemDescriptor import com.intellij.codeInspection.ProblemHighlightType import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.project.Project +import org.jetbrains.kotlin.idea.KotlinBundle import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.psi.* @@ -26,7 +27,7 @@ class ConvertInitializedValToNonNullTypeInspection : AbstractKotlinInspection() if (shouldConvertToNonNullType(property)) { holder.registerProblem( typeReference, - "Initialized 'val' should be converted to non-null type", + KotlinBundle.message("initialized.val.should.be.converted.to.non.null.type"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, RemoveRedundantNullableTypeQuickfix() ) @@ -58,7 +59,7 @@ class ConvertInitializedValToNonNullTypeInspection : AbstractKotlinInspection() } class RemoveRedundantNullableTypeQuickfix : LocalQuickFix { - override fun getName() = "Convert initialized 'val' to non-null type" + override fun getName() = KotlinBundle.message("convert.initialized.val.to.non.null.type.quick.fix.text") override fun getFamilyName() = name