From 1b9bb77b2fc69f80615da4240ab87262bfa3db19 Mon Sep 17 00:00:00 2001 From: Dmitry Gridin Date: Tue, 10 Mar 2020 23:10:37 +0700 Subject: [PATCH] i18n: fix tests --- .../KotlinIdeaAnalysisBundle.properties | 74 +++++----- .../idea/highlighter/IdeErrorMessages.java | 134 ++++++++++-------- .../messages/KotlinBundle.properties | 4 +- 3 files changed, 112 insertions(+), 100 deletions(-) diff --git a/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties b/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties index 071c6a6c398..20a2b86acf6 100644 --- a/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties +++ b/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties @@ -1,42 +1,42 @@ -found=found:\u0020 -html.0.has.no.corresponding.expected.declaration.1.html='{'0'}' has no corresponding expected declaration'{'1'}' -html.0.is.not.abstract.and.does.not.implement.abstract.base.class.member.br.1.html='{'0'}' is not abstract and does not implement abstract base class member
'{'1'}' -html.0.is.not.abstract.and.does.not.implement.abstract.member.br.1.html='{'0'}' is not abstract and does not implement abstract member
'{'1'}' -html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html='''''{'0'}''''' method may be missing. None of the following functions will be called: -html.0.must.override.1.br.because.it.inherits.many.implementations.of.it.html='{'0'}' must override '{'1'}'
because it inherits many implementations of it -html.accidental.override.0.html=Accidental override: '{'0'}' -html.actual.class.0.has.no.corresponding.members.for.expected.class.members.1.html=Actual class '''''{'0'}''''' has no corresponding members for expected class members:'{'1'}' -html.assignment.operators.ambiguity.all.these.functions.match.ul.0.ul.table.html=Assignment operators ambiguity. All these functions match. -html.cannot.choose.among.the.following.candidates.without.completing.type.inference.ul.0.ul.html=Cannot choose among the following candidates without completing type inference: -html.expected.0.has.no.actual.declaration.in.module.1.2.html=Expected '{'0'}' has no actual declaration in module '{'1'}''{'2'}' -html.function.return.type.mismatch.table.tr.td.expected.td.td.1.td.tr.tr.td.found.td.td.2.td.tr.table.html=Function return type mismatch.
Expected:'{'1'}'
Found:'{'2'}'
-html.getter.return.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Getter return type must be equal to the type of the property.
Expected:'{'0'}'
Found:'{'1'}'
-html.internal.error.occurred.while.analyzing.this.expression.br.table.cellspacing.0.cellpadding.0.tr.td.strong.please.use.the.strong.td.td.img.src.0.td.td.strong.icon.in.the.bottom.right.corner.to.report.this.error.strong.td.tr.table.br.pre.0.pre.html=Internal Error occurred while analyzing this expression
(Please use the "" icon in the bottom-right corner to report this error):

'{'0'}'
-html.javascript.0.html=JavaScript: '{'0'}' -html.loop.parameter.type.mismatch.table.tr.td.iterated.values.td.td.0.td.tr.tr.td.parameter.td.td.1.td.tr.table.html=Loop parameter type mismatch.
Iterated values:'{'0'}'
Parameter:'{'1'}'
+found.space=found:\u0020 +html.0.has.no.corresponding.expected.declaration.1.html={0} has no corresponding expected declaration{1} +html.0.is.not.abstract.and.does.not.implement.abstract.base.class.member.br.1.html={0} is not abstract and does not implement abstract base class member
{1} +html.0.is.not.abstract.and.does.not.implement.abstract.member.br.1.html={0} is not abstract and does not implement abstract member
{1} +html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html=''{0}'' method may be missing. None of the following functions will be called: +html.expected.0.has.no.actual.declaration.in.module.1.2.html=Expected {0} has no actual declaration in module {1}{2} +html.accidental.override.0.html=Accidental override: {0} html.method.contains.from.concurrenthashmap.may.have.unexpected.semantics.it.calls.containsvalue.instead.of.containskey.br.use.explicit.form.of.the.call.to.containskey.containsvalue.contains.or.cast.the.value.to.kotlin.collections.map.instead.br.see.https.youtrack.jetbrains.com.issue.kt.18053.for.more.details.html=Method ''contains'' from ConcurrentHashMap may have unexpected semantics: it calls ''containsValue'' instead of ''containsKey''.
Use explicit form of the call to ''containsKey''/''containsValue''/''contains'' or cast the value to kotlin.collections.Map instead.
See https://youtrack.jetbrains.com/issue/KT-18053 for more details -html.method.iterator.is.ambiguous.for.this.expression.ul.0.ul.html=Method ''''iterator()'''' is ambiguous for this expression. -html.none.of.the.following.functions.can.be.called.with.the.arguments.supplied.ul.0.ul.html=None of the following functions can be called with the arguments supplied. -html.overload.resolution.ambiguity.all.these.functions.match.ul.0.ul.html=Overload resolution ambiguity. All these functions match. -html.overload.resolution.ambiguity.on.method.0.all.these.functions.match.ul.1.ul.html=Overload resolution ambiguity on method '''''{'0'}'''''. All these functions match. -html.platform.declaration.clash.0.html=Platform declaration clash: '{'0'}' -html.property.delegate.must.have.a.0.method.none.of.the.following.functions.is.suitable.ul.1.ul.html=Property delegate must have a '''''{'0'}''''' method. None of the following functions is suitable. -html.property.type.is.0.which.is.not.a.subtype.type.of.overridden.br.1.html=Property type is '''''{'0'}''''', which is not a subtype type of overridden
'{'1'}' -html.return.type.is.0.which.is.not.a.subtype.of.overridden.br.1.html=Return type is '''''{'0'}''''', which is not a subtype of overridden
'{'1'}' -html.return.types.of.inherited.members.are.incompatible.br.0.br.1.html=Return types of inherited members are incompatible:
'{'0'}',
'{'1'}' -html.setter.parameter.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Setter parameter type must be equal to the type of the property.
Expected:'{'0'}'
Found:'{'1'}'
-html.type.argument.is.not.within.its.bounds.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Type argument is not within its bounds.
Expected:'{'0'}'
Found:'{'1'}'
-html.type.inference.failed.0.html=Type inference failed: '{'0'}' -html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.br.projected.type.2.restricts.use.of.br.3.html=Type mismatch.
Required:'{'0'}'
Found:'{'1'}'

\nProjected type '{'2'}' restricts use of
\n'{'3'}'\n -html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Type mismatch.
Required:'{'0'}'
Found:'{'1'}'
-html.types.of.inherited.properties.are.incompatible.br.0.br.1.html=Types of inherited properties are incompatible:
'{'0'}',
'{'1'}' -html.types.of.inherited.var.properties.do.not.match.br.0.br.1.html=Types of inherited var-properties do not match:
'{'0'}',
'{'1'}' -html.unresolved.reference.br.none.of.the.following.candidates.is.applicable.because.of.receiver.type.mismatch.ul.0.ul.html=Unresolved reference.
None of the following candidates is applicable because of receiver type mismatch: -html.val.property.cannot.override.var.property.br.1.html=Val-property cannot override var-property
'{'1'}' -html.val.property.cannot.override.var.property.br.1.html2=Val-property cannot override var-property
'{'1'}' -html.var.property.type.is.0.which.is.not.a.type.of.overridden.br.1.html=Var-property type is '''''{'0'}''''', which is not a type of overridden
'{'1'}' -required=required:\u0020 +html.javascript.0.html=JavaScript: {0} +html.platform.declaration.clash.0.html=Platform declaration clash: {0} +html.internal.error.occurred.while.analyzing.this.expression.br.table.cellspacing.0.cellpadding.0.tr.td.strong.please.use.the.strong.td.td.img.src.0.td.td.strong.icon.in.the.bottom.right.corner.to.report.this.error.strong.td.tr.table.br.pre.0.pre.html=Internal Error occurred while analyzing this expression
(Please use the "" icon in the bottom-right corner to report this error):

{0}
+html.property.delegate.must.have.a.0.method.none.of.the.following.functions.is.suitable.ul.1.ul.html=Property delegate must have a ''{0}'' method. None of the following functions is suitable. +html.overload.resolution.ambiguity.on.method.0.all.these.functions.match.ul.1.ul.html=Overload resolution ambiguity on method ''{0}''. All these functions match. +html.unresolved.reference.br.none.of.the.following.candidates.is.applicable.because.of.receiver.type.mismatch.ul.0.ul.html=Unresolved reference.
None of the following candidates is applicable because of receiver type mismatch: +html.cannot.choose.among.the.following.candidates.without.completing.type.inference.ul.0.ul.html=Cannot choose among the following candidates without completing type inference: +html.none.of.the.following.functions.can.be.called.with.the.arguments.supplied.ul.0.ul.html=None of the following functions can be called with the arguments supplied. +html.overload.resolution.ambiguity.all.these.functions.match.ul.0.ul.html=Overload resolution ambiguity. All these functions match. +html.function.return.type.mismatch.table.tr.td.expected.td.td.1.td.tr.tr.td.found.td.td.2.td.tr.table.html=Function return type mismatch.
Expected:{1}
Found:{2}
+html.0.must.override.1.br.because.it.inherits.many.implementations.of.it.html={0} must override {1}
because it inherits many implementations of it +html.types.of.inherited.var.properties.do.not.match.br.0.br.1.html=Types of inherited var-properties do not match:
{0},
{1} +html.types.of.inherited.properties.are.incompatible.br.0.br.1.html=Types of inherited properties are incompatible:
{0},
{1} +html.actual.class.0.has.no.corresponding.members.for.expected.class.members.1.html=Actual class ''{0}'' has no corresponding members for expected class members:{1} +html.val.property.cannot.override.var.property.br.1.html=Val-property cannot override var-property
{1} +html.val.property.cannot.override.var.property.br.1.html2=Val-property cannot override var-property
{1} +html.var.property.type.is.0.which.is.not.a.type.of.overridden.br.1.html=Var-property type is {0}, which is not a type of overridden
{1} +required.space=required:\u0020 type.inference.failed.expected.type.mismatch=Type inference failed. Expected type mismatch:\u0020 +html.setter.parameter.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Setter parameter type must be equal to the type of the property.
Expected:{0}
Found:{1}
+html.property.type.is.0.which.is.not.a.subtype.type.of.overridden.br.1.html=Property type is {0}, which is not a subtype type of overridden
{1} +html.return.types.of.inherited.members.are.incompatible.br.0.br.1.html=Return types of inherited members are incompatible:
{0},
{1} +html.return.type.is.0.which.is.not.a.subtype.of.overridden.br.1.html=Return type is ''{0}'', which is not a subtype of overridden
{1} +html.loop.parameter.type.mismatch.table.tr.td.iterated.values.td.td.0.td.tr.tr.td.parameter.td.td.1.td.tr.table.html=Loop parameter type mismatch.
Iterated values:{0}
Parameter:{1}
+html.type.argument.is.not.within.its.bounds.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Type argument is not within its bounds.
Expected:{0}
Found:{1}
+html.method.iterator.is.ambiguous.for.this.expression.ul.0.ul.html=Method ''iterator()'' is ambiguous for this expression. +html.getter.return.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Getter return type must be equal to the type of the property.
Expected:{0}
Found:{1}
+html.type.inference.failed.0.html=Type inference failed: {0} +html.assignment.operators.ambiguity.all.these.functions.match.ul.0.ul.table.html=Assignment operators ambiguity. All these functions match. +html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.br.projected.type.2.restricts.use.of.br.3.html=Type mismatch.
Required:{0}
Found:{1}

\nProjected type {2} restricts use of
\n{3}\n +html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html=Type mismatch.
Required:{0}
Found:{1}
intention.suppress.family=Suppress Warnings intention.suppress.text=Suppress ''{0}'' for {1} {2} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/IdeErrorMessages.java b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/IdeErrorMessages.java index 9ca1a88b7b5..53907697bb8 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/IdeErrorMessages.java +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/IdeErrorMessages.java @@ -1,6 +1,17 @@ /* - * 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. + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.jetbrains.kotlin.idea.highlighter; @@ -48,16 +59,19 @@ public class IdeErrorMessages { } static { - MAP.put(TYPE_MISMATCH, KotlinIdeaAnalysisBundle - .message("html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, - HTML_RENDER_TYPE); + MAP.put(TYPE_MISMATCH, + KotlinIdeaAnalysisBundle + .message("html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), + HTML_RENDER_TYPE, HTML_RENDER_TYPE); - MAP.put(NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS, KotlinIdeaAnalysisBundle - .message("html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, - HTML_RENDER_TYPE); + MAP.put(NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS, + KotlinIdeaAnalysisBundle + .message("html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), + HTML_RENDER_TYPE, HTML_RENDER_TYPE); - MAP.put(TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS, KotlinIdeaAnalysisBundle.message( - "html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.br.projected.type.2.restricts.use.of.br.3.html"), + MAP.put(TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS, + KotlinIdeaAnalysisBundle.message( + "html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.br.projected.type.2.restricts.use.of.br.3.html"), object -> { RenderingContext context = RenderingContext .of(object.getExpectedType(), object.getExpressionType(), object.getReceiverType(), @@ -80,97 +94,94 @@ public class IdeErrorMessages { HTML_TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER_RENDERER); MAP.put(TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR, KotlinIdeaAnalysisBundle.message("html.type.inference.failed.0.html"), HTML_TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR_RENDERER); - MAP.put(TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH, - tableForTypes(KotlinIdeaAnalysisBundle.message("type.inference.failed.expected.type.mismatch"), - KotlinIdeaAnalysisBundle.message("required"), TextElementType.STRONG, - KotlinIdeaAnalysisBundle.message("found"), TextElementType.ERROR), HTML_RENDER_TYPE, HTML_RENDER_TYPE); + MAP.put(TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH, tableForTypes( + KotlinIdeaAnalysisBundle.message("type.inference.failed.expected.type.mismatch"), + KotlinIdeaAnalysisBundle.message("required.space"), TextElementType.STRONG, + KotlinIdeaAnalysisBundle.message("found.space"), TextElementType.ERROR), HTML_RENDER_TYPE, HTML_RENDER_TYPE); MAP.put(TYPE_INFERENCE_UPPER_BOUND_VIOLATED, "{0}", HTML_TYPE_INFERENCE_UPPER_BOUND_VIOLATED_RENDERER); MAP.put(WRONG_SETTER_PARAMETER_TYPE, KotlinIdeaAnalysisBundle.message( - "html.setter.parameter.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), - HTML_RENDER_TYPE, HTML_RENDER_TYPE); + "html.setter.parameter.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, HTML_RENDER_TYPE); MAP.put(WRONG_GETTER_RETURN_TYPE, KotlinIdeaAnalysisBundle.message( - "html.getter.return.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), - HTML_RENDER_TYPE, HTML_RENDER_TYPE); + "html.getter.return.type.must.be.equal.to.the.type.of.the.property.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, HTML_RENDER_TYPE); MAP.put(ITERATOR_AMBIGUITY, KotlinIdeaAnalysisBundle.message("html.method.iterator.is.ambiguous.for.this.expression.ul.0.ul.html"), HTML_AMBIGUOUS_CALLS); MAP.put(UPPER_BOUND_VIOLATED, KotlinIdeaAnalysisBundle.message( - "html.type.argument.is.not.within.its.bounds.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), - HTML_RENDER_TYPE, HTML_RENDER_TYPE); + "html.type.argument.is.not.within.its.bounds.table.tr.td.expected.td.td.0.td.tr.tr.td.found.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, HTML_RENDER_TYPE); MAP.put(TYPE_MISMATCH_IN_FOR_LOOP, KotlinIdeaAnalysisBundle.message( - "html.loop.parameter.type.mismatch.table.tr.td.iterated.values.td.td.0.td.tr.tr.td.parameter.td.td.1.td.tr.table.html"), - HTML_RENDER_TYPE, HTML_RENDER_TYPE); + "html.loop.parameter.type.mismatch.table.tr.td.iterated.values.td.td.0.td.tr.tr.td.parameter.td.td.1.td.tr.table.html"), HTML_RENDER_TYPE, HTML_RENDER_TYPE); MAP.put(RETURN_TYPE_MISMATCH_ON_OVERRIDE, - KotlinIdeaAnalysisBundle.message("html.return.type.is.0.which.is.not.a.subtype.of.overridden.br.1.html"), - HTML_RENDER_RETURN_TYPE, HTML_WITH_ANNOTATIONS_WHITELIST); + KotlinIdeaAnalysisBundle.message("html.return.type.is.0.which.is.not.a.subtype.of.overridden.br.1.html"), HTML_RENDER_RETURN_TYPE, HTML_WITH_ANNOTATIONS_WHITELIST); MAP.put(RETURN_TYPE_MISMATCH_ON_INHERITANCE, - KotlinIdeaAnalysisBundle.message("html.return.types.of.inherited.members.are.incompatible.br.0.br.1.html"), HTML, HTML); + KotlinIdeaAnalysisBundle.message("html.return.types.of.inherited.members.are.incompatible.br.0.br.1.html"), + HTML, HTML); MAP.put(PROPERTY_TYPE_MISMATCH_ON_OVERRIDE, - KotlinIdeaAnalysisBundle.message("html.property.type.is.0.which.is.not.a.subtype.type.of.overridden.br.1.html"), - HTML_RENDER_RETURN_TYPE, HTML); + KotlinIdeaAnalysisBundle.message("html.property.type.is.0.which.is.not.a.subtype.type.of.overridden.br.1.html"), HTML_RENDER_RETURN_TYPE, HTML); MAP.put(VAR_TYPE_MISMATCH_ON_OVERRIDE, - KotlinIdeaAnalysisBundle.message("html.var.property.type.is.0.which.is.not.a.type.of.overridden.br.1.html"), - HTML_RENDER_RETURN_TYPE, HTML); + KotlinIdeaAnalysisBundle.message("html.var.property.type.is.0.which.is.not.a.type.of.overridden.br.1.html"), HTML_RENDER_RETURN_TYPE, HTML); MAP.put(PROPERTY_TYPE_MISMATCH_ON_INHERITANCE, - KotlinIdeaAnalysisBundle.message("html.types.of.inherited.properties.are.incompatible.br.0.br.1.html"), HTML, HTML); + KotlinIdeaAnalysisBundle.message("html.types.of.inherited.properties.are.incompatible.br.0.br.1.html"), + HTML, HTML); MAP.put(VAR_TYPE_MISMATCH_ON_INHERITANCE, - KotlinIdeaAnalysisBundle.message("html.types.of.inherited.var.properties.do.not.match.br.0.br.1.html"), HTML, HTML); + KotlinIdeaAnalysisBundle.message("html.types.of.inherited.var.properties.do.not.match.br.0.br.1.html"), + HTML, HTML); - MAP.put(VAR_OVERRIDDEN_BY_VAL, KotlinIdeaAnalysisBundle.message("html.val.property.cannot.override.var.property.br.1.html2"), HTML, - HTML); + MAP.put(VAR_OVERRIDDEN_BY_VAL, KotlinIdeaAnalysisBundle.message("html.val.property.cannot.override.var.property.br.1.html2"), HTML, HTML); MAP.put(VAR_OVERRIDDEN_BY_VAL_BY_DELEGATION, KotlinIdeaAnalysisBundle.message("html.val.property.cannot.override.var.property.br.1.html"), HTML, HTML); MAP.put(ABSTRACT_MEMBER_NOT_IMPLEMENTED, - KotlinIdeaAnalysisBundle.message("html.0.is.not.abstract.and.does.not.implement.abstract.member.br.1.html"), - RENDER_CLASS_OR_OBJECT, HTML); + KotlinIdeaAnalysisBundle.message("html.0.is.not.abstract.and.does.not.implement.abstract.member.br.1.html"), RENDER_CLASS_OR_OBJECT, HTML); MAP.put(ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED, - KotlinIdeaAnalysisBundle.message("html.0.is.not.abstract.and.does.not.implement.abstract.base.class.member.br.1.html"), - RENDER_CLASS_OR_OBJECT, HTML); + KotlinIdeaAnalysisBundle.message("html.0.is.not.abstract.and.does.not.implement.abstract.base.class.member.br.1.html"), RENDER_CLASS_OR_OBJECT, HTML); MAP.put(MANY_IMPL_MEMBER_NOT_IMPLEMENTED, KotlinIdeaAnalysisBundle.message("html.0.must.override.1.br.because.it.inherits.many.implementations.of.it.html"), RENDER_CLASS_OR_OBJECT, HTML); MAP.put(RESULT_TYPE_MISMATCH, KotlinIdeaAnalysisBundle - .message("html.function.return.type.mismatch.table.tr.td.expected.td.td.1.td.tr.tr.td.found.td.td.2.td.tr.table.html"), - STRING, HTML_RENDER_TYPE, HTML_RENDER_TYPE); + .message("html.function.return.type.mismatch.table.tr.td.expected.td.td.1.td.tr.tr.td.found.td.td.2.td.tr.table.html"), STRING, HTML_RENDER_TYPE, HTML_RENDER_TYPE); + MAP.put(OVERLOAD_RESOLUTION_AMBIGUITY, KotlinIdeaAnalysisBundle.message("html.overload.resolution.ambiguity.all.these.functions.match.ul.0.ul.html"), HTML_AMBIGUOUS_CALLS); MAP.put(NONE_APPLICABLE, KotlinIdeaAnalysisBundle .message("html.none.of.the.following.functions.can.be.called.with.the.arguments.supplied.ul.0.ul.html"), HTML_NONE_APPLICABLE_CALLS); - MAP.put(CANNOT_COMPLETE_RESOLVE, KotlinIdeaAnalysisBundle + MAP.put(CANNOT_COMPLETE_RESOLVE, + KotlinIdeaAnalysisBundle .message("html.cannot.choose.among.the.following.candidates.without.completing.type.inference.ul.0.ul.html"), HTML_AMBIGUOUS_CALLS); - MAP.put(UNRESOLVED_REFERENCE_WRONG_RECEIVER, KotlinIdeaAnalysisBundle.message( - "html.unresolved.reference.br.none.of.the.following.candidates.is.applicable.because.of.receiver.type.mismatch.ul.0.ul.html"), + MAP.put(UNRESOLVED_REFERENCE_WRONG_RECEIVER, + KotlinIdeaAnalysisBundle.message( + "html.unresolved.reference.br.none.of.the.following.candidates.is.applicable.because.of.receiver.type.mismatch.ul.0.ul.html"), HTML_AMBIGUOUS_CALLS); - MAP.put(DELEGATE_SPECIAL_FUNCTION_AMBIGUITY, - KotlinIdeaAnalysisBundle.message("html.overload.resolution.ambiguity.on.method.0.all.these.functions.match.ul.1.ul.html"), - STRING, HTML_AMBIGUOUS_CALLS); - MAP.put(DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, KotlinIdeaAnalysisBundle - .message("html.property.delegate.must.have.a.0.method.none.of.the.following.functions.is.suitable.ul.1.ul.html"), STRING, - HTML_NONE_APPLICABLE_CALLS); - MAP.put(DELEGATE_PD_METHOD_NONE_APPLICABLE, KotlinIdeaAnalysisBundle - .message("html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html"), STRING, - HTML_NONE_APPLICABLE_CALLS); - MAP.put(CONFLICTING_JVM_DECLARATIONS, KotlinIdeaAnalysisBundle.message("html.platform.declaration.clash.0.html"), - HTML_CONFLICTING_JVM_DECLARATIONS_DATA); - MAP.put(ACCIDENTAL_OVERRIDE, KotlinIdeaAnalysisBundle.message("html.accidental.override.0.html"), - HTML_CONFLICTING_JVM_DECLARATIONS_DATA); + MAP.put(DELEGATE_SPECIAL_FUNCTION_AMBIGUITY, + KotlinIdeaAnalysisBundle.message("html.overload.resolution.ambiguity.on.method.0.all.these.functions.match.ul.1.ul.html"), STRING, + HTML_AMBIGUOUS_CALLS); + MAP.put(DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, + KotlinIdeaAnalysisBundle + .message("html.property.delegate.must.have.a.0.method.none.of.the.following.functions.is.suitable.ul.1.ul.html"), + STRING, HTML_NONE_APPLICABLE_CALLS); + MAP.put(DELEGATE_PD_METHOD_NONE_APPLICABLE, + KotlinIdeaAnalysisBundle + .message("html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html"), + STRING, HTML_NONE_APPLICABLE_CALLS); + + MAP.put(CONFLICTING_JVM_DECLARATIONS, KotlinIdeaAnalysisBundle.message("html.platform.declaration.clash.0.html"), HTML_CONFLICTING_JVM_DECLARATIONS_DATA); + MAP.put(ACCIDENTAL_OVERRIDE, KotlinIdeaAnalysisBundle.message("html.accidental.override.0.html"), HTML_CONFLICTING_JVM_DECLARATIONS_DATA); URL errorIconUrl = AllIcons.class.getResource(ErrorIconUtil.getErrorIconUrl()); MAP.put(EXCEPTION_FROM_ANALYZER, KotlinIdeaAnalysisBundle.message( "html.internal.error.occurred.while.analyzing.this.expression.br.table.cellspacing.0.cellpadding.0.tr.td.strong.please.use.the.strong.td.td.img.src.0.td.td.strong.icon.in.the.bottom.right.corner.to.report.this.error.strong.td.tr.table.br.pre.0.pre.html", - errorIconUrl), HTML_THROWABLE); + errorIconUrl), + HTML_THROWABLE); MAP.put(ErrorsJs.JSCODE_ERROR, KotlinIdeaAnalysisBundle.message("html.javascript.0.html"), JsCallDataHtmlRenderer.INSTANCE); MAP.put(ErrorsJs.JSCODE_WARNING, KotlinIdeaAnalysisBundle.message("html.javascript.0.html"), JsCallDataHtmlRenderer.INSTANCE); @@ -181,18 +192,19 @@ public class IdeErrorMessages { MAP.put(EXPERIMENTAL_FEATURE_ERROR, "{0}", new LanguageFeatureMessageRenderer(LanguageFeatureMessageRenderer.Type.ERROR, true)); - MAP.put(NO_ACTUAL_FOR_EXPECT, KotlinIdeaAnalysisBundle.message("html.expected.0.has.no.actual.declaration.in.module.1.2.html"), - DECLARATION_NAME_WITH_KIND, MODULE_WITH_PLATFORM, - new PlatformIncompatibilityDiagnosticRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE)); + MAP.put(NO_ACTUAL_FOR_EXPECT, KotlinIdeaAnalysisBundle.message("html.expected.0.has.no.actual.declaration.in.module.1.2.html"), DECLARATION_NAME_WITH_KIND, + MODULE_WITH_PLATFORM, new PlatformIncompatibilityDiagnosticRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE)); MAP.put(ACTUAL_WITHOUT_EXPECT, KotlinIdeaAnalysisBundle.message("html.0.has.no.corresponding.expected.declaration.1.html"), CAPITALIZED_DECLARATION_NAME_WITH_KIND_AND_PLATFORM, new PlatformIncompatibilityDiagnosticRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE)); + MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, KotlinIdeaAnalysisBundle.message("html.actual.class.0.has.no.corresponding.members.for.expected.class.members.1.html"), NAME, new IncompatibleExpectedActualClassScopesRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE)); - String MESSAGE_FOR_CONCURRENT_HASH_MAP_CONTAINS = KotlinIdeaAnalysisBundle.message( - "html.method.contains.from.concurrenthashmap.may.have.unexpected.semantics.it.calls.containsvalue.instead.of.containskey.br.use.explicit.form.of.the.call.to.containskey.containsvalue.contains.or.cast.the.value.to.kotlin.collections.map.instead.br.see.https.youtrack.jetbrains.com.issue.kt.18053.for.more.details.html"); + String MESSAGE_FOR_CONCURRENT_HASH_MAP_CONTAINS = + KotlinIdeaAnalysisBundle.message( + "html.method.contains.from.concurrenthashmap.may.have.unexpected.semantics.it.calls.containsvalue.instead.of.containskey.br.use.explicit.form.of.the.call.to.containskey.containsvalue.contains.or.cast.the.value.to.kotlin.collections.map.instead.br.see.https.youtrack.jetbrains.com.issue.kt.18053.for.more.details.html"); MAP.put(CONCURRENT_HASH_MAP_CONTAINS_OPERATOR, MESSAGE_FOR_CONCURRENT_HASH_MAP_CONTAINS); MAP.put(CONCURRENT_HASH_MAP_CONTAINS_OPERATOR_ERROR, MESSAGE_FOR_CONCURRENT_HASH_MAP_CONTAINS); diff --git a/idea/resources/messages/KotlinBundle.properties b/idea/resources/messages/KotlinBundle.properties index a8c444123c3..33018848397 100644 --- a/idea/resources/messages/KotlinBundle.properties +++ b/idea/resources/messages/KotlinBundle.properties @@ -1621,8 +1621,8 @@ make.primary.constructor.0=Make primary constructor {0} change.visibility.modifier=Change visibility modifier 0.may.break.code={0} (may break code) convert.to.vararg.parameter=Convert to vararg parameter -replace.with=Replace '||' with '&&' -replace.with2=Replace '&&' with '||' +replace.with=Replace '||' with '\\&\\&' +replace.with2=Replace '\\&\\&' with '||' can.t.modify.0=Can''t modify {0} 0.already.exists={0} already exists type.arguments.will.be.lost.after.conversion.0=Type arguments will be lost after conversion: {0}